Home | History | Annotate | only in /src/sys/arch/arm
History log of /src/sys/arch/arm
RevisionDateAuthorComments
 1.9 24-Jan-2018  skrll arm26 is gone.
 1.8 25-Jun-2008  matt Revert last change and just use .WAIT
 1.7 23-Jun-2008  matt Fix a race condition -j. Don't do SUBDIRS= include/arm include/arm/...
since the latter might be done before the former which mtree doesn't like.
Instead have arm recurse into its own subdirs.
 1.6 17-Aug-2006  bjh21 branches: 1.6.58; 1.6.62; 1.6.64; 1.6.66;
There's no need to expose arm/iomd/vidc.h to userland any more, since
<machine/vconsole.h> has gone now.
 1.5 28-Sep-2002  chris branches: 1.5.24; 1.5.38; 1.5.42;
cats and netwinder can share a common footbridge_intr.h file, so install and
share a common file.
 1.4 17-Dec-2001  bjh21 Ensure that vidc.h gets installed somewhere -- Xarm32vidc needs it to compile.
 1.3 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.2 23-Feb-2001  reinoud branches: 1.2.4; 1.2.8;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2;
Skeleton ARM include infrastructure.
 1.1.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 10-Jan-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.2.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.42.1 03-Sep-2006  yamt sync with head.
 1.5.38.1 09-Sep-2006  rpaulo sync with head
 1.5.24.1 30-Dec-2006  yamt sync with head.
 1.6.66.1 27-Jun-2008  simonb Sync with head.
 1.6.64.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.6.62.1 04-May-2009  yamt sync with head.
 1.6.58.1 29-Jun-2008  mjf Sync with HEAD.
 1.3 29-Oct-2022  jmcneill Remove old OMAP port.

This code was a mess and full of unmaintainable SoC and board specific
ifdefs. A modern devicetree port for OMAP3530 and AM335x based boards
now lives in arch/arm/ti. If someone is interested in bringing back
support for any boards lost in this transition, feel free, but please
do so using the new devicetree based model.
 1.2 15-Oct-2022  jmcneill Remove unused ARM11 MPCore code.
 1.1 04-Apr-2011  dyoung branches: 1.1.2; 1.1.6;
Add a couple of make(1) include files that provide lists of source
files needed for tags computation in evbppc, evbarm, cats, and other
architectures.
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 04-Apr-2011  jruoho file Makefile.inc was added on branch jruoho-x86intr on 2011-06-06 09:05:00 +0000
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 04-Apr-2011  rmind file Makefile.inc was added on branch rmind-uvmplock on 2011-04-21 01:40:50 +0000
 1.1 07-Dec-2020  jmcneill branches: 1.1.2;
acpicpu: Add support for ACPI P-states and T-states on Arm.
 1.1.2.2 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1.2.1 07-Dec-2020  thorpej file acpi_cpu_md.c was added on branch thorpej-futex on 2020-12-14 14:37:47 +0000
 1.5 09-Dec-2024  jmcneill arm64: acpi: Honour DMA memory address limit for named components.
 1.4 13-Sep-2020  jmcneill branches: 1.4.26;
Make Arm MD ACPI code big endian friendly.
 1.3 13-Feb-2020  jmcneill Add support for multiple GICv3 ITS domains.
 1.2 07-Feb-2020  jmcneill Single mappings are translated to OutputBase, not InputBase
 1.1 08-Dec-2018  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.1.10.1 29-Feb-2020  ad Sync with head.
 1.1.6.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 08-Dec-2018  christos file acpi_iort.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.2.1 08-Dec-2018  pgoyette file acpi_iort.c was added on branch pgoyette-compat on 2018-12-26 14:01:32 +0000
 1.4.26.1 02-Aug-2025  perseant Sync with HEAD
 1.3 09-Dec-2024  jmcneill arm64: acpi: Honour DMA memory address limit for named components.
 1.2 13-Feb-2020  jmcneill branches: 1.2.30;
Add support for multiple GICv3 ITS domains.
 1.1 08-Dec-2018  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.1.10.1 29-Feb-2020  ad Sync with head.
 1.1.6.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 08-Dec-2018  christos file acpi_iort.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.2.1 08-Dec-2018  pgoyette file acpi_iort.h was added on branch pgoyette-compat on 2018-12-26 14:01:32 +0000
 1.2.30.1 02-Aug-2025  perseant Sync with HEAD
 1.28 30-Dec-2024  jmcneill arm: ACPI: Fix EFI_MEMORY_UC memory type.

The UEFI specification says that EFI_MEMORY_UC should be treated as
Device-nGnRnE (UEFI 2.10, 2.3.6.1 AArch64 Platforms - Memory types).
 1.27 09-Dec-2024  jmcneill arm64: acpi: Honour DMA memory address limit for named components.
 1.26 15-Oct-2022  jmcneill branches: 1.26.8;
Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.25 08-Aug-2021  jmcneill arm: ACPI: Add support for simple sharing of platform interrupts

Allow sharing of platform interrupts provided that the type, ipl, and
mpsafe-ness are the same.
 1.24 07-Aug-2021  jmcneill acpi: DMA: Use acpi_resource_parse_any to parse _DMA resources

_DMA resources really should be marked ResourceProducer, so use
acpi_resource_parse_any to pick these up.
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.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.21 13-Dec-2020  jmcneill branches: 1.21.2;
Add MI support for attaching drivers to arbitrary System Description
Tables.
 1.20 24-Oct-2020  skrll branches: 1.20.2;
Trailing whitespace
 1.19 21-Jan-2020  jmcneill Provide a properly constrained 32-bit DMA tag to ACPI.
 1.18 31-Dec-2019  jmcneill branches: 1.18.2;
Rely on 32/64-bit overflow to calculate translation offsets. Store this
as a separate ar_xbase field in acpi_mem instead of having separate
ar_offset and ar_decode fields.
 1.17 31-Dec-2019  jmcneill Create bus_dma tags for each device node based on _CCA and _DMA properties
found by walking up the device node tree. These tags encode range
restrictions, address translations, and whether or not the device is
cache coherent.
 1.16 31-Dec-2019  jmcneill The DMA restrictions may not be defined in the direct parent of a device,
so search up the tree for a module device.
 1.15 30-Dec-2019  jmcneill If a device node is a child of a module device, and the module device declares DMA range restrictions, use them.
 1.14 29-Dec-2019  jmcneill Allow MD code to provide custom bus_dma tags on a per-node basis. On Arm
this is required to return non-coherent bus_dma tags for device nodes with
_CCA=0
 1.13 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.12 23-Dec-2019  jmcneill Implement acpi_md_intr_mask and acpi_md_intr_unmask
 1.11 22-Dec-2019  thorpej Add acpi_intr_mask() and acpi_intr_unmask() which, following the pre-existing
ACPI software layering model, are wrappers around acpi_md_intr_mask() and
acpi_md_intr_unmask(), which in turn are wrappers around intr_mask() and
intr_unmask().

XXX ARM and IA64 implementations of acpi_md_intr_mask() and
acpi_md_intr_unmask() are just stubs for now.
 1.10 12-Aug-2019  skrll Use same style test as acpi_md_OsWritable
 1.9 12-Aug-2019  skrll Correct the test for writeable memory. There aren't any users of this at
this point.
 1.8 01-Aug-2019  jmcneill Always map ACPI table memory as normal memory. Always map device memory as device memory.
 1.7 01-Aug-2019  jmcneill acpi_md_OsMapMemory can be used for both normal and device memory. Use the
UEFI memory map to determine how to map a given region.
 1.6 16-Nov-2018  jmcneill branches: 1.6.4; 1.6.6;
Add MD functions for establishing and disestablishing interrupt handlers.
 1.5 12-Nov-2018  jmcneill Support building kernels with ACPI and no PCI.
 1.4 21-Oct-2018  jmcneill Don't make assumptions about the order of MADT subtables. Ensure that we
attach CPUs before the interrupt controller driver.
 1.3 16-Oct-2018  jmcneill branches: 1.3.2;
Fix size calculation in acpi_md_OsUnmapMemory
 1.2 15-Oct-2018  jmcneill Add ARM ACPI PCI support.
 1.1 12-Oct-2018  jmcneill Add ARM MD ACPI implementation.
 1.3.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.2 20-Oct-2018  pgoyette Sync with head
 1.3.2.1 16-Oct-2018  pgoyette file acpi_machdep.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.6.6.3 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.6.6.2 12-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #48):

sys/arch/arm/acpi/acpi_machdep.c: revision 1.9
sys/arch/arm/acpi/acpi_machdep.c: revision 1.10

Correct the test for writeable memory. There aren't any users of this at
this point.

Use same style test as acpi_md_OsWritable
 1.6.6.1 04-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #3):

sys/stand/efiboot/efiacpi.c: revision 1.4
sys/stand/efiboot/efifdt.c: revision 1.18
sys/stand/efiboot/version: revision 1.12
sys/arch/arm/acpi/acpi_machdep.c: revision 1.7
sys/arch/arm/acpi/acpi_machdep.c: revision 1.8

Add full UEFI memory map to the /chosen node.

-

acpi_md_OsMapMemory can be used for both normal and device memory. Use the
UEFI memory map to determine how to map a given region.

Always map ACPI table memory as normal memory. Always map device memory as device memory.
 1.6.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.4.2 10-Jun-2019  christos Sync with HEAD
 1.6.4.1 16-Nov-2018  christos file acpi_machdep.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.18.2.1 25-Jan-2020  ad Sync with head.
 1.20.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.21.2.2 17-Apr-2021  thorpej acpi_md_gtdt_probe(): Fix paste-o in interface attribute name.
 1.21.2.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.26.8.1 02-Aug-2025  perseant Sync with HEAD
 1.5 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.4 24-Oct-2020  skrll Trailing whitespace
 1.3 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.2 15-Jun-2020  ad Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.1 17-Jan-2020  jmcneill branches: 1.1.2; 1.1.6;
Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 17-Jan-2020  martin file acpi_pci_graviton.c was added on branch phil-wifi on 2020-04-08 14:07:27 +0000
 1.1.2.2 17-Jan-2020  ad Sync with head.
 1.1.2.1 17-Jan-2020  ad file acpi_pci_graviton.c was added on branch ad-namecache on 2020-01-17 21:47:23 +0000
 1.5 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.4 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.3 15-Jun-2020  ad Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.2 02-Feb-2020  jmcneill branches: 1.2.2; 1.2.6;
Map and read MCFG space directly instead of going through acpimcfg to
simplify access through our tiny config space window.
 1.1 01-Feb-2020  jmcneill Add support for NXP Layerscape PCIe Gen4 (not ECAM compliant)
 1.2.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.6.1 02-Feb-2020  martin file acpi_pci_layerscape_gen4.c was added on branch phil-wifi on 2020-04-08 14:07:27 +0000
 1.2.2.2 29-Feb-2020  ad Sync with head.
 1.2.2.1 02-Feb-2020  ad file acpi_pci_layerscape_gen4.c was added on branch ad-namecache on 2020-02-29 20:18:17 +0000
 1.22 13-Aug-2022  jmcneill arm: acpi: Improve legacy INTx support.

For devices on a bus with no direct _PRT, use the raw intr pin with the
parent bridge's slot number to derive a pin number that can be used to
lookup the pin -> irq mapping in the parent bus's _PRT.
 1.21 21-Dec-2021  skrll Remove unneeded struct acpi_pci_intr forward declaration.
 1.20 08-Aug-2021  jmcneill Install the shared PCI INTx interrupt handler at IPL_VM to workaround a
possible interrupt storm at boot. Need to revisit this.
 1.19 07-Aug-2021  jmcneill arm: acpi: Add support for SMCCC based PCI config access.
 1.18 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.17 15-Jun-2020  ad Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.16 13-Feb-2020  jmcneill Add support for multiple GICv3 ITS domains.
 1.15 01-Feb-2020  jmcneill Add support for NXP Layerscape PCIe Gen4 (not ECAM compliant)
 1.14 23-Jan-2020  jmcneill Add support for sharing legacy PCI interrupt sources.
 1.13 17-Jan-2020  jmcneill Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.12 15-Oct-2019  jmcneill branches: 1.12.2;
Amazon Graviton maxdevs quirk no longer required as of pci.c r1.155
 1.11 14-Oct-2019  jmcneill More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.
 1.10 14-Oct-2019  jmcneill Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.
 1.9 08-Dec-2018  jmcneill branches: 1.9.4; 1.9.6;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.8 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.7 03-Nov-2018  jmcneill Match _PRT by segment and bus
 1.6 02-Nov-2018  jmcneill Add support for multiple PCI segments.
 1.5 31-Oct-2018  jmcneill Add MSI-X support
 1.4 21-Oct-2018  jmcneill Do not add PCI link references until the bus has been mapped
 1.3 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.2 19-Oct-2018  jmcneill branches: 1.2.2;
Add support for PCI Segment Groups.
 1.1 15-Oct-2018  jmcneill Add ARM ACPI PCI support.
 1.2.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2 20-Oct-2018  pgoyette Sync with head
 1.2.2.1 19-Oct-2018  pgoyette file acpi_pci_machdep.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.9.6.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #332):

sys/arch/arm/acpi/acpipchb.c: revision 1.10
sys/arch/arm/acpi/acpipchb.c: revision 1.11
sys/arch/arm/acpi/acpipchb.c: revision 1.12
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.3
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.4
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.10
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.11

Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.

-

More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.

-

Fix detection of root port resources for Graviton and remove no longer required bridge fixup
 1.9.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.4.2 10-Jun-2019  christos Sync with HEAD
 1.9.4.1 08-Dec-2018  christos file acpi_pci_machdep.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.12.2.3 29-Feb-2020  ad Sync with head.
 1.12.2.2 25-Jan-2020  ad Sync with head.
 1.12.2.1 17-Jan-2020  ad Sync with head.
 1.8 07-Aug-2021  jmcneill arm: acpi: Add support for SMCCC based PCI config access.
 1.7 01-Feb-2020  jmcneill Add support for NXP Layerscape PCIe Gen4 (not ECAM compliant)
 1.6 17-Jan-2020  jmcneill Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.5 15-Oct-2019  jmcneill branches: 1.5.2;
Amazon Graviton maxdevs quirk no longer required as of pci.c r1.155
 1.4 14-Oct-2019  jmcneill More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.
 1.3 14-Oct-2019  jmcneill Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.
 1.2 19-Oct-2018  jmcneill branches: 1.2.2; 1.2.6; 1.2.8;
Add support for PCI Segment Groups.
 1.1 15-Oct-2018  jmcneill Add ARM ACPI PCI support.
 1.2.8.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #332):

sys/arch/arm/acpi/acpipchb.c: revision 1.10
sys/arch/arm/acpi/acpipchb.c: revision 1.11
sys/arch/arm/acpi/acpipchb.c: revision 1.12
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.3
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.4
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.10
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.11

Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.

-

More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.

-

Fix detection of root port resources for Graviton and remove no longer required bridge fixup
 1.2.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 19-Oct-2018  christos file acpi_pci_machdep.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.2.2.2 20-Oct-2018  pgoyette Sync with head
 1.2.2.1 19-Oct-2018  pgoyette file acpi_pci_machdep.h was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.5.2.2 29-Feb-2020  ad Sync with head.
 1.5.2.1 17-Jan-2020  ad Sync with head.
 1.7 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.6 24-Oct-2020  skrll Trailing whitespace
 1.5 13-Sep-2020  jmcneill Make Arm MD ACPI code big endian friendly.
 1.4 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.3 15-Jun-2020  ad Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.2 13-Feb-2020  jmcneill branches: 1.2.4;
Enable MSI and MSI-X support on N1SDP
 1.1 17-Jan-2020  jmcneill branches: 1.1.2;
Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.1.2.3 29-Feb-2020  ad Sync with head.
 1.1.2.2 17-Jan-2020  ad Sync with head.
 1.1.2.1 17-Jan-2020  ad file acpi_pci_n1sdp.c was added on branch ad-namecache on 2020-01-17 21:47:23 +0000
 1.2.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.1 13-Feb-2020  martin file acpi_pci_n1sdp.c was added on branch phil-wifi on 2020-04-08 14:07:27 +0000
 1.2 15-Oct-2022  jmcneill fix indentation
 1.1 07-Aug-2021  jmcneill arm: acpi: Add support for SMCCC based PCI config access.
 1.40 04-Oct-2025  thorpej Use device_setprop_bool() for "force_console".
 1.39 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.38 08-Dec-2024  jmcneill acpi: Try PSCI before UEFI RT for shutdown/reset.

BSA says that an OS can use either UEFI RT or PSCI, and that the RT
implementation should just call PSCI.

Given the amount of implementation issues with UEFI RT, let's try PSCI
first, because it's nice to be able to reboot and poweroff even with
buggy firmware.
 1.37 30-Jun-2024  jmcneill aarch64: Add NUMA awareness for ACPI systems with SRAT tables.

On an Ampere Altra w/ hemisphere mode enabled:

[ 1.0000000] cpu0: package 16, core 0, smt 0, numa 0
[...]
[ 1.0000000] cpu32: package 22, core 0, smt 0, numa 1

[ 1.000004] SRAT: 2 NUMA nodes
[ 1.000004] SRAT: node 0 memory range 0 (0x88300000 - 0x88400000 flags 1)
[ 1.000004] SRAT: node 0 memory range 1 (0x90000000 - 0x100000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 2 (0x80000000000 - 0x80080000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 3 (0x80100000000 - 0x81000000000 flags 1)
[ 1.000004] SRAT: node 1 memory range 0 (0xc0000000000 - 0xc1000000000 flags 1)
 1.36 07-Apr-2023  skrll branches: 1.36.6;
Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.35 24-Jan-2023  mlelstv Add support for FIFOs and hardware flow-control to plcom driver.
Add a PLCOM_TYPE_GENERIC_UART variant to match SBSA requirements.
 1.34 16-Nov-2022  skrll typo in comment
 1.33 06-Sep-2022  skrll Use the ACPICA define ACPI_DBG2_16550_WITH_GAS
 1.32 24-Oct-2021  jmcneill More SPCR cleanup:

- For 16550 style UARTs, always honour GAS if BitWidth != 0
- Use BitWidth instead of AccessWidth to determine register stride
- For baud rate ID of 0, assume 115200 until we have a way of probing
the baud rate configured by firmware.
 1.31 23-Oct-2021  jmcneill It seems that there are three 16550 types for SPCR:

- 0x0000: Fully 16550-compatible (1-byte I/O)
- 0x0001: 16550 subset compatible with DBGP Revision 1 (4-byte MMIO)
- 0x0012: 16550-compatible with parameters defined in GAS

So assume reg_width for types 0 and 1, and only look at GAS for type 12h.
 1.30 21-Oct-2021  jmcneill baud_rate is signed now
 1.29 20-Oct-2021  jakllsch SPCR_BAUD_DEFAULT maps better to -1 than 0

Suggested by jmcneill@
 1.28 07-Aug-2021  jmcneill acpi: call smccc_probe() after PSCI init
 1.27 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.26 12-May-2021  thorpej - Define a device call for PCI bus instances to fetch a direct child's
device handle given the device's device/function #s (extracted from
a pcitag_t). Use it to associate the handle with the child device
at config_found() time.
- Implement this device call for ACPI and OpenFirmware.
- Enable the OpenFirmware variant for evbarm FDT, macppc, ofppc, sparc64.
- Obsolete acpi_device_register(); it is no longer needed.
- Obsolete setting the OpenFirmware handle in PCI devices in the
sparc64 device_register(); it is no longer needed.
 1.25 24-Apr-2021  thorpej branches: 1.25.2; 1.25.4;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.24 12-Feb-2021  jmcneill branches: 1.24.2;
Reset serial terminal to default state at boot.

UEFI may leave the serial console in an undesireable state (incorrect
foreground and background colour, etc) when exiting. Send ANSI escape
sequences when setting up the early console attachments to turn off
character attributes and erase from the cursor to the end of the screen.
 1.23 04-Feb-2021  thorpej Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.22 06-Dec-2020  jmcneill acpi: Cleanup SPCR setup and style fixes.
 1.21 10-Oct-2020  jmcneill branches: 1.21.2;
Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.20 28-Sep-2020  jmcneill Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.19 13-Sep-2020  jmcneill Make Arm MD ACPI code big endian friendly.
 1.18 22-Sep-2019  jmcneill Use vcons for simplefb preattach to speed up early console messages.
 1.17 19-Aug-2019  jmcneill Use a unique name for the acpi ARM_PLATFORM definition
 1.16 02-Aug-2019  jmcneill Ignore AccessWidth (PL011 and SBSA console always needs 32-bit access)
 1.15 24-Jul-2019  jmcneill branches: 1.15.2;
Add early fb console support
 1.14 22-Jun-2019  jmcneill Finish the job
 1.13 19-Jun-2019  jmcneill Provide a 64-bit dma tag and use a coherent tag unless CCA=0
 1.12 23-May-2019  ryo branches: 1.12.2;
fix build without options MULTIPROCESSOR
 1.11 21-Dec-2018  jmcneill Use SPCR to force console selection for com@acpi. This is needed because
we may use a non-standard bus_space tag (a4x) to attach the console early,
which breaks com_is_console.
 1.10 28-Nov-2018  jmcneill Force a matching com@puc by seg/bus/dev/func to be the console device if specified in SPCR
 1.9 28-Nov-2018  jmcneill Replace SPCR_INTERFACE_TYPE_* defines with ACPI_DBG2_* from acpica. Suggested by msaitoh@
 1.8 27-Nov-2018  jmcneill Add support for SPCR 16550 and 16450 interface types
 1.7 24-Nov-2018  rjs Allow building when plcom isn't used.
 1.6 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.5 28-Oct-2018  jmcneill Add support for EFI runtime services on aarch64.
 1.4 19-Oct-2018  jmcneill branches: 1.4.2;
Fix BCM2835 console support.
 1.3 15-Oct-2018  jmcneill Handle more plcom-style console types
 1.2 13-Oct-2018  jmcneill Don't rely on PSCI node in FDT to reboot
 1.1 12-Oct-2018  jmcneill Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.4.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.4.2.2 20-Oct-2018  pgoyette Sync with head
 1.4.2.1 19-Oct-2018  pgoyette file acpi_platform.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.12.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.2.2 10-Jun-2019  christos Sync with HEAD
 1.12.2.1 23-May-2019  christos file acpi_platform.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.15.2.2 23-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #231):

sys/arch/arm/acpi/acpi_platform.c: revision 1.18
sys/arch/arm/acpi/files.acpi: revision 1.7
sys/arch/arm/acpi/acpi_simplefb.c: revision 1.1
sys/arch/arm/acpi/acpi_simplefb.h: revision 1.1

Use vcons for simplefb preattach to speed up early console messages.
 1.15.2.1 04-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #17):

sys/arch/arm/acpi/acpi_platform.c: revision 1.16

Ignore AccessWidth (PL011 and SBSA console always needs 32-bit access)
 1.21.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.21.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.24.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.25.4.1 31-May-2021  cjep sync with head
 1.25.2.1 13-May-2021  thorpej Sync with HEAD.
 1.36.6.2 02-Aug-2025  perseant Sync with HEAD
 1.36.6.1 01-Jul-2024  perseant Sync with HEAD.
 1.3 10-Oct-2020  jmcneill Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.2 24-Jan-2020  jmcneill branches: 1.2.6;
Do not attach simplefb if the width or height are invalid
 1.1 22-Sep-2019  jmcneill branches: 1.1.2; 1.1.4;
Use vcons for simplefb preattach to speed up early console messages.
 1.1.4.1 25-Jan-2020  ad Sync with head.
 1.1.2.2 23-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #231):

sys/arch/arm/acpi/acpi_platform.c: revision 1.18
sys/arch/arm/acpi/files.acpi: revision 1.7
sys/arch/arm/acpi/acpi_simplefb.c: revision 1.1
sys/arch/arm/acpi/acpi_simplefb.h: revision 1.1

Use vcons for simplefb preattach to speed up early console messages.
 1.1.2.1 22-Sep-2019  martin file acpi_simplefb.c was added on branch netbsd-9 on 2019-09-23 07:06:31 +0000
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 24-Jan-2020  martin file acpi_simplefb.c was added on branch phil-wifi on 2020-04-13 08:03:32 +0000
 1.2 10-Oct-2020  jmcneill Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.1 22-Sep-2019  jmcneill branches: 1.1.2; 1.1.10;
Use vcons for simplefb preattach to speed up early console messages.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 22-Sep-2019  martin file acpi_simplefb.h was added on branch phil-wifi on 2020-04-13 08:03:32 +0000
 1.1.2.2 23-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #231):

sys/arch/arm/acpi/acpi_platform.c: revision 1.18
sys/arch/arm/acpi/files.acpi: revision 1.7
sys/arch/arm/acpi/acpi_simplefb.c: revision 1.1
sys/arch/arm/acpi/acpi_simplefb.h: revision 1.1

Use vcons for simplefb preattach to speed up early console messages.
 1.1.2.1 22-Sep-2019  martin file acpi_simplefb.h was added on branch netbsd-9 on 2019-09-23 07:06:31 +0000
 1.2 13-Sep-2020  jmcneill Make Arm MD ACPI code big endian friendly.
 1.1 12-Oct-2018  jmcneill branches: 1.1.2; 1.1.6;
Add helper functions used for parsing ACPI tables before the ACPICA
subsystem can be brought online. ARM64 needs this primarily for
initializing the SBSA UART via SPCR table, reading ARM boot flags from the
FADT, counting CPUs, etc.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 12-Oct-2018  christos file acpi_table.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file acpi_table.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.1 12-Oct-2018  jmcneill branches: 1.1.2; 1.1.6;
Add helper functions used for parsing ACPI tables before the ACPICA
subsystem can be brought online. ARM64 needs this primarily for
initializing the SBSA UART via SPCR table, reading ARM boot flags from the
FADT, counting CPUs, etc.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 12-Oct-2018  christos file acpi_table.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file acpi_table.h was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.33 11-Jan-2025  jmcneill acpi: i2c: only claim child devices with a _CRS or _ADR method

acpi_enter_i2c_devs is too aggressive with claiming child device nodes.
Restrict it to devices with either a _CRS or _ADR method. A driver is
free to claim more if appropriate.

Fixes missing HKEY (LEN0268) device on Thinkpad T14s Gen 6 (X1E).
 1.32 15-Oct-2022  jmcneill branches: 1.32.8;
Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.31 14-Oct-2022  jmcneill Add a PCI resource manager and use it on Arm ACPI platforms.

The Arm ACPI code relied on PCI_NETBSD_CONFIGURE to configure devices that
were not enabled by system firmware. This is not safe to do unless the
firmware explicitly permits it using a device specific method defined in
the PCI firmware spec.

Introduce a new PCI resource manager that discovers what has already been
configured by firmware and allocates from the remaining space. This will
ensure that devices setup by firmware are untouched and only will program
BARs of devices that are not enabled at boot time.

The current implementation assumes that the parent PCI-PCI bridge's
are already configured. A worthwhile improvement in the future would be
to support programming windows for bridges that are not fully configured.
 1.30 13-Aug-2022  jmcneill Add "nopcimsi" boot option to force legacy INTx only mode.
 1.29 13-Aug-2022  jmcneill acpipchb: Add a kernel cmdline option to skip PCI resource assignment.

Passing "nopciconf" to the kernel will force acpipchb to skip PCI
resource assignment.
 1.28 10-Aug-2021  jmcneill Disable MSI if the linux,pcie-nomsi flag is present
 1.27 07-Aug-2021  jmcneill arm: acpi: Add support for SMCCC based PCI config access.
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 12-May-2021  thorpej branches: 1.25.4;
Pass along our devhandle to the PCI bus instance we attach.
 1.24 24-Apr-2021  thorpej branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.23 26-Jan-2021  jmcneill branches: 1.23.2;
acpipchb is a bus, so claim all child ACPI device nodes
 1.22 06-Dec-2020  jmcneill Style fixes. NFC.
 1.21 24-Oct-2020  skrll branches: 1.21.2;
Trailing whitespace
 1.20 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.19 15-Jun-2020  ad Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.18 08-May-2020  jmcneill Try to get the starting bus number from _CRS before falling back to _BBN.
There are apparently cases where the first bus in _CRS does not match the
value of _BBN, and the consensus is that _CRS should take precedence.
 1.17 21-Jan-2020  jmcneill Provide a properly constrained 32-bit DMA tag to ACPI.
 1.16 17-Jan-2020  jmcneill Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.15 29-Dec-2019  jmcneill branches: 1.15.2;
Allow MD code to provide custom bus_dma tags on a per-node basis. On Arm
this is required to return non-coherent bus_dma tags for device nodes with
_CCA=0
 1.14 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.13 15-Oct-2019  jmcneill Amazon Graviton maxdevs quirk no longer required as of pci.c r1.155
 1.12 15-Oct-2019  jmcneill Fix detection of root port resources for Graviton and remove no longer required bridge fixup
 1.11 14-Oct-2019  jmcneill More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.
 1.10 14-Oct-2019  jmcneill Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.
 1.9 25-Jun-2019  jmcneill branches: 1.9.2;
Honour _CRS mem ranges and translation offsets instead of assuming 1:1
mappings. Tested on Overdrive 1000.
 1.8 19-Jun-2019  jmcneill Provide a 64-bit dma tag and use a coherent tag unless CCA=0
 1.7 19-Nov-2018  jmcneill branches: 1.7.4;
On second thought, get rid of "bs_base" from struct bus_space and use a
custom bs_map for acpipchb instead.
 1.6 18-Nov-2018  jmcneill Add support for PCI I/O space.
 1.5 16-Nov-2018  jmcneill Restore acpi_pci_ignore_boot_config lost in previous commit
 1.4 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.3 21-Oct-2018  jmcneill Only configure PCI bus if _DSM rev 1 func 5 ("Ignore PCI boot configuration") returns 1
 1.2 19-Oct-2018  jmcneill branches: 1.2.2;
Add support for PCI Segment Groups.
 1.1 15-Oct-2018  jmcneill Add ARM ACPI PCI support.
 1.2.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2 20-Oct-2018  pgoyette Sync with head
 1.2.2.1 19-Oct-2018  pgoyette file acpipchb.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.7.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.4.2 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 19-Nov-2018  christos file acpipchb.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.9.2.2 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.9.2.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #332):

sys/arch/arm/acpi/acpipchb.c: revision 1.10
sys/arch/arm/acpi/acpipchb.c: revision 1.11
sys/arch/arm/acpi/acpipchb.c: revision 1.12
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.3
sys/arch/arm/acpi/acpi_pci_machdep.h: revision 1.4
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.10
sys/arch/arm/acpi/acpi_pci_machdep.c: revision 1.11

Add quirks for Amazon Graviton PCIe root ports. Configuration space for the
root port is found in a child AMZN0001 resource, not the MCFG table.

-

More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
- Fixup PCIe bridge bus number register on the root port.
- Move quirk handling to acpipchb so it can be applied before the bus
is configured.

-

Fix detection of root port resources for Graviton and remove no longer required bridge fixup
 1.15.2.2 25-Jan-2020  ad Sync with head.
 1.15.2.1 17-Jan-2020  ad Sync with head.
 1.21.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.21.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.23.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.24.4.1 31-May-2021  cjep sync with head
 1.24.2.1 13-May-2021  thorpej Sync with HEAD.
 1.25.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.32.8.1 02-Aug-2025  perseant Sync with HEAD
 1.18 30-Jan-2025  jmcneill arm: acpi: Early return when a CPU is not configured
 1.17 30-Dec-2024  jmcneill arm64: Enable support for low power idle CPU states on ACPI platforms.

The ACPI CPU driver parses the _LPI package on each CPU and builds a
table of supported low power states. A custom cpu_idle() implementation
is registered that uses the time previously spent idle to select an
entry method for low power on the next idle entry.

A boot option, "nolpi", can be used to ignore _LPI and use the normal
WFI idle method.

This decreases the battery discharge rate on my Snapdragon X1E laptop from
~17W to ~10W when idle.
 1.16 30-Jun-2024  jmcneill aarch64: Add NUMA awareness for ACPI systems with SRAT tables.

On an Ampere Altra w/ hemisphere mode enabled:

[ 1.0000000] cpu0: package 16, core 0, smt 0, numa 0
[...]
[ 1.0000000] cpu32: package 22, core 0, smt 0, numa 1

[ 1.000004] SRAT: 2 NUMA nodes
[ 1.000004] SRAT: node 0 memory range 0 (0x88300000 - 0x88400000 flags 1)
[ 1.000004] SRAT: node 0 memory range 1 (0x90000000 - 0x100000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 2 (0x80000000000 - 0x80080000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 3 (0x80100000000 - 0x81000000000 flags 1)
[ 1.000004] SRAT: node 1 memory range 0 (0xc0000000000 - 0xc1000000000 flags 1)
 1.15 09-May-2024  pho branches: 1.15.2;
kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.
 1.14 16-May-2022  jmcneill tprof: armv8: Only attach to known PMU types.
 1.13 25-Nov-2021  skrll Improve error handling.

Hypervisors can return a PMCR.N of 0.
 1.12 24-Nov-2021  jmcneill arm64: acpi: Set capacity_dmips_mhz for CPUs

The GICC structure describes a relative power efficiency for each
processor. Use this value as-is for the capacity_dmips_mhz value of a
cpu. This makes the assumption that "more efficient" means "slower".
 1.11 17-Oct-2021  jmcneill Fix primary CPU detection in cpu_acpi_tprof_intr_establish
 1.10 23-Jan-2021  jmcneill fit in 80 columns
 1.9 03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.8 15-Feb-2020  skrll branches: 1.8.6;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.7 19-Oct-2019  jmcneill branches: 1.7.2;
Increase aarch64 MAXCPUS to 256.
 1.6 23-May-2019  ryo branches: 1.6.2; 1.6.4;
fix build without options MULTIPROCESSOR
 1.5 05-Dec-2018  jmcneill Add CPU performance counter support
 1.4 19-Oct-2018  jmcneill branches: 1.4.2;
Store the ACPI Processor UID in struct cpu_info
 1.3 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.2 16-Oct-2018  jmcneill Only attach to usable processors
 1.1 12-Oct-2018  jmcneill Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.4.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4.2.2 20-Oct-2018  pgoyette Sync with head
 1.4.2.1 19-Oct-2018  pgoyette file cpu_acpi.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.6.4.1 23-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #359):

sys/arch/aarch64/aarch64/locore.S: revision 1.42
sys/arch/aarch64/aarch64/locore.S: revision 1.43
sys/arch/aarch64/aarch64/locore.S: revision 1.44
sys/arch/arm/fdt/cpu_fdt.c: revision 1.28
sys/arch/aarch64/include/cpu.h: revision 1.14
sys/arch/aarch64/include/param.h: revision 1.12
sys/arch/arm/arm32/cpu.c: revision 1.133
sys/arch/arm/arm32/cpu.c: revision 1.134
sys/arch/arm/include/cpu.h: revision 1.101
sys/arch/arm/acpi/cpu_acpi.c: revision 1.7
sys/arch/aarch64/aarch64/cpu.c: revision 1.23
sys/arch/aarch64/aarch64/cpu.c: revision 1.24
sys/arch/aarch64/aarch64/cpu.c: revision 1.25

Increase aarch64 MAXCPUS to 256.

-

Invalidate dcache before polling AP hatched status

-

Avoid overlap between BP and last AP stack. AP stacks are now in order of
increasing address order.

Spotted by and idea from mlelstv.

-

Use separate cacheline aligned arrays for mbox and hatched as before.

-

cpu_hatched_p only for MULTIPROCESSOR
 1.6.2.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.2.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.2.2 10-Jun-2019  christos Sync with HEAD
 1.6.2.1 23-May-2019  christos file cpu_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.7.2.1 29-Feb-2020  ad Sync with head.
 1.8.6.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.6.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.15.2.2 02-Aug-2025  perseant Sync with HEAD
 1.15.2.1 01-Jul-2024  perseant Sync with HEAD.
 1.13 07-Aug-2021  jmcneill arm: acpi: Add support for SMCCC based PCI config access.
 1.12 07-Dec-2020  jmcneill acpicpu: Add support for ACPI P-states and T-states on Arm.
 1.11 10-Oct-2020  jmcneill branches: 1.11.2;
Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.10 01-Feb-2020  jmcneill Add support for NXP Layerscape PCIe Gen4 (not ECAM compliant)
 1.9 17-Jan-2020  jmcneill Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.8 14-Oct-2019  jmcneill branches: 1.8.2;
Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.7 22-Sep-2019  jmcneill Use vcons for simplefb preattach to speed up early console messages.
 1.6 08-Dec-2018  jmcneill branches: 1.6.4; 1.6.6;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.5 12-Nov-2018  jmcneill Support building kernels with ACPI and no PCI.
 1.4 24-Oct-2018  jmcneill Add driver for ARM Server Base System Architecture (SBSA)-compliant
generic watchdog timers.
 1.3 21-Oct-2018  jmcneill Add GICv3 ACPI attachment glue.
 1.2 15-Oct-2018  jmcneill branches: 1.2.2;
Add ARM ACPI PCI support.
 1.1 12-Oct-2018  jmcneill Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.2.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2 20-Oct-2018  pgoyette Sync with head
 1.2.2.1 15-Oct-2018  pgoyette file files.acpi was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.6.6.2 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.6.6.1 23-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #231):

sys/arch/arm/acpi/acpi_platform.c: revision 1.18
sys/arch/arm/acpi/files.acpi: revision 1.7
sys/arch/arm/acpi/acpi_simplefb.c: revision 1.1
sys/arch/arm/acpi/acpi_simplefb.h: revision 1.1

Use vcons for simplefb preattach to speed up early console messages.
 1.6.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.4.2 10-Jun-2019  christos Sync with HEAD
 1.6.4.1 08-Dec-2018  christos file files.acpi was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.8.2.2 29-Feb-2020  ad Sync with head.
 1.8.2.1 17-Jan-2020  ad Sync with head.
 1.11.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.8 25-Nov-2023  jmcneill gicv2: Fix truncation of GICC / GICD base addresses above 4GB.
 1.7 07-Aug-2021  thorpej branches: 1.7.6;
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 27-Jul-2020  jmcneill branches: 1.5.4;
Skip v2m probe if armgic fails to attach
 1.4 14-Oct-2019  jmcneill Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.3 12-Nov-2018  jmcneill branches: 1.3.4; 1.3.6;
Support building kernels with ACPI and no PCI.
 1.2 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.1 12-Oct-2018  jmcneill branches: 1.1.2;
Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file gic_acpi.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.3.6.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.3.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 12-Nov-2018  christos file gic_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.5.4.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.7.6.1 29-Nov-2023  martin Pull up following revision(s) (requested by jmcneill in ticket #482):

sys/arch/arm/acpi/gic_acpi.c: revision 1.8

gicv2: Fix truncation of GICC / GICD base addresses above 4GB.
 1.1 14-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 14-Oct-2019  martin file gic_v2m_acpi.c was added on branch phil-wifi on 2020-04-13 08:03:32 +0000
 1.1.2.2 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1.2.1 14-Oct-2019  martin file gic_v2m_acpi.c was added on branch netbsd-9 on 2019-10-15 19:40:34 +0000
 1.1 14-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 14-Oct-2019  martin file gic_v2m_acpi.h was added on branch phil-wifi on 2020-04-13 08:03:32 +0000
 1.1.2.2 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1.2.1 14-Oct-2019  martin file gic_v2m_acpi.h was added on branch netbsd-9 on 2019-10-15 19:40:34 +0000
 1.8 23-Dec-2020  jmcneill Future-proof ID_AA64PFR0_EL1.GIC test -- any value other than 0 means that
the GIC CPU interface is supported.
 1.7 13-Feb-2020  jmcneill branches: 1.7.6;
Add support for multiple GICv3 ITS domains.
 1.6 17-Jan-2020  jmcneill Only attach the first ITS for now
 1.5 14-Oct-2019  jmcneill branches: 1.5.2;
Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.4 12-Sep-2019  jmcneill Redistributors with virtual LPI support have larger register spaces. Take
this into consideration when scanning LPI regions.
 1.3 12-Nov-2018  jmcneill branches: 1.3.2; 1.3.6; 1.3.8;
Support building kernels with ACPI and no PCI.
 1.2 09-Nov-2018  jmcneill Add GICv3 ITS support
 1.1 21-Oct-2018  jmcneill Add GICv3 ACPI attachment glue.
 1.3.8.2 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.3.8.1 22-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #227):

sys/arch/arm/acpi/gicv3_acpi.c: revision 1.4

Redistributors with virtual LPI support have larger register spaces. Take
this into consideration when scanning LPI regions.
 1.3.6.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.6.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.6.2 10-Jun-2019  christos Sync with HEAD
 1.3.6.1 12-Nov-2018  christos file gicv3_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.3.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.1 12-Nov-2018  pgoyette file gicv3_acpi.c was added on branch pgoyette-compat on 2018-11-26 01:52:17 +0000
 1.5.2.2 29-Feb-2020  ad Sync with head.
 1.5.2.1 17-Jan-2020  ad Sync with head.
 1.7.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 29-Apr-2019  christos branches: 1.3.2; 1.3.14;
Catch up with constant name change.
 1.2 16-Nov-2018  jmcneill Use intr_establish_xname
 1.1 12-Oct-2018  jmcneill branches: 1.1.2;
Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file gtmr_acpi.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.3.14.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.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 29-Apr-2019  christos file gtmr_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 24-Jan-2023  mlelstv Add support for FIFOs and hardware flow-control to plcom driver.
Add a PLCOM_TYPE_GENERIC_UART variant to match SBSA requirements.
 1.3 25-Apr-2020  jmcneill Enable HW FIFO
 1.2 16-Nov-2018  jmcneill branches: 1.2.4;
Use acpi_intr_establish
 1.1 12-Oct-2018  jmcneill branches: 1.1.2;
Add ACPI platform glue and basic device drivers (CPU, GIC, Generic Timer,
SBSA UART).
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file plcom_acpi.c was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 16-Nov-2018  christos file plcom_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.2 24-Oct-2018  jmcneill branches: 1.2.2; 1.2.6;
Avoid overflow when calculating watchdog offset.
 1.1 24-Oct-2018  jmcneill Add driver for ARM Server Base System Architecture (SBSA)-compliant
generic watchdog timers.
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 24-Oct-2018  christos file sbsawdt_acpi.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.2.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.1 24-Oct-2018  pgoyette file sbsawdt_acpi.c was added on branch pgoyette-compat on 2018-11-26 01:52:17 +0000
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() to match the clock
type rather than calling of_compatible() on different sets of compatible
strings.
 1.4 18-Oct-2019  skrll branches: 1.4.8;
Use PRIxBUSADDR
 1.3 01-Oct-2019  chs in many device attach paths, allocate memory with KM_SLEEP instead of KM_NOSLEEP
and remove code to handle failures that can no longer happen.
 1.2 17-Jan-2019  skrll branches: 1.2.4;
KNF
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_clkmgr.c was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 17-Jan-2019  christos file cycv_clkmgr.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.4.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 20-Mar-2020  skrll branches: 1.5.4;
Provide a sc_intr_cardmask to restore the value used to that before

http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html
 1.4 18-Oct-2019  skrll Use PRIxBUSADDR
 1.3 24-May-2019  jmcneill branches: 1.3.2; 1.3.4;
Use standard DT bindings for card detect
 1.2 20-May-2019  aymeric use NULL instead of cycv_dwcmmc_card_detect() for sc_card_detect.
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_dwcmmc.c was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.3.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #797):

sys/arch/arm/altera/cycv_dwcmmc.c: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.10

Provide a sc_intr_cardmask to restore the value used to that before
http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html
 1.3.2.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 24-May-2019  christos file cycv_dwcmmc.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.5.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 10-Aug-2024  skrll awge(4): MP improvements

Remove the non-MP-safe scaffolding and make the locking less
coarse.
 1.6 29-Jan-2021  skrll branches: 1.6.24;
fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 21-Jul-2019  mrg branches: 1.4.10;
move DWCGMAC_MPSAFE into dwc_gmac_var.h and introduce an
additional define that is 0 or FDT_INTR_MPSAFE that the
frontends can use when passing to fdtbus_intr_establish().

with NET_MPSAFE enabled, this avoids hangs seen on rock64,
as well as finishing the MPSAFE port for this driver.

XXX: still don't know why the existing hangs occur.
 1.3 08-Jul-2019  msaitoh Add rnd(9) support.
 1.2 23-Feb-2019  martin branches: 1.2.4;
Adjust all callers of dwc_gmac_attach, pass MII_PHY_ANY for now.
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_gmac.c was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 23-Feb-2019  christos file cycv_gmac.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.4.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.24.1 02-Aug-2025  perseant Sync with HEAD
 1.1 19-Sep-2018  aymeric branches: 1.1.2; 1.1.6;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Sep-2018  christos file cycv_intr.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_intr.h was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.20 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.19 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.18 24-Apr-2021  thorpej Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 04-Feb-2021  thorpej branches: 1.17.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.16 29-Jan-2021  rin Fix build without MULTIPROCESSOR.
 1.15 27-Nov-2020  skrll cpu_hatched_p does necessary memory barrier so remove membar_consumer
calls from before cpu_hatched_p calls.
 1.14 28-Sep-2020  jmcneill branches: 1.14.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.13 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.12 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.11 20-May-2019  aymeric branches: 1.11.2; 1.11.6;
make CPU 1 bootstrapping work even if the kernel is not loaded close to PA 0.

More precisely, we used "B cpu_mpstart", which worked for small addresses and
thus does not work in the EFI case.
It is now replaced by a "LDR PC, =cpu_mpstart", which works for arbitrary
addresses.
 1.10 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.9 02-Nov-2018  aymeric Adapt secondary CPU bootstrapping to the new generic startup code.
 1.8 02-Nov-2018  aymeric Make early console work.
 1.7 02-Nov-2018  aymeric . fix important typo which prevented enabling the SCU
. invalidate all cache tags of the SCU
 1.6 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.5 28-Oct-2018  aymeric Use virtual addresses where virtual addresses are expected.
 1.4 20-Oct-2018  skrll Clean up around cpu_ttb and fix a bunch of builds
 1.3 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.2 14-Oct-2018  aymeric Make the DE0 NanoSoC work also in big-endian mode
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.3 20-Oct-2018  pgoyette Sync with head
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_platform.c was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.11.6.1 29-Feb-2020  ad Sync with head.
 1.11.2.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.2.2 10-Jun-2019  christos Sync with HEAD
 1.11.2.1 20-May-2019  christos file cycv_platform.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.14.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.14.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.17.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.2 18-Oct-2018  skrll branches: 1.2.4;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.3 20-Oct-2018  pgoyette Sync with head
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_reg.h was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 18-Oct-2018  christos file cycv_reg.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.5 01-Jan-2022  andvar s/coudn/couldn/ and s/couln/couldn/ in comment and log messages.
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 18-Oct-2019  skrll branches: 1.3.8;
Use PRIxBUSADDR
 1.2 14-Oct-2018  aymeric branches: 1.2.4;
Fix off-by-one when computing reset register address
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.3 20-Oct-2018  pgoyette Sync with head
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_rstmgr.c was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 14-Oct-2018  christos file cycv_rstmgr.c was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.3.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 19-Sep-2018  aymeric branches: 1.1.2; 1.1.6;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Sep-2018  christos file cycv_var.h was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file cycv_var.h was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.3 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.2 22-Nov-2018  aymeric branches: 1.2.4;
Switch the DE0 Nano SoC to the GENERIC kernel.
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file files.altera was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 22-Nov-2018  christos file files.altera was added on branch phil-wifi on 2019-06-10 22:05:50 +0000
 1.18 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.17 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.16 26-Nov-2015  jmcneill branches: 1.16.16; 1.16.18; 1.16.20;
disable watchdog at startup
 1.15 21-Nov-2015  jmcneill Add watchdog timer support.
 1.14 08-Aug-2015  jmcneill don't rely on u-boot to setup CARD and BOOT pins
 1.13 04-Aug-2015  jmcneill Enable UHS-I support
 1.12 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.11 03-Apr-2015  jmcneill branches: 1.11.2;
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.10 29-Mar-2015  jmcneill Use shared armv7_generic_space
 1.9 08-Mar-2015  jmcneill branches: 1.9.2;
Add Amlogic SD/MMC driver.
 1.8 07-Mar-2015  jmcneill clk helpers for sdhc and rng
 1.7 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.6 01-Mar-2015  jmcneill remove debug printf
 1.5 28-Feb-2015  jmcneill invert gpio OEN bit logic, now usb works
 1.4 28-Feb-2015  jmcneill more usb phy / clk init
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill derive cpu freq from cbus regs
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.9.2.3 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #658):
sys/arch/arm/amlogic/amlogic_board.c: revision 1.11
sys/arch/arm/amlogic/amlogic_crureg.h: revision 1.8
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.2
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.9.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.9.2.1 08-Mar-2015  snj file amlogic_board.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.11.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.2.4 22-Sep-2015  skrll Sync with HEAD
 1.11.2.3 06-Jun-2015  skrll Sync with HEAD
 1.11.2.2 06-Apr-2015  skrll Sync with HEAD
 1.11.2.1 03-Apr-2015  skrll file amlogic_board.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.16.20.1 10-Jun-2019  christos Sync with HEAD
 1.16.18.2 26-Jan-2019  pgoyette Sync with HEAD
 1.16.18.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.16.16.2 03-Dec-2017  jdolecek update from HEAD
 1.16.16.1 26-Nov-2015  jdolecek file amlogic_board.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 21-Mar-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Basic framebuffer console support. Work in progress.
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 21-Mar-2015  jdolecek file amlogic_canvasreg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 21-Mar-2015  skrll file amlogic_canvasreg.h was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 21-Mar-2015  snj file amlogic_canvasreg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.7 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.6 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.5 03-Apr-2015  jmcneill branches: 1.5.2; 1.5.4; 1.5.10; 1.5.18; 1.5.20; 1.5.22;
Fix cnmagic handling, now I can enter ddb from serial console.
 1.4 03-Mar-2015  jmcneill branches: 1.4.2;
use irq instead of polling hack now that gic is fixed
 1.3 01-Mar-2015  jmcneill UART TTY support.
 1.2 27-Feb-2015  jmcneill Add basic serial console support.
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.4.2.3 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #659):
sys/arch/arm/amlogic/amlogic_com.c: revision 1.5
sys/arch/arm/amlogic/amlogic_comreg.h: revision 1.4
Fix cnmagic handling, now I can enter ddb from serial console.
 1.4.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.4.2.1 03-Mar-2015  snj file amlogic_com.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.5.22.1 10-Jun-2019  christos Sync with HEAD
 1.5.20.2 26-Jan-2019  pgoyette Sync with HEAD
 1.5.20.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.5.18.2 03-Dec-2017  jdolecek update from HEAD
 1.5.18.1 03-Apr-2015  jdolecek file amlogic_com.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.5.10.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.5.4.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.5.4.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.5.2.2 06-Apr-2015  skrll Sync with HEAD
 1.5.2.1 03-Apr-2015  skrll file amlogic_com.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.5 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.4 03-Apr-2015  jmcneill branches: 1.4.2; 1.4.18; 1.4.20; 1.4.22;
Fix cnmagic handling, now I can enter ddb from serial console.
 1.3 01-Mar-2015  jmcneill branches: 1.3.2;
UART TTY support.
 1.2 27-Feb-2015  jmcneill Add basic serial console support.
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.3.2.3 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #659):
sys/arch/arm/amlogic/amlogic_com.c: revision 1.5
sys/arch/arm/amlogic/amlogic_comreg.h: revision 1.4
Fix cnmagic handling, now I can enter ddb from serial console.
 1.3.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.3.2.1 01-Mar-2015  snj file amlogic_comreg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.4.22.1 10-Jun-2019  christos Sync with HEAD
 1.4.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.4.18.2 03-Dec-2017  jdolecek update from HEAD
 1.4.18.1 03-Apr-2015  jdolecek file amlogic_comreg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.4.2.2 06-Apr-2015  skrll Sync with HEAD
 1.4.2.1 03-Apr-2015  skrll file amlogic_comreg.h was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 27-Feb-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Add basic serial console support.
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 27-Feb-2015  jdolecek file amlogic_comvar.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 27-Feb-2015  skrll file amlogic_comvar.h was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 27-Feb-2015  snj file amlogic_comvar.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.7 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.6 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.5 29-Nov-2015  jmcneill branches: 1.5.16; 1.5.18; 1.5.20;
Fix A9 periph clock when selecting frequencies below 1200MHz. Remove
frequencies below 312MHz as they require special handling. We can now
choose between 1536 1488 1320 1200 1008 816 720 600 504 408 312.
 1.4 29-Nov-2015  jmcneill Retire CPUFREQ option, instead just pick the highest available frequency
at boot. Update the list of supported frequencies to match the list of dvfs
frequencies from the meson8b dts, capped at 1.5GHz. The highest available
frequency is changed from 1512MHz to 1536MHz.
 1.3 29-Mar-2015  jmcneill branches: 1.3.2;
Use shared armv7_generic_space
 1.2 17-Mar-2015  jmcneill branches: 1.2.2;
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.

The speed can still be scaled down with machdep.cpu sysctls.
 1.1 05-Mar-2015  jmcneill CPU frequency scaling support, enough to bump my ODROID-C1 up to the
advertised 1.5GHz.
 1.2.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.2.2.1 17-Mar-2015  snj file amlogic_cpufreq.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.3.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.2.2 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 29-Mar-2015  skrll file amlogic_cpufreq.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.5.20.1 10-Jun-2019  christos Sync with HEAD
 1.5.18.2 26-Jan-2019  pgoyette Sync with HEAD
 1.5.18.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.5.16.2 03-Dec-2017  jdolecek update from HEAD
 1.5.16.1 29-Nov-2015  jdolecek file amlogic_cpufreq.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.14 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.13 29-Nov-2015  jmcneill branches: 1.13.16; 1.13.18; 1.13.20;
Fix A9 periph clock when selecting frequencies below 1200MHz. Remove
frequencies below 312MHz as they require special handling. We can now
choose between 1536 1488 1320 1200 1008 816 720 600 504 408 312.
 1.12 29-Nov-2015  jmcneill Retire CPUFREQ option, instead just pick the highest available frequency
at boot. Update the list of supported frequencies to match the list of dvfs
frequencies from the meson8b dts, capped at 1.5GHz. The highest available
frequency is changed from 1512MHz to 1536MHz.
 1.11 29-May-2015  jmcneill Fix pin group mappings and non-DIAGNOSTIC kernel builds, from anon ymous.
 1.10 25-Apr-2015  jmcneill Add Amlogic GPIO driver.
 1.9 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.8 03-Apr-2015  jmcneill branches: 1.8.2;
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.7 08-Mar-2015  jmcneill branches: 1.7.2;
Add Amlogic SD/MMC driver.
 1.6 07-Mar-2015  jmcneill clk helpers for sdhc and rng
 1.5 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.4 28-Feb-2015  jmcneill more usb phy / clk init
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill implement amlogic_reset
 1.1 27-Feb-2015  jmcneill derive cpu freq from cbus regs
 1.7.2.4 30-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #723):
sys/arch/arm/amlogic/amlogic_crureg.h: revisions 1.9, 1.10
sys/arch/arm/amlogic/amlogic_gpio.c: revision 1.1
sys/arch/arm/amlogic/amlogic_io.c: revision 1.11
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.11
sys/arch/arm/amlogic/files.amlogic: revision 1.12
sys/arch/evbarm/conf/ODROID-C1: revision 1.18
Add Amlogic GPIO driver.
 1.7.2.3 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #658):
sys/arch/arm/amlogic/amlogic_board.c: revision 1.11
sys/arch/arm/amlogic/amlogic_crureg.h: revision 1.8
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.2
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.7.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.7.2.1 08-Mar-2015  snj file amlogic_crureg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.8.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.8.2.3 06-Jun-2015  skrll Sync with HEAD
 1.8.2.2 06-Apr-2015  skrll Sync with HEAD
 1.8.2.1 03-Apr-2015  skrll file amlogic_crureg.h was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.13.20.1 10-Jun-2019  christos Sync with HEAD
 1.13.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.13.16.2 03-Dec-2017  jdolecek update from HEAD
 1.13.16.1 29-Nov-2015  jdolecek file amlogic_crureg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.7 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.6 23-Apr-2016  skrll branches: 1.6.16; 1.6.18; 1.6.20;
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.5 30-Aug-2015  skrll Update for latest dwc2
 1.4 30-Jul-2015  skrll Use IPL_VM for dwc2_intr and mark as MP safe where possible.
 1.3 22-Jul-2015  skrll Trailing whitespace.
 1.2 28-Feb-2015  jmcneill branches: 1.2.2; 1.2.4;
more usb phy / clk init
 1.1 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2.4.3 22-Sep-2015  skrll Sync with HEAD
 1.2.4.2 06-Apr-2015  skrll Sync with HEAD
 1.2.4.1 28-Feb-2015  skrll file amlogic_dwctwo.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.2.2.3 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.2.2.2 21-Mar-2015  snj branches: 1.2.2.2.4;
Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.2.2.1 28-Feb-2015  snj file amlogic_dwctwo.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.2.2.2.4.1 07-Sep-2016  skrll Adapt to branch
 1.6.20.1 10-Jun-2019  christos Sync with HEAD
 1.6.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.6.16.2 03-Dec-2017  jdolecek update from HEAD
 1.6.16.1 23-Apr-2016  jdolecek file amlogic_dwctwo.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.6 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.5 03-Apr-2015  jmcneill branches: 1.5.2; 1.5.18; 1.5.20; 1.5.22;
Allow for choosing between 16 and 24bpp framebuffers. The default is now
16 instead of 24. Set 'fb.depth=16' or 'fb.depth=24' on kernel command-line
to explicitly select a colour depth.
 1.4 26-Mar-2015  joerg amlogic_genfb_hdmi_write_4 is currently unused, mark it as such.
 1.3 22-Mar-2015  jmcneill Support interlaced modes.
 1.2 22-Mar-2015  jmcneill Use the hardware scaler to do overscan compensation. You can set the
scaling value as a percentage in two ways -- either as a kernel cmdline
parameter (fb.scale=<pct>) or at runtime with sysctl (hw.genfb0.scale=<pct>).

Setting scale=100 disables the scaler, any other value enables it. For
the cheap TV on my desk, scale=95 gives me a fully visible framebuffer.
 1.1 21-Mar-2015  jmcneill branches: 1.1.2;
Basic framebuffer console support. Work in progress.
 1.1.2.5 15-May-2015  snj Pull up following revision(s) (requested by joerg in ticket #772):
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.4
sys/arch/arm/arm/disassem.c: revision 1.25
sys/arch/arm/omap/am335x_cm_padconf.c: revision 1.3
sys/arch/arm/omap/sitara_cm.h: revision 1.2
sys/dev/ic/i82557var.h: revision 1.51
sys/dev/ic/rtl8169.c: revision 1.143
sys/dev/ieee1394/fwcrom.c: revision 1.17
sys/external/bsd/dwc2/dwc2.c: revision 1.32
dwc2_hubd appears to be unused so #if 0 it in order to appease clang
--
Preserve const.
--
No reason not to make the string const.
--
Drop unnecessary-but-harmful casts.
--
Replace void * cast with proper __UNVOLATILE.
--
Preserve const.
--
amlogic_genfb_hdmi_write_4 is currently unused, mark it as such.
 1.1.2.4 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #661):
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.5
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.3
sys/arch/evbarm/amlogic/amlogic_machdep.c: revision 1.20
Allow for choosing between 16 and 24bpp framebuffers. The default is now
16 instead of 24. Set 'fb.depth=16' or 'fb.depth=24' on kernel command-line
to explicitly select a colour depth.
 1.1.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #637):
sys/arch/arm/amlogic/amlogic_genfb.c: revisions 1.2, 1.3
sys/arch/evbarm/amlogic/amlogic_machdep.c: revision 1.18
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.2
Use the hardware scaler to do overscan compensation. You can set the
scaling value as a percentage in two ways -- either as a kernel cmdline
parameter (fb.scale=<pct>) or at runtime with sysctl (hw.genfb0.scale=<pct>).
Setting scale=100 disables the scaler, any other value enables it. For
the cheap TV on my desk, scale=95 gives me a fully visible framebuffer.
--
Support interlaced modes.
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 21-Mar-2015  snj file amlogic_genfb.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.5.22.1 10-Jun-2019  christos Sync with HEAD
 1.5.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.5.18.2 03-Dec-2017  jdolecek update from HEAD
 1.5.18.1 03-Apr-2015  jdolecek file amlogic_genfb.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.5.2.2 06-Apr-2015  skrll Sync with HEAD
 1.5.2.1 03-Apr-2015  skrll file amlogic_genfb.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.3 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.2 04-Mar-2015  jmcneill branches: 1.2.2; 1.2.4; 1.2.20; 1.2.22; 1.2.24;
IST_EDGE for eth
 1.1 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.2.24.1 10-Jun-2019  christos Sync with HEAD
 1.2.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.2.20.2 03-Dec-2017  jdolecek update from HEAD
 1.2.20.1 04-Mar-2015  jdolecek file amlogic_gmac.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2.4.4 14-Jun-2016  skrll Include opt_net_mpsafe.h
 1.2.4.3 12-Jun-2016  skrll First pass at making this driver and attachments NET_MPSAFE aware.

I've not tested this yet.
 1.2.4.2 06-Apr-2015  skrll Sync with HEAD
 1.2.4.1 04-Mar-2015  skrll file amlogic_gmac.c was added on branch nick-nhusb on 2015-04-06 15:17:51 +0000
 1.2.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.2.2.1 04-Mar-2015  snj file amlogic_gmac.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.3 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.2 29-May-2015  jmcneill branches: 1.2.2; 1.2.18; 1.2.20; 1.2.22;
Fix pin group mappings and non-DIAGNOSTIC kernel builds, from anon ymous.
 1.1 25-Apr-2015  jmcneill branches: 1.1.2;
Add Amlogic GPIO driver.
 1.1.2.2 30-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #723):
sys/arch/arm/amlogic/amlogic_crureg.h: revisions 1.9, 1.10
sys/arch/arm/amlogic/amlogic_gpio.c: revision 1.1
sys/arch/arm/amlogic/amlogic_io.c: revision 1.11
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.11
sys/arch/arm/amlogic/files.amlogic: revision 1.12
sys/arch/evbarm/conf/ODROID-C1: revision 1.18
Add Amlogic GPIO driver.
 1.1.2.1 25-Apr-2015  snj file amlogic_gpio.c was added on branch netbsd-7 on 2015-04-30 19:34:40 +0000
 1.2.22.1 10-Jun-2019  christos Sync with HEAD
 1.2.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 29-May-2015  jdolecek file amlogic_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 29-May-2015  skrll file amlogic_gpio.c was added on branch nick-nhusb on 2015-06-06 14:39:55 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 21-Mar-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Basic framebuffer console support. Work in progress.
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 21-Mar-2015  jdolecek file amlogic_hdmireg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 21-Mar-2015  skrll file amlogic_hdmireg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 21-Mar-2015  snj file amlogic_hdmireg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.7 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.6 22-Mar-2015  jmcneill branches: 1.6.2; 1.6.18; 1.6.20; 1.6.22;
Add Amlogic RTC driver, from Anon Ymous
 1.5 07-Mar-2015  jmcneill branches: 1.5.2;
add SDIO and SDHC irqs
 1.4 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill increase pic max sources
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.5.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.5.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.5.2.1 07-Mar-2015  snj file amlogic_intr.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.6.22.1 10-Jun-2019  christos Sync with HEAD
 1.6.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.6.18.2 03-Dec-2017  jdolecek update from HEAD
 1.6.18.1 22-Mar-2015  jdolecek file amlogic_intr.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.6.2.2 06-Apr-2015  skrll Sync with HEAD
 1.6.2.1 22-Mar-2015  skrll file amlogic_intr.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.15 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.14 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.13 21-Nov-2015  jmcneill branches: 1.13.16; 1.13.18; 1.13.20;
Add watchdog timer support.
 1.12 08-Aug-2015  jmcneill We have two SD controllers with different capabilities. Use the fast "SDHC"
controller for the card that the bootloader marked as the boot device,
and the slower "SDIO" controller for the other card if present.

The controller to slot mappings can be wired down in the kernel config
with the "port" locator if necessary.
 1.11 25-Apr-2015  jmcneill Add Amlogic GPIO driver.
 1.10 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.9 29-Mar-2015  jmcneill branches: 1.9.2;
Use shared armv7_generic_space
 1.8 22-Mar-2015  jmcneill Add Amlogic RTC driver, from Anon Ymous
 1.7 21-Mar-2015  jmcneill branches: 1.7.2;
Basic framebuffer console support. Work in progress.
 1.6 08-Mar-2015  jmcneill Add Amlogic SD/MMC driver.
 1.5 07-Mar-2015  jmcneill add hardware rng support
 1.4 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill fix amlogiccom locator name
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.7.2.4 30-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #723):
sys/arch/arm/amlogic/amlogic_crureg.h: revisions 1.9, 1.10
sys/arch/arm/amlogic/amlogic_gpio.c: revision 1.1
sys/arch/arm/amlogic/amlogic_io.c: revision 1.11
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.11
sys/arch/arm/amlogic/files.amlogic: revision 1.12
sys/arch/evbarm/conf/ODROID-C1: revision 1.18
Add Amlogic GPIO driver.
 1.7.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.7.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.7.2.1 21-Mar-2015  snj file amlogic_io.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.9.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.9.2.4 22-Sep-2015  skrll Sync with HEAD
 1.9.2.3 06-Jun-2015  skrll Sync with HEAD
 1.9.2.2 06-Apr-2015  skrll Sync with HEAD
 1.9.2.1 29-Mar-2015  skrll file amlogic_io.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.13.20.1 10-Jun-2019  christos Sync with HEAD
 1.13.18.2 26-Jan-2019  pgoyette Sync with HEAD
 1.13.18.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.13.16.2 03-Dec-2017  jdolecek update from HEAD
 1.13.16.1 21-Nov-2015  jdolecek file amlogic_io.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.13 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.12 08-Aug-2015  jmcneill branches: 1.12.16; 1.12.18; 1.12.20;
Pass boot device to amlogicsdhc and amlogicsdio drivers.
 1.11 25-Apr-2015  jmcneill Add Amlogic GPIO driver.
 1.10 22-Mar-2015  jmcneill branches: 1.10.2;
Add Amlogic RTC driver, from Anon Ymous
 1.9 21-Mar-2015  jmcneill branches: 1.9.2;
Basic framebuffer console support. Work in progress.
 1.8 08-Mar-2015  jmcneill Add Amlogic SD/MMC driver.
 1.7 07-Mar-2015  jmcneill clk helpers for sdhc and rng
 1.6 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.5 01-Mar-2015  jmcneill auto-detect RAM size
 1.4 01-Mar-2015  jmcneill ODROID-C1 SMP support.
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill derive cpu freq from cbus regs
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.9.2.4 30-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #723):
sys/arch/arm/amlogic/amlogic_crureg.h: revisions 1.9, 1.10
sys/arch/arm/amlogic/amlogic_gpio.c: revision 1.1
sys/arch/arm/amlogic/amlogic_io.c: revision 1.11
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.11
sys/arch/arm/amlogic/files.amlogic: revision 1.12
sys/arch/evbarm/conf/ODROID-C1: revision 1.18
Add Amlogic GPIO driver.
 1.9.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.9.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.9.2.1 21-Mar-2015  snj file amlogic_reg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.10.2.4 22-Sep-2015  skrll Sync with HEAD
 1.10.2.3 06-Jun-2015  skrll Sync with HEAD
 1.10.2.2 06-Apr-2015  skrll Sync with HEAD
 1.10.2.1 22-Mar-2015  skrll file amlogic_reg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.12.20.1 10-Jun-2019  christos Sync with HEAD
 1.12.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.12.16.2 03-Dec-2017  jdolecek update from HEAD
 1.12.16.1 08-Aug-2015  jdolecek file amlogic_reg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.5 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.4 03-Sep-2018  riastradh Simplify amlogic rng.

Compile-tested only, but this is basically the same as a bunch of
other RNG driver simplifications I made a while back.
 1.3 13-Apr-2015  riastradh branches: 1.3.16; 1.3.18; 1.3.20;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.2 03-Apr-2015  jmcneill branches: 1.2.2;
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.1 07-Mar-2015  jmcneill branches: 1.1.2;
add hardware rng support
 1.1.2.3 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #658):
sys/arch/arm/amlogic/amlogic_board.c: revision 1.11
sys/arch/arm/amlogic/amlogic_crureg.h: revision 1.8
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.2
Use a callback (with ugly lock dance from bcm2835_rng) instead of callout.
Make sure the ring oscillator is enabled as well.
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 07-Mar-2015  snj file amlogic_rng.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 03-Apr-2015  skrll file amlogic_rng.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.3.20.1 10-Jun-2019  christos Sync with HEAD
 1.3.18.2 26-Jan-2019  pgoyette Sync with HEAD
 1.3.18.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.16.2 03-Dec-2017  jdolecek update from HEAD
 1.3.16.1 13-Apr-2015  jdolecek file amlogic_rng.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 22-Mar-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Add Amlogic RTC driver, from Anon Ymous
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 22-Mar-2015  jdolecek file amlogic_rtc.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 22-Mar-2015  skrll file amlogic_rtc.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1.2.2 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.1.2.1 22-Mar-2015  snj file amlogic_rtc.c was added on branch netbsd-7 on 2015-03-25 17:13:25 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 22-Mar-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Add Amlogic RTC driver, from Anon Ymous
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 22-Mar-2015  jdolecek file amlogic_rtcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 22-Mar-2015  skrll file amlogic_rtcreg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1.2.2 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.1.2.1 22-Mar-2015  snj file amlogic_rtcreg.h was added on branch netbsd-7 on 2015-03-25 17:13:25 +0000
 1.13 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.12 29-Oct-2015  jmcneill branches: 1.12.16; 1.12.18; 1.12.20;
only advertise HS200 and 8-bit mode on the eMMC slot
 1.11 08-Aug-2015  jmcneill Add support for UHS-I / MMC HS200 tuning process
 1.10 08-Aug-2015  jmcneill hook up card detect gpio
 1.9 08-Aug-2015  jmcneill We have two SD controllers with different capabilities. Use the fast "SDHC"
controller for the card that the bootloader marked as the boot device,
and the slower "SDIO" controller for the other card if present.

The controller to slot mappings can be wired down in the kernel config
with the "port" locator if necessary.
 1.8 08-Aug-2015  jmcneill advertise HS200 support
 1.7 04-Aug-2015  jmcneill Enable UHS-I support
 1.6 19-Apr-2015  jmcneill fix size of dmamem map
 1.5 19-Apr-2015  jmcneill The Amlogic SDHC controller doesn't support SG DMA. When we advertise
DMA but not SG DMA support, the sdmmc layer breaks up transfers into
multiple PAGE_SIZE (8KB here) transfers.

Remove the DMA capability flag and do transfers through a MAXPHYS-sized
buffer instead. This lets us do larger transfers and even with the memcpy,
still a significant win for performance.

Before: 134217728 bytes transferred in 15.301 secs (8771827 bytes/sec)
After: 134217728 bytes transferred in 8.834 secs (15193313 bytes/sec)
 1.4 17-Apr-2015  jmcneill port number is required
 1.3 16-Mar-2015  jmcneill branches: 1.3.2; 1.3.4;
sdhc stability improvements
 1.2 08-Mar-2015  jmcneill relax an assertion when transferring data; dma seg length doesnt have to be exactly the length of the data transfer, but it needs to be at least as big
 1.1 08-Mar-2015  jmcneill Add Amlogic SD/MMC driver.
 1.3.4.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.4.4 22-Sep-2015  skrll Sync with HEAD
 1.3.4.3 06-Jun-2015  skrll Sync with HEAD
 1.3.4.2 06-Apr-2015  skrll Sync with HEAD
 1.3.4.1 16-Mar-2015  skrll file amlogic_sdhc.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.3.2.3 23-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #714):
sys/arch/arm/amlogic/amlogic_sdhc.c: revisions 1.4-1.6
sys/arch/evbarm/conf/ODROID-C1: revision 1.17
port number is required
--
The Amlogic SDHC controller doesn't support SG DMA. When we advertise
DMA but not SG DMA support, the sdmmc layer breaks up transfers into
multiple PAGE_SIZE (8KB here) transfers.

Remove the DMA capability flag and do transfers through a MAXPHYS-sized
buffer instead. This lets us do larger transfers and even with the memcpy,
still a significant win for performance.

Before: 134217728 bytes transferred in 15.301 secs (8771827 bytes/sec)
After: 134217728 bytes transferred in 8.834 secs (15193313 bytes/sec)
--
fix size of dmamem map
 1.3.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.3.2.1 16-Mar-2015  snj file amlogic_sdhc.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.12.20.1 10-Jun-2019  christos Sync with HEAD
 1.12.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.12.16.2 03-Dec-2017  jdolecek update from HEAD
 1.12.16.1 29-Oct-2015  jdolecek file amlogic_sdhc.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 08-Mar-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.20; 1.1.22; 1.1.24;
Add Amlogic SD/MMC driver.
 1.1.24.1 10-Jun-2019  christos Sync with HEAD
 1.1.22.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 08-Mar-2015  jdolecek file amlogic_sdhcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.4.2 06-Apr-2015  skrll Sync with HEAD
 1.1.4.1 08-Mar-2015  skrll file amlogic_sdhcreg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 08-Mar-2015  snj file amlogic_sdhcreg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.6 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.5 08-Aug-2015  jmcneill branches: 1.5.16; 1.5.18; 1.5.20;
hook up card detect gpio
 1.4 08-Aug-2015  jmcneill We have two SD controllers with different capabilities. Use the fast "SDHC"
controller for the card that the bootloader marked as the boot device,
and the slower "SDIO" controller for the other card if present.

The controller to slot mappings can be wired down in the kernel config
with the "port" locator if necessary.
 1.3 08-Aug-2015  jmcneill set max clock to ref freq
 1.2 19-Apr-2015  jmcneill branches: 1.2.2;
Like SDHC, SDIO also doesn't support SG DMA.

Remove the DMA capability flag and do transfers through a MAXPHYS-sized
buffer instead. This lets us do larger transfers and even with the memcpy,
still a significant win for performance.
 1.1 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.2.2.3 22-Sep-2015  skrll Sync with HEAD
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 19-Apr-2015  skrll file amlogic_sdio.c was added on branch nick-nhusb on 2015-06-06 14:39:55 +0000
 1.5.20.1 10-Jun-2019  christos Sync with HEAD
 1.5.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.5.16.2 03-Dec-2017  jdolecek update from HEAD
 1.5.16.1 08-Aug-2015  jdolecek file amlogic_sdio.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.2 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.1 19-Apr-2015  jmcneill branches: 1.1.2; 1.1.18; 1.1.20; 1.1.22;
Add a driver for Amlogic "SDIO" MMC controller.
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 19-Apr-2015  jdolecek file amlogic_sdioreg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 19-Apr-2015  skrll file amlogic_sdioreg.h was added on branch nick-nhusb on 2015-06-06 14:39:55 +0000
 1.3 29-Mar-2015  jmcneill Use shared armv7_generic_space
 1.2 25-Feb-2015  joerg branches: 1.2.2;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.2.2.3 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.2.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.2.2.1 25-Feb-2015  snj file amlogic_space.c was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.13 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.12 21-Nov-2015  jmcneill branches: 1.12.16; 1.12.18; 1.12.20;
Add watchdog timer support.
 1.11 04-Aug-2015  jmcneill Enable UHS-I support
 1.10 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.9 29-Mar-2015  jmcneill branches: 1.9.2;
Use shared armv7_generic_space
 1.8 21-Mar-2015  jmcneill branches: 1.8.2;
Basic framebuffer console support. Work in progress.
 1.7 17-Mar-2015  jmcneill Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.

The speed can still be scaled down with machdep.cpu sysctls.
 1.6 08-Mar-2015  jmcneill Add Amlogic SD/MMC driver.
 1.5 07-Mar-2015  jmcneill clk helpers for sdhc and rng
 1.4 05-Mar-2015  jmcneill CPU frequency scaling support, enough to bump my ODROID-C1 up to the
advertised 1.5GHz.
 1.3 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.2 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.8.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.8.2.1 21-Mar-2015  snj file amlogic_var.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.9.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.9.2.4 22-Sep-2015  skrll Sync with HEAD
 1.9.2.3 06-Jun-2015  skrll Sync with HEAD
 1.9.2.2 06-Apr-2015  skrll Sync with HEAD
 1.9.2.1 29-Mar-2015  skrll file amlogic_var.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.12.20.1 10-Jun-2019  christos Sync with HEAD
 1.12.18.1 26-Jan-2019  pgoyette Sync with HEAD
 1.12.16.2 03-Dec-2017  jdolecek update from HEAD
 1.12.16.1 21-Nov-2015  jdolecek file amlogic_var.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.4 20-Jan-2019  skrll Another kernel bites te dust.

Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
 1.3 03-Apr-2015  jmcneill branches: 1.3.2; 1.3.18; 1.3.20; 1.3.22;
Allow for choosing between 16 and 24bpp framebuffers. The default is now
16 instead of 24. Set 'fb.depth=16' or 'fb.depth=24' on kernel command-line
to explicitly select a colour depth.
 1.2 22-Mar-2015  jmcneill Use the hardware scaler to do overscan compensation. You can set the
scaling value as a percentage in two ways -- either as a kernel cmdline
parameter (fb.scale=<pct>) or at runtime with sysctl (hw.genfb0.scale=<pct>).

Setting scale=100 disables the scaler, any other value enables it. For
the cheap TV on my desk, scale=95 gives me a fully visible framebuffer.
 1.1 21-Mar-2015  jmcneill branches: 1.1.2;
Basic framebuffer console support. Work in progress.
 1.1.2.4 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #661):
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.5
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.3
sys/arch/evbarm/amlogic/amlogic_machdep.c: revision 1.20
Allow for choosing between 16 and 24bpp framebuffers. The default is now
16 instead of 24. Set 'fb.depth=16' or 'fb.depth=24' on kernel command-line
to explicitly select a colour depth.
 1.1.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #637):
sys/arch/arm/amlogic/amlogic_genfb.c: revisions 1.2, 1.3
sys/arch/evbarm/amlogic/amlogic_machdep.c: revision 1.18
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.2
Use the hardware scaler to do overscan compensation. You can set the
scaling value as a percentage in two ways -- either as a kernel cmdline
parameter (fb.scale=<pct>) or at runtime with sysctl (hw.genfb0.scale=<pct>).
Setting scale=100 disables the scaler, any other value enables it. For
the cheap TV on my desk, scale=95 gives me a fully visible framebuffer.
--
Support interlaced modes.
 1.1.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.1.2.1 21-Mar-2015  snj file amlogic_vpureg.h was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.3.22.1 10-Jun-2019  christos Sync with HEAD
 1.3.20.1 26-Jan-2019  pgoyette Sync with HEAD
 1.3.18.2 03-Dec-2017  jdolecek update from HEAD
 1.3.18.1 03-Apr-2015  jdolecek file amlogic_vpureg.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.3.2.2 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 03-Apr-2015  skrll file amlogic_vpureg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.15 20-Jan-2019  jmcneill Remove unused file.
 1.14 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.13 29-Nov-2015  jmcneill branches: 1.13.16; 1.13.18; 1.13.20;
Retire CPUFREQ option, instead just pick the highest available frequency
at boot. Update the list of supported frequencies to match the list of dvfs
frequencies from the meson8b dts, capped at 1.5GHz. The highest available
frequency is changed from 1512MHz to 1536MHz.
 1.12 25-Apr-2015  jmcneill Add Amlogic GPIO driver.
 1.11 19-Apr-2015  jmcneill Add a driver for Amlogic "SDIO" MMC controller.
 1.10 29-Mar-2015  jmcneill branches: 1.10.2;
Use shared armv7_generic_space
 1.9 22-Mar-2015  jmcneill Add Amlogic RTC driver, from Anon Ymous
 1.8 21-Mar-2015  jmcneill branches: 1.8.2;
Basic framebuffer console support. Work in progress.
 1.7 17-Mar-2015  jmcneill Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.

The speed can still be scaled down with machdep.cpu sysctls.
 1.6 07-Mar-2015  jmcneill add hardware rng support
 1.5 05-Mar-2015  jmcneill CPU frequency scaling support, enough to bump my ODROID-C1 up to the
advertised 1.5GHz.
 1.4 04-Mar-2015  jmcneill ODROID-C1 onboard ethernet support.
 1.3 28-Feb-2015  jmcneill add dwc2 attachment, doesnt quite work yet
 1.2 27-Feb-2015  jmcneill Add basic serial console support.
 1.1 07-Feb-2015  jmcneill Work-in-progress Odroid-C1 support.
 1.8.2.4 30-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #723):
sys/arch/arm/amlogic/amlogic_crureg.h: revisions 1.9, 1.10
sys/arch/arm/amlogic/amlogic_gpio.c: revision 1.1
sys/arch/arm/amlogic/amlogic_io.c: revision 1.11
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.11
sys/arch/arm/amlogic/files.amlogic: revision 1.12
sys/arch/evbarm/conf/ODROID-C1: revision 1.18
Add Amlogic GPIO driver.
 1.8.2.3 25-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #639):
sys/arch/arm/amlogic/amlogic_intr.h: revision 1.6
sys/arch/arm/amlogic/amlogic_io.c: revision 1.8
sys/arch/arm/amlogic/amlogic_reg.h: revision 1.10
sys/arch/arm/amlogic/amlogic_rtc.c: revision 1.1
sys/arch/arm/amlogic/amlogic_rtcreg.h: revision 1.1
sys/arch/arm/amlogic/files.amlogic: revision 1.9
sys/arch/evbarm/conf/ODROID-C1: revision 1.13
Add Amlogic RTC driver, from Anon Ymous
 1.8.2.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.8.2.1 21-Mar-2015  snj file files.amlogic was added on branch netbsd-7 on 2015-03-21 08:51:17 +0000
 1.10.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.2.3 06-Jun-2015  skrll Sync with HEAD
 1.10.2.2 06-Apr-2015  skrll Sync with HEAD
 1.10.2.1 29-Mar-2015  skrll file files.amlogic was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.13.20.1 10-Jun-2019  christos Sync with HEAD
 1.13.18.2 26-Jan-2019  pgoyette Sync with HEAD
 1.13.18.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.13.16.2 03-Dec-2017  jdolecek update from HEAD
 1.13.16.1 29-Nov-2015  jdolecek file files.amlogic was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.15 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.14 10-Jul-2025  skrll Trailing whitespace
 1.13 05-Jul-2025  rjs Add driver for Meson I2C controller.

Contributed by Vincent Defert.
 1.12 01-Feb-2021  jmcneill branches: 1.12.24;
defflag SOC_MESONG12
 1.11 01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.10 14-Aug-2019  skrll branches: 1.10.8;
Add a meson6_timer driver and provide a timecounter
 1.9 21-Apr-2019  jmcneill branches: 1.9.2;
Add driver for Meson GX EE-domain watchdog timer.
 1.8 21-Apr-2019  jmcneill Add support for Meson GXL internal PHY.
 1.7 19-Apr-2019  jmcneill Add support for Amlogic Meson GXL family SoCs.
 1.6 05-Apr-2019  jmcneill Add dependencies for mesonfb
 1.5 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.4 20-Jan-2019  jmcneill branches: 1.4.2;
Add Amlogic Meson RTC driver (FDT version)
 1.3 20-Jan-2019  jmcneill Add Amlogic Meson SDHC driver (non-standard bindings)
 1.2 19-Jan-2019  jmcneill Add Meson (FDT) framebuffer support.
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.4.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.4.2.1 20-Jan-2019  pgoyette file files.meson was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.9.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.2 10-Jun-2019  christos Sync with HEAD
 1.9.2.1 21-Apr-2019  christos file files.meson was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.10.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.10.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.12.24.1 02-Aug-2025  perseant Sync with HEAD
 1.5 29-Jun-2021  pgoyette Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE. This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
of MII_STR_oui_model definitions and use of oui and model rather than
vendor and product. This also changes the compressed data in the
xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
(to deal with the vendor/product vs oui/model issue), we need to
make sure it gets compiled with -Wno-error=format-nonliteral, even
in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.
 1.4 28-Mar-2020  thorpej branches: 1.4.8;
Don't set DVF_DETACH_SHUTDOWN. The MII layer wants to manage the lifecycle
of the PHY devices, and if a NIC driver chooses not to detach its PHYs
at shutdown, that's the driver's business.

PR kern/55121.
 1.3 15-Mar-2020  thorpej Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
access to media-related structures / hardware regsiters. Converted
drivers use the new ifmedia_init_with_lock() function for this. The
new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
a compatibility lock to be used instead. Several media-related entry
points must be aware of this compatibility lock, and are able to acquire
it recursively a limited number of times, if needed. This is a SPIN
mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex. The mcx driver still needs to be fully converted to
NET_MPSAFE.
 1.2 27-Nov-2019  msaitoh - Simplify sc->mii_anegticks setting. Same as FreeBSD.

Don't set the default value not in the attach function. Instead, set the
default value (MII_ANEGTICKS) first in the beginning of the
mii_phy_add_media(). The function already has the code to change the value to
MII_ANEGTICKS_GIGE if it's gigabit capable.

- Remove extra pmf_device_register() call. It's done in mii_phy_add_media().
 1.1 21-Apr-2019  jmcneill branches: 1.1.2;
Add support for Meson GXL internal PHY.
 1.1.2.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 21-Apr-2019  christos file gxlphy.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.4.8.1 01-Aug-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 14-Aug-2019  skrll branches: 1.1.8; 1.1.10;
Add a meson6_timer driver and provide a timecounter
 1.1.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.8.1 14-Aug-2019  martin file meson6_timer.c was added on branch phil-wifi on 2020-04-13 08:03:32 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 16-Aug-2019  jmcneill branches: 1.5.8;
Use correct register for mpll2_div clock
 1.4 13-Aug-2019  skrll Updates to get Odroid-C1 in better shape since the last DTS import
 1.3 25-Feb-2019  jmcneill branches: 1.3.4; 1.3.6;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2 20-Jan-2019  jmcneill branches: 1.2.2;
Add support for changing CPU frequency
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 20-Jan-2019  pgoyette file meson8b_clkc.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.6.2 22-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #220):

sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.5

Use correct register for mpll2_div clock
 1.3.6.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.3.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 25-Feb-2019  christos file meson8b_clkc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.5.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson8b_clkc.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson8b_clkc.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3 23-Jun-2022  brook Add a mising gpio pin description.

This file enumerates the gpio pins in two different ways: as enum
values and as an array of data. The enum values are used as keys into
the array. One of the enums, GPIODV_9, is missing from the table. As
a result, lookup fails to find a matching entry and returns an invalid
entry, which causes the kernel to panic. This patch adds the missing
data to the array.

However, the underlying problem is not fixed. Somewhere in the kernel
is lookup logic that does not check the validity of the results to
ensure that a match indeed occurred. There are no doubt other
potential panics to be triggered by the same lookup code applied to
other tables (or future versions of this one).
 1.2 14-Aug-2019  jmcneill Add eth_rxd3 and eth_rxd2 pinctrl groups
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.8;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.8.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.1.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson8b_pinctrl.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson8b_pinctrl.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add Meson (FDT) framebuffer support.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_canvasreg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_canvasreg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3 19-Apr-2019  jmcneill branches: 1.3.4;
Add support for Amlogic Meson GXL family SoCs.
 1.2 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 19-Apr-2019  christos file meson_clk.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.4 01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.3 25-Feb-2019  jmcneill branches: 1.3.4; 1.3.14;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2 20-Jan-2019  jmcneill branches: 1.2.2;
Add CLK_SET_RATE_PARENT for mux clocks and add MESON_CLK_PLL_RATE which is like MESON_CLK_PLL but accepts a custom set_rate function
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 20-Jan-2019  pgoyette file meson_clk.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 25-Feb-2019  christos file meson_clk.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.3 25-Feb-2019  jmcneill branches: 1.3.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2 20-Jan-2019  jmcneill branches: 1.2.2;
Always honour MESON_CLK_DIV_SET_RATE_PARENT
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 20-Jan-2019  pgoyette file meson_clk_div.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 25-Feb-2019  christos file meson_clk_div.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_clk_fixed.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_fixed.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_clk_fixed_factor.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_fixed_factor.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2 25-Feb-2019  jmcneill branches: 1.2.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_gate.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_clk_gate.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2 25-Feb-2019  jmcneill branches: 1.2.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_mpll.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_clk_mpll.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2 25-Feb-2019  jmcneill branches: 1.2.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_mux.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_clk_mux.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.3 01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.2 25-Feb-2019  jmcneill branches: 1.2.4; 1.2.14;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_clk_pll.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_clk_pll.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.16 13-Oct-2024  skrll Improve an error message
 1.15 10-Aug-2024  skrll awge(4): MP improvements

Remove the non-MP-safe scaffolding and make the locking less
coarse.
 1.14 19-Nov-2021  jdc branches: 1.14.10;
PR port-evbarm/50416

Redo the previous change. The "snps,..." properties are on the ethernet
node and the "reset-..." properties are on the phy node. Handle this by
creating a separate reset routine for each case. Idea from Jared.
 1.13 17-Nov-2021  jdc PR port-evbarm/50416

Also check the "reset_gpios", "reset-assert-us", and "reset-deassert-us"
properties for ethernet MAC reset information. Makes the built-in ethernet
work on Odroid C1 and Odroid C2 (with mesongxbb_pinctrl.c >= r1.3).

Based on a hint from Jared. C2 tested by Martin.
 1.12 07-Nov-2021  jmcneill Handle RGMII variants.
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.9 01-Jan-2021  ryo fix to work with various clock frequencies, and add support "amlogic,meson-axg-dwmac"
 1.8 06-Feb-2020  rjs branches: 1.8.6;
Match new dtb.
 1.7 21-Jul-2019  mrg branches: 1.7.4;
move DWCGMAC_MPSAFE into dwc_gmac_var.h and introduce an
additional define that is 0 or FDT_INTR_MPSAFE that the
frontends can use when passing to fdtbus_intr_establish().

with NET_MPSAFE enabled, this avoids hangs seen on rock64,
as well as finishing the MPSAFE port for this driver.

XXX: still don't know why the existing hangs occur.
 1.6 08-Jul-2019  msaitoh Add rnd(9) support.
 1.5 19-Apr-2019  jmcneill branches: 1.5.4;
Add support for Amlogic Meson GXL family SoCs.
 1.4 02-Mar-2019  jmcneill Setup RGMII mode for Meson DWMAC
 1.3 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2 23-Feb-2019  martin Adjust all callers of dwc_gmac_attach, pass MII_PHY_ANY for now.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_dwmac.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.5.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 19-Apr-2019  christos file meson_dwmac.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.7.4.1 29-Feb-2020  ad Sync with head.
 1.8.6.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.14.10.1 02-Aug-2025  perseant Sync with HEAD
 1.4 04-Oct-2025  thorpej Use device_{get,set}prop_bool() for "is_console".
 1.3 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.16;
Add Meson (FDT) framebuffer support.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_genfb.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_genfb.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add Meson (FDT) framebuffer support.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_hdmireg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_hdmireg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.5 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.4 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.3 18-Aug-2025  andvar Fix various typos, mainly in comments:
s/invaid/invalid/
s/instad/instead/
s/wich/with/
s/tranform/transform/
s/tranmist/transmit/
s/tranceiver/transceiver/
s/Tranparent/Transparent/
s/tranlated/translated/
s/tranfer/transfer/
s/tranmissions/transmissions/
s/condtions/conditions/
s/Recient/Recent/
 1.2 10-Jul-2025  skrll branches: 1.2.4;
Trailing whitespace
 1.1 05-Jul-2025  rjs Add driver for Meson I2C controller.

Contributed by Vincent Defert.
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 10-Jul-2025  perseant file meson_i2c.c was added on branch perseant-exfatfs on 2025-08-02 05:55:26 +0000
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.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.11 27-Jan-2021  thorpej branches: 1.11.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.7 01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.6 01-Oct-2019  jmcneill branches: 1.6.8;
Add support for devices with separate "init" and "default" pinctrl states.
 1.5 19-Apr-2019  jmcneill branches: 1.5.4; 1.5.6;
Add support for Amlogic Meson GXL family SoCs.
 1.4 02-Mar-2019  jmcneill When acquiring a GPIO, disable any conflicting pinctrl function groups
 1.3 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2 23-Jan-2019  thorpej branches: 1.2.2;
Implement subroutines for parsing out some of the generic properties
specified in the pinctrl bindings, and adapt Meson, Rockchip, and
Allwinner pinctrl back-ends to use them.

Ok jmcneill@
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 23-Jan-2019  pgoyette file meson_pinctrl.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.5.6.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.5.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 19-Apr-2019  christos file meson_pinctrl.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.6.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.6.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.11.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.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.3 19-Apr-2019  jmcneill branches: 1.3.4; 1.3.14;
Add support for Amlogic Meson GXL family SoCs.
 1.2 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_pinctrl.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 19-Apr-2019  christos file meson_pinctrl.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.23 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.22 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.21 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.20 24-Apr-2021  thorpej 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.19 05-Feb-2021  skrll branches: 1.19.2;
Fix build
 1.18 04-Feb-2021  thorpej Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.17 29-Jan-2021  rin Fix build without MULTIPROCESSOR.
 1.16 28-Sep-2020  jmcneill branches: 1.16.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.15 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.14 20-Jun-2020  skrll Convert to new proplib api
 1.13 13-Aug-2019  skrll Updates to get Odroid-C1 in better shape since the last DTS import
 1.12 13-Aug-2019  skrll Trailing whitespace
 1.11 21-Apr-2019  jmcneill branches: 1.11.2; 1.11.4;
Fix SOC_MESON8B build
 1.10 21-Apr-2019  jmcneill Don't rely on the existing state of the GX watchdog control register when
resetting.
 1.9 21-Apr-2019  jmcneill Provide a separate ap_reset for Meson GX family SoCs
 1.8 19-Apr-2019  jmcneill Add support for Amlogic Meson GXL family SoCs.
 1.7 05-Apr-2019  jmcneill Fix AO base in cpu_enable_meson8b
 1.6 05-Apr-2019  jmcneill #define<tab>
 1.5 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.4 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.3 21-Jan-2019  jmcneill branches: 1.3.2;
Auto-detect root device on Meson8b
 1.2 20-Jan-2019  jmcneill Re-add support for awge0.mac-address, fb.scale, and fb.depth cmdline options
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.3.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.3.2.1 21-Jan-2019  pgoyette file meson_platform.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.11.4.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.11.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11.2.2 10-Jun-2019  christos Sync with HEAD
 1.11.2.1 21-Apr-2019  christos file meson_platform.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.16.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.19.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.6 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.3 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.2 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file meson_pwm.c was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 01-Jan-2021  ryo add "amlogic,meson-axg-reset" to compatible
 1.2 25-Feb-2019  jmcneill branches: 1.2.4; 1.2.14;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_resets.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.14.2 03-Apr-2021  thorpej Sync with HEAD.
 1.2.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_resets.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.5 19-Mar-2022  riastradh meson_rng(4): No need for lock -- delete it.

We only ever read a single register at a time; no exclusive access or
serialization needed.

XXX This driver should have some kind of hardware-specific health
test -- is there documentation anywhere for what this RNG actually
is?
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 30-Apr-2020  riastradh branches: 1.3.2;
rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.2 21-Apr-2019  jmcneill branches: 1.2.2;
Add support for Meson GXBB and GXL
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_rng.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.2.2 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 21-Apr-2019  christos file meson_rng.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 08-Sep-2025  thorpej Garbage-collect fdtbus_todr_attach(); todr_attach() does all the
necessary work now.

kern/59630
 1.4 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.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 20-Jan-2019  jmcneill branches: 1.2.2; 1.2.6; 1.2.16;
todr_attach -> fdtbus_todr_attach
 1.1 20-Jan-2019  jmcneill Add Amlogic Meson RTC driver (FDT version)
 1.2.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 20-Jan-2019  christos file meson_rtc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 20-Jan-2019  pgoyette file meson_rtc.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.1 20-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add Amlogic Meson RTC driver (FDT version)
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 20-Jan-2019  christos file meson_rtcreg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 20-Jan-2019  pgoyette file meson_rtcreg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.6 07-Nov-2021  jmcneill dts: adapt to dts-5.15 bindings
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.1 20-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.16;
Add Amlogic Meson SDHC driver (non-standard bindings)
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 20-Jan-2019  christos file meson_sdhc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 20-Jan-2019  pgoyette file meson_sdhc.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 20-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add Amlogic Meson SDHC driver (non-standard bindings)
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 20-Jan-2019  christos file meson_sdhcreg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 20-Jan-2019  pgoyette file meson_sdhcreg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.16;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_sdio.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_sdio.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_sdioreg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_sdioreg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.7 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 08-Jan-2021  macallan shut up a clang warning about snprintf() called with a variable as format
string
NFCI
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file meson_thermal.c was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.8 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.7 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.6 12-Feb-2021  ryo UART_RFIFO_REG should be masked before passing to cn_check_magic(). there is any data in other than the lower 8 bits.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.3 28-May-2019  ryo branches: 1.3.2; 1.3.12;
- since ttyinput (t_linesw->l_rint) should not be called from interrupt context,
it has been modified to use softint like other serial drivers.
- add spinlock for interrupt.

ok jmcneill@. thanks
 1.2 20-Jan-2019  jmcneill branches: 1.2.2;
Only enable RX interrupts if the device is open. Previously interrupts were
enabled unconditionally, which caused the interrupt handler to consume
input before WSDISPLAY_MULTICONS had a change to poll for data.
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 20-Jan-2019  pgoyette file meson_uart.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 28-May-2019  christos file meson_uart.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_uart.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_uart.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.7 25-Oct-2025  skrll Support the amlogic,meson-gxl-usb-ctrl as found in the Libre Computer
AML-S905X-CC.

Problem reported on port-arm and patch tested by Derrick Granowski
 1.6 07-Feb-2024  msaitoh branches: 1.6.4;
Remove ryo@'s mail addresses.
 1.5 27-Jan-2021  thorpej branches: 1.5.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.3 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.2 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file meson_usbctrl.c was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.5.18.1 26-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #1186):

sys/arch/arm/amlogic/meson_usbctrl.c: revision 1.7

Support the amlogic,meson-gxl-usb-ctrl as found in the Libre Computer
AML-S905X-CC.

Problem reported on port-arm and patch tested by Derrick Granowski
 1.6.4.1 26-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #73):

sys/arch/arm/amlogic/meson_usbctrl.c: revision 1.7

Support the amlogic,meson-gxl-usb-ctrl as found in the Libre Computer
AML-S905X-CC.

Problem reported on port-arm and patch tested by Derrick Granowski
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 25-Feb-2019  jmcneill branches: 1.2.4; 1.2.14;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_usbphy.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 25-Feb-2019  christos file meson_usbphy.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add Meson (FDT) framebuffer support.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_vpureg.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_vpureg.h was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 19-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.16;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 19-Jan-2019  christos file meson_wdt.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 19-Jan-2019  pgoyette file meson_wdt.c was added on branch pgoyette-compat on 2019-01-26 21:59:59 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_aoclkc.c was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_aoclkc.h was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.6 04-Feb-2021  joerg Fix C&P error in G12_CLK_vid_pll
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.3 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.2 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_clkc.c was added on branch thorpej-futex on 2021-01-03 16:34:50 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_clkc.h was added on branch thorpej-futex on 2021-01-03 16:34:51 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_usb2phy.c was added on branch thorpej-futex on 2021-01-03 16:34:51 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12_usb3pciephy.c was added on branch thorpej-futex on 2021-01-03 16:34:51 +0000
 1.1 01-Jan-2021  ryo branches: 1.1.2;
Add support for Amlogic S922X(meson-g12b) SoCs
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 01-Jan-2021  thorpej file mesong12a_pinctrl.c was added on branch thorpej-futex on 2021-01-03 16:34:51 +0000
 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 28-Jan-2021  jmcneill branches: 1.14.2;
port-arm/55957: Odroid C2 can not access eMMC card

A few changes to clock setup:
- Disable clock while changing dividers
- Set / clear DDR flag before changing clock
- Adjust TX/RX/core phases
 1.13 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.12 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.11 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.10 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.9 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.8 01-Jan-2021  jmcneill Use symbolic names for hwtype values.
 1.7 01-Jan-2021  jmcneill #define<tab>
 1.6 01-Jan-2021  ryo adapts to some register differences to add support "amlogic,meson-axg-mmc"
 1.5 21-Apr-2019  jmcneill branches: 1.5.2; 1.5.12;
Fix module clock rate in DDR52 mode and support mmc-ddr-3_3v DT property
 1.4 16-Mar-2019  jmcneill Disable multi-segment DMA as a workaround for init crashes on ODROID-C2 when using root on eMMC
 1.3 15-Mar-2019  jmcneill Fix SCF_RSP_R1B test
 1.2 03-Mar-2019  jmcneill Reset device at attach and fix eMMC 1.8V flags
 1.1 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.5.12.2 03-Apr-2021  thorpej Sync with HEAD.
 1.5.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.5.2.2 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 21-Apr-2019  christos file mesongx_mmc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.14.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 28-Sep-2022  jmcneill Match Meson GXBB watchdog.

From Vincent DEFERT on port-arm:
http://mail-index.netbsd.org/port-arm/2022/09/21/msg007860.html
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 21-Apr-2019  jmcneill branches: 1.1.2; 1.1.12;
Add driver for Meson GX EE-domain watchdog timer.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 21-Apr-2019  christos file mesongx_wdt.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 19-Apr-2019  jmcneill branches: 1.2.4; 1.2.14;
Add support for Amlogic Meson GXL family SoCs.
 1.1 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 19-Apr-2019  christos file mesongxbb_aoclkc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 25-Feb-2019  jmcneill branches: 1.1.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 25-Feb-2019  christos file mesongxbb_aoclkc.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 19-Apr-2019  jmcneill branches: 1.2.4; 1.2.14;
Add support for Amlogic Meson GXL family SoCs.
 1.1 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 19-Apr-2019  christos file mesongxbb_clkc.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 25-Feb-2019  jmcneill branches: 1.1.4;
Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 25-Feb-2019  christos file mesongxbb_clkc.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.3 17-Nov-2021  jmcneill Add missing GPIOZ direction / input / output register defs.
 1.2 26-Feb-2019  jmcneill branches: 1.2.4;
Fix GPIOH pin groups and add GPIOY
 1.1 25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 26-Feb-2019  christos file mesongxbb_pinctrl.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1 19-Apr-2019  jmcneill branches: 1.1.4;
Add support for Amlogic Meson GXL family SoCs.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 19-Apr-2019  christos file mesongxl_pinctrl.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 19-Apr-2019  jmcneill branches: 1.1.4; 1.1.14;
Add support for Amlogic Meson GXL family SoCs.
 1.1.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 19-Apr-2019  christos file mesongxl_usb2phy.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 19-Apr-2019  jmcneill branches: 1.1.4; 1.1.14;
Add support for Amlogic Meson GXL family SoCs.
 1.1.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 19-Apr-2019  christos file mesongxl_usb3phy.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.5 24-Feb-2023  jmcneill #define<tab> for consistency with the rest of the file
 1.4 27-Apr-2022  skrll Sync with OpenBSD

- Use subpage feature
- Catch up with new device tree bindings
- Skip locked DARTs
- Use bypass mode for USB3 DARTs

Other changes from me
- Sprinkle BITS(3)
- Improve interrupt error handling
 1.3 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.2 04-Sep-2021  jmcneill Use fdt_iommu instead of calling appledart directly from applepcie
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.3 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.2 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.1 10-May-2022  skrll Add a driver for the Apple M1 I2C controller. From OpenBSD.
 1.9 28-Jun-2022  jmcneill appleintc: update ci_cpl in pic_set_priority callback
 1.8 02-May-2022  ryo fix non-MULTIPROCESSOR build
 1.7 28-Mar-2022  riastradh arm/apple: Use container_of, not bespoke offsetof arithmetic.

Better type-safety this way.
 1.6 26-Nov-2021  skrll Mask the bottom 5 bits in the standard pic way. NFC.
 1.5 26-Nov-2021  skrll no need to shout
 1.4 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.3 16-Oct-2021  ryo fix non-MULTIPROCESSOR build

Build tested only.
 1.2 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.1 27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.1 27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.1 07-May-2022  skrll Add support for Apple silicon NVME. Ported from OpenBSD.
 1.6 27-Apr-2022  skrll Sync with OpenBSD

- port initialisation and device power up. Latter requires the SMC
GPIO controller which is WIP.

While here
- improve the MSI vector search algorithm; and
- spinkle some BITS(3)
 1.5 14-Sep-2021  jmcneill Support new style msi-ranges from U-Boot
 1.4 13-Sep-2021  jmcneill applepcie: Explicitly use posted BS tag for PCI devices.
 1.3 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.2 04-Sep-2021  jmcneill Use fdt_iommu instead of calling appledart directly from applepcie
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.1 27-Apr-2022  skrll Add a driver for the Apple GPIO controller found in Apple silicon.

Derived from the OpenBSD driver.
 1.9 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.8 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.7 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.6 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.5 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.4 13-Sep-2021  jmcneill apple: provide a non-posted bs tag by default

This tag is still used for early console attachment.
 1.3 02-Sep-2021  jmcneill apple: derive CPU speed from mpidr_el1

According to https://github.com/AsahiLinux/docs/wiki/HW%3AARM-System-Registers,
MPIDR_EL1 Aff2 determines whether a core is an efficiency or performance
core. Replace the compat data table with code that uses the aff2 value
for fake DMIPS/MHz value, to hopefully maintain compatibility with future
cores.
 1.2 01-Sep-2021  jmcneill Make the scheduler aware of the differences between efficiency and
performance cores.
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.2 10-May-2022  skrll Add aprints
 1.1 27-Apr-2022  skrll Add support for the power domain controller found in Apple silicon
machines.
 1.1 27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.1 27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.1 10-May-2022  skrll Add a driver for the Apple RTKit based System Management Controller
found on M1 SoCs. From OpenBSD.
 1.3 05-Apr-2022  skrll Sync with new DTS
 1.2 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.9 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.8 10-May-2022  skrll Add a driver for the Apple RTKit based System Management Controller
found on M1 SoCs. From OpenBSD.
 1.7 10-May-2022  skrll Add a driver for the Apple M1 I2C controller. From OpenBSD.
 1.6 07-May-2022  skrll Add support for Apple silicon NVME. Ported from OpenBSD.
 1.5 27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.4 27-Apr-2022  skrll Add a driver for the Apple GPIO controller found in Apple silicon.

Derived from the OpenBSD driver.
 1.3 27-Apr-2022  skrll Add support for the power domain controller found in Apple silicon
machines.
 1.2 03-Jan-2022  skrll sort
 1.1 30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.9 10-Dec-2024  jmcneill fix 32-bit arm builds
 1.8 09-Dec-2024  jmcneill arm64: Fix Oryon topology.

The Oryon CPUs don't set the MT bit in MPIDR_EL1, leading to a bogus
topology. Work around this for now - long term fix will be to support PPTT.
 1.7 30-Jun-2024  jmcneill aarch64: Add NUMA awareness for ACPI systems with SRAT tables.

On an Ampere Altra w/ hemisphere mode enabled:

[ 1.0000000] cpu0: package 16, core 0, smt 0, numa 0
[...]
[ 1.0000000] cpu32: package 22, core 0, smt 0, numa 1

[ 1.000004] SRAT: 2 NUMA nodes
[ 1.000004] SRAT: node 0 memory range 0 (0x88300000 - 0x88400000 flags 1)
[ 1.000004] SRAT: node 0 memory range 1 (0x90000000 - 0x100000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 2 (0x80000000000 - 0x80080000000 flags 1)
[ 1.000004] SRAT: node 0 memory range 3 (0x80100000000 - 0x81000000000 flags 1)
[ 1.000004] SRAT: node 1 memory range 0 (0xc0000000000 - 0xc1000000000 flags 1)
 1.6 11-Dec-2021  mrg branches: 1.6.10;
remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.5 29-Mar-2020  skrll branches: 1.5.2;
Fix a c&p error from 1.3 that should fixes mrg's rk3399 slow vs fast CPU
problem.

My XU4 certainly reports the right relative speeds for the 5 (yes, 5) CPUs
that are avalable.
 1.4 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.3 15-Feb-2020  skrll Remove the 'slow' argument from cpu_topology_set and create a new
function cpu_topology_setspeed which sets the relative speed of the
cpu.

This allows cpu_topology_set is be used at cpu hatch time. The relative
speed is only known once all cpus have hatched/attached

OK ad@
 1.2 16-Jan-2020  mrg branches: 1.2.2;
make the topology support empty on non-SMP enabled kernels.
reduces kernel sizes and also fixes the builds.
 1.1 15-Jan-2020  mrg port the arm64 cpu topology setup for big.little to arm.

rename arm64 cpu_do_topology() to arm_cpu_do_topology() and
call it from both arm cpu_attach().

replace both aarch64_set_topology() inline code in arm
cpu_attach() with new arm_cpu_do_topology(), which is called
by the arm64 locore as well (possibly not needed, which would
allow it to become static.)

not yet tested on a real big.little armv7 system. tested
on rockpro64 and pinebook pro.
 1.2.2.3 29-Feb-2020  ad Sync with head.
 1.2.2.2 17-Jan-2020  ad Sync with head.
 1.2.2.1 16-Jan-2020  ad file arm_cpu_topology.c was added on branch ad-namecache on 2020-01-17 21:47:23 +0000
 1.5.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.2.1 29-Mar-2020  martin file arm_cpu_topology.c was added on branch phil-wifi on 2020-04-08 14:07:27 +0000
 1.6.10.2 02-Aug-2025  perseant Sync with HEAD
 1.6.10.1 01-Jul-2024  perseant Sync with HEAD.
 1.1 17-Mar-2018  ryo branches: 1.1.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.1.2.2 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1.2.1 17-Mar-2018  pgoyette file arm_generic_dma.c was added on branch pgoyette-compat on 2018-03-22 01:44:41 +0000
 1.1 11-Aug-2007  chris branches: 1.1.2;
file arm_irqhandler.c was initially added on branch chris-arm-intr-rework.
 1.1.2.8 24-Feb-2008  chris We now that we're turning on and off the interrupts, so don't store the
previous state (which will be interrupts disabled)
 1.1.2.7 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.1.2.6 26-Jan-2008  chris Rename some structures, eg intrq->intrline, irqgroup->pic. A lot of
member variables have changed name to reflect this.

Change the API for registering a PIC with the common code, so that it
passes a structure to the common code, rather than lots of parameters.
 1.1.2.5 20-Jan-2008  chris Sync to HEAD.
 1.1.2.4 18-Aug-2007  chris Fix off by one issues when deciding if there are ipls which can be
processed from splx.

Don't lower the spl level in raisespl.

Correct test when scheduling a interrupt.

These issues were more noticable on slower (EB7500ATX) than on faster
(cats) hardware. Particularly noticed when handling disk interrupts,
where disk interrupts were processed even when spl was splbio. They
should have been blocked till the next splx. This was causing disk
timeouts.

Add futher diagnostic output from arm_intr_print_pending_irq_details.
Add some temporary code used to debug the problem. To be remove later.
 1.1.2.3 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.1.2.2 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.1.2.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.68 04-Oct-2023  ad Eliminate l->l_ncsw and l->l_nivcsw. From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.
 1.67 21-Feb-2021  skrll KNF consistency
 1.66 21-Feb-2021  skrll Some preemption updates - still not being used (yet)
 1.65 01-Dec-2020  rin Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.64 14-Aug-2020  skrll branches: 1.64.2;
Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.63 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.62 22-Jan-2020  skrll Oops, the cast is required
 1.61 21-Jan-2020  skrll Remove unnecessary cast
 1.60 07-Jan-2020  skrll branches: 1.60.2;
KNF
 1.59 07-Jan-2020  skrll Give __HAVE_PIC_FAST_SOFTINTS a chance of compiling
 1.58 03-Dec-2019  riastradh Use __insn_barrier to enforce ordering in l_ncsw loops.

(Only need ordering observable by interruption, not by other CPUs.)
 1.57 01-Dec-2019  ad Make cpu_intr_p() safe to use anywhere, i.e. outside assertions:

Don't call kpreempt_disable() / kpreempt_enable() to make sure we're not
preempted while using the value of curcpu(). Instead, observe the value of
l_ncsw before and after the check to see if we have been preempted. If
we have been preempted, then we need to retry the read.
 1.56 23-Nov-2019  ad cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
 1.55 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.54 15-Aug-2018  skrll sort #include "opt_..." entries
 1.53 24-Jan-2018  skrll branches: 1.53.2; 1.53.4;
Remove port-acorn26

OK core@
 1.52 23-Jul-2017  skrll Trailing whitespace
 1.51 04-Apr-2017  sevan Define NCPUINFO and set it to 1 or MAXCPUS whether on single or multiprocessor system.
Use NCPUINFO as the array size for *cpu_info[].
Closes PR port-hpcarm/52138
Patch by skrll
ok pgoyette
 1.50 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.49 02-May-2015  skrll branches: 1.49.2; 1.49.4;
Remove unintended commit
 1.48 02-May-2015  skrll Move /* A5.2.10 Synchronisation primitives */ block earlier so it
matches correctly
 1.47 15-Apr-2015  matt Make setsoftast take a cpu_info *
 1.46 08-Apr-2015  matt Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
 1.45 08-Apr-2015  matt Small tweaks for preemption.
 1.44 08-Apr-2015  matt Add an agnostic version of curlwp and curcpu() for modules since they won't
know if the kernel was built with TPIDRPRW_IS_CUR{LWP,CPU} or not.
 1.43 29-Oct-2014  skrll branches: 1.43.2;
Sprinkle #include "opt_multiprocessor.h"
 1.42 14-Jun-2014  ozaki-r branches: 1.42.2;
Fix typo
 1.41 16-Apr-2014  matt Pendantic structure member initialization. (setting a field to 0 which is 0).
 1.40 10-Jan-2014  matt branches: 1.40.2;
Make sure to start BE-8 programs with the PSR[E] set.
 1.39 06-Nov-2013  christos add diagused
 1.38 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.37 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.36 31-Aug-2012  matt branches: 1.36.2; 1.36.4;
Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.35 29-Aug-2012  matt Don't use locations in .data to store exception temporaries, use decidicated
space in cpu_info instead. This also moves undefined_handler_address into
cpu_info as well.
Use the new armreg* inlines for getting TPIDRPRW register.
Add MULTIPROCESSOR version of CPU_INFO_FOREACH
 1.34 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.33 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.32 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.31 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.30 04-Mar-2011  joerg branches: 1.30.4; 1.30.8; 1.30.12;
Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.29 07-Jul-2010  chs branches: 1.29.2; 1.29.4;
implement ucas_* for arm.
 1.28 23-Apr-2010  rmind Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
 1.27 10-Dec-2009  matt branches: 1.27.2; 1.27.4;
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds). Should result in no code differences.
 1.26 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.25 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.24 16-Jan-2009  bjh21 cpu_info_store, machine, and machine_arch can all be shared by acorn26 and
arm32, so share them.
 1.23 16-Jan-2009  bjh21 acorn26 and arm32 have identical versions of cpu_need_resched(). Unify them.
Similarly, with a small tweak acorn26 can use the same cpu_intr_p() as arm32,
so those can be unified too.
 1.22 15-Nov-2008  ad Remove compat ifdef.
 1.21 21-Oct-2008  matt branches: 1.21.2; 1.21.8;
Adapt to SA (conditional KERN_SA) and add cpu_setfunc
 1.20 15-Oct-2008  cegger buildfix: get prototype for cpu_upcall()
 1.19 15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.18 15-Mar-2008  rearnsha branches: 1.18.4; 1.18.6; 1.18.10;
VFP support.
 1.17 16-Dec-2007  mrg branches: 1.17.2; 1.17.6;
move the arm32 cpu_intr_p() function into arm32_machdep.c
from arm_machdep.c. this lets acorn26 link again.
 1.16 11-Dec-2007  ad Add cpu_intr_p().
 1.15 22-Apr-2007  dsl branches: 1.15.8; 1.15.12; 1.15.14; 1.15.22; 1.15.24; 1.15.26;
Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
- which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
search for absolute pathnames in the emulation root, if that fails it will
retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
the real root is returned instead (matching the behaviour of emul_lookup,
but being a cheap comparison here) so that programs that scan "../.."
looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
 1.14 09-Mar-2007  thorpej branches: 1.14.2; 1.14.4; 1.14.8;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.13 09-Feb-2007  ad branches: 1.13.2;
Merge newlock2 to head.
 1.12 27-Sep-2006  manu - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.11 11-Dec-2005  christos branches: 1.11.20; 1.11.22;
merge ktrace-lwp.
 1.10 14-Sep-2005  he Now that process_frame() is a macro (done "unannounced" in arm's
include/frame.h), don't try to define an inline function with the
same name and same contents.
 1.9 21-Aug-2004  rearnsha branches: 1.9.12;
Support upcalls and entry points that are in Thumb state.
 1.8 06-Feb-2004  junyoung Rename es_check in struct execsw to es_makecmds.
 1.7 25-Oct-2003  scw Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.6 17-Jan-2003  thorpej branches: 1.6.2;
Merge the nathanw_sa branch.
 1.5 03-Apr-2002  thorpej Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.4 18-Mar-2002  bjh21 PS_STRINGS -> p->p_psstr
 1.3 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.2 28-Jul-2001  chris branches: 1.2.6;
bzero->memset
 1.1 04-Mar-2001  bjh21 branches: 1.1.4; 1.1.6;
Merge setregs() from sys/arch/arm32/arm32/machdep.c,
sys/arch/hpcarm/hpcarm/machdep.c and sys/arch/arm26/arm26/vm_machdep.c
into sys/arch/arm/arm/arm_machdep.c.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file arm_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.2.6.17 03-Aug-2002  thorpej Don't need an upcall trampoline; upcalls don't return.
 1.2.6.16 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.2.6.15 05-Jul-2002  thorpej When delivering an upcall, arrange to have the kernel return to
the upcall directly, and use the upcall trampoline only to exit
if the upcall returns.
 1.2.6.14 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.2.6.13 17-Apr-2002  nathanw Catch up to -current.
 1.2.6.12 11-Apr-2002  thorpej Make this compile again.
 1.2.6.11 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.6.10 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.9 28-Dec-2001  nathanw Garbage collect cpu_stashcontext().
 1.2.6.8 17-Dec-2001  nathanw Convert to new, smaller cpu_upcall().
 1.2.6.7 17-Nov-2001  thorpej Oops, fix the computation of the location of the upcall trampoline
stack frame in the presence of an upcall arg.
 1.2.6.6 17-Nov-2001  thorpej Use sadata_upcall_free(), and use it to plug a memory leak in an
error path (copying out arg onto user stack fails).
 1.2.6.5 17-Nov-2001  thorpej Do the Right Thing with sau_arg: copy it onto the user stack, and
give the upcall a USER pointer, not a kernel pointer.
 1.2.6.4 17-Nov-2001  thorpej Adapt to latest MI changes. Update copyright in arm_machdep.c
 1.2.6.3 16-Nov-2001  thorpej cpu_upcall(): Ooops, don't reference the upcall structure after
we've put it back in the pool. Upcalls seem to be working on
the ARM, now.
 1.2.6.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.2.6.1 28-Jul-2001  thorpej file arm_machdep.c was added on branch nathanw_sa on 2001-11-15 06:39:20 +0000
 1.6.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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 25-Aug-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.12.6 17-Mar-2008  yamt sync with head.
 1.9.12.5 21-Jan-2008  yamt sync with head
 1.9.12.4 03-Sep-2007  yamt sync with head.
 1.9.12.3 26-Feb-2007  yamt sync with head.
 1.9.12.2 30-Dec-2006  yamt sync with head.
 1.9.12.1 21-Jun-2006  yamt sync with head.
 1.11.22.1 22-Oct-2006  yamt sync with head
 1.11.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.11.20.1 18-Nov-2006  ad Sync with head.
 1.13.2.2 07-May-2007  yamt sync with head.
 1.13.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.14.4.1 11-Jul-2007  mjf Sync with head.
 1.14.2.1 27-May-2007  ad Sync with head.
 1.15.26.2 02-Jan-2008  bouyer Sync with HEAD
 1.15.26.1 13-Dec-2007  bouyer Sync with HEAD
 1.15.24.1 13-Dec-2007  yamt sync with head.
 1.15.22.1 26-Dec-2007  ad Sync with head.
 1.15.14.2 23-Mar-2008  matt sync with HEAD
 1.15.14.1 09-Jan-2008  matt sync with HEAD
 1.15.12.2 21-Mar-2008  chris Sync with head.
 1.15.12.1 01-Jan-2008  chris Sync with HEAD.
 1.15.8.1 26-Dec-2007  rjs Sync with HEAD.
 1.17.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.17.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.2.1 24-Mar-2008  keiichi sync with head.
 1.18.10.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.10.1 19-Oct-2008  haad Sync with HEAD.
 1.18.6.1 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.18.4.4 11-Aug-2010  yamt sync with head.
 1.18.4.3 11-Mar-2010  yamt sync with head
 1.18.4.2 19-Aug-2009  yamt sync with head.
 1.18.4.1 04-May-2009  yamt sync with head.
 1.21.8.2 26-Mar-2014  matt If BE on armv7, set PSR_E_BIT
 1.21.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.21.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.27.4.2 05-Mar-2011  rmind sync with head
 1.27.4.1 30-May-2010  rmind sync with head
 1.27.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.27.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.29.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.29.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.30.8.1 24-Feb-2012  mrg sync to -current.
 1.30.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.30.4.2 30-Oct-2012  yamt sync with head
 1.30.4.1 17-Apr-2012  yamt sync with head
 1.36.4.2 18-May-2014  rmind sync with head
 1.36.4.1 28-Aug-2013  rmind sync with head
 1.36.2.2 03-Dec-2017  jdolecek update from HEAD
 1.36.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.2.1 10-Aug-2014  tls Rebase.
 1.42.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.43.2.2 28-Aug-2017  skrll Sync with HEAD
 1.43.2.1 06-Jun-2015  skrll Sync with HEAD
 1.49.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.49.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.49.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.53.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.53.4.1 10-Jun-2019  christos Sync with HEAD
 1.53.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.60.2.2 29-Feb-2020  ad Sync with head.
 1.60.2.1 25-Jan-2020  ad Sync with head.
 1.64.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.64.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.41 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.40 01-Oct-2025  skrll spaces to tabs
 1.39 07-Sep-2024  andvar spelling and grammar fixes, mainly in comments.
 1.38 23-Feb-2023  riastradh branches: 1.38.6;
arm32: Add missing barriers in cpu_switchto.

Details in comments.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10
 1.37 14-Nov-2021  riastradh branches: 1.37.4;
arm: Fix CPU startup synchronization.

- Use load-acquire instead of (wrong) membar_consumer then load in
cpu_boot_secondary_processors and cpu_hatched_p.

=> (Could use load then membar_consumer instead but load-acquire is
shorter.)

- Issue dmb ish before setting or clearing the bit in
cpu_set_hatched and cpu_clr_mbox to effect a store-release.

=> (Could use membar_exit, which is semantically weaker than dmb ish
but on arm is just implemented as dmb ish.)

=> (Could use stlr except we don't have atomic_ops(9) to do that.)

This way, everything before cpu_set_hatched or cpu_clr_mbox is
guaranteed to happen before everything after
cpu_boot_secondary_processors, which was previously not guaranteed.
 1.36 12-Sep-2021  skrll More debug.
 1.35 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.34 27-Jan-2021  skrll Trailing whitespace... heh
 1.33 01-Dec-2020  skrll Simplify the simplification... basically always set sctlr.u before setting
cpsr.e
 1.32 01-Dec-2020  skrll Simplify previous
 1.31 01-Dec-2020  rin Fix earmv6{,hf}eb start-up routines:

- Turn on U-bit in SCTLR before E-bit is turned on by ``setend be'',
in order to avoid undefined condition. ARM1176JZF-S, at least, halts
if only E-bit is turned on.

- Turn on EE-bit in SCTLR instead of B-bit as we've switched to BE8.
 1.30 13-Oct-2020  skrll branches: 1.30.2;
Remove some XXXNHs
 1.29 22-Sep-2020  mrg swp is only useful on armv7 uni-processor systems.

we will need the emulation if we want to run old binaries..
 1.28 21-Sep-2020  mrg turn on CPU_CONTROL_SWP_ENABLE.

this allows armv[67] systems to use 'swp' and 'swpb' instructions,
which means they can run armv[45] software.

arm recommends ldrex/strex for armv6 and newer, and it is not
present in armv8 at all or some armv7. we emulate it on armv8 and
need to add emulation for the some armv7. using the hardware is
going to be faster, so, enable this path too.

ok jmcneill.
 1.27 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.26 28-Aug-2020  skrll Use C rather than assembly
 1.25 28-Aug-2020  skrll Change to the KVA stack address straight after the MMU is turned on
 1.24 28-Aug-2020  skrll #ifdef -> #if defined
 1.23 28-Aug-2020  skrll arm_cpu_topology_set only takes two arguments
 1.22 25-Aug-2020  skrll More debug
 1.21 19-Jul-2020  skrll Fix RPI boot which needs more early stack

XXX centralise INIT_ARM_STACK_{SHIFT,SIZE}
XXX how to protect against this breaking again?
 1.20 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.19 09-Jul-2020  skrll Remove some newlines
 1.18 08-Jul-2020  skrll Use the stack provided by armv6_start.S rather than svcstk. This saves
some bss too.
 1.17 03-Jul-2020  skrll Wrap a comment
 1.16 20-Mar-2020  skrll Really use armv7 noncache memory attribute for early kernel mapping and
not SO
 1.15 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.14 12-Jun-2019  skrll branches: 1.14.2; 1.14.4;
Comment fix
 1.13 12-Jun-2019  skrll Debug output improvement
 1.12 08-Apr-2019  skrll branches: 1.12.4;
Fix a comment.
 1.11 04-Apr-2019  skrll Restructure so that storing of uboot args (including FDT address) and
virtual to physical offset is done after armv[67]_init where we ensure
MMU and caches are off, and cache is invalidated.
 1.10 03-Apr-2019  skrll Debug output alignment
 1.9 02-Apr-2019  jmcneill Whitespace police
 1.8 09-Feb-2019  skrll Typo in comment
 1.7 09-Feb-2019  skrll Print revidr of BP as well as APs
 1.6 06-Feb-2019  skrll Don't VPRINTF until we have stack for our CPU setup properly
 1.5 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.4 02-Jan-2019  skrll Whitespace
 1.3 02-Jan-2019  skrll Misc. tidyup
 1.2 02-Jan-2019  skrll Fix a ASEND
 1.1 18-Oct-2018  skrll branches: 1.1.2;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.1.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 18-Oct-2018  pgoyette file armv6_start.S was added on branch pgoyette-compat on 2018-10-20 06:58:24 +0000
 1.12.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.4.2 10-Jun-2019  christos Sync with HEAD
 1.12.4.1 08-Apr-2019  christos file armv6_start.S was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.14.4.1 29-Feb-2020  ad Sync with head.
 1.14.2.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1676):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.30.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.30.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.37.4.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #264):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/riscv/riscv/cpu_switch.S: revision 1.3
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

riscv: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.38.6.1 02-Aug-2025  perseant Sync with HEAD
 1.32 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.31 21-Nov-2019  ad branches: 1.31.8;
mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.30 24-Jan-2018  skrll branches: 1.30.4;
Remove port-acorn26

OK core@
 1.29 12-May-2017  skrll KASSERT -> MASSERTMSG
 1.28 17-Apr-2015  matt branches: 1.28.8;
Put the clearing of ci_astpending back in frame.h while interrupts are
disabled.
 1.27 14-Apr-2015  jmcneill __HAVE_PREEEMPTION -> __HAVE_PREEMPTION
 1.26 08-Apr-2015  matt Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
 1.25 29-Oct-2014  skrll branches: 1.25.2;
If our ASID got released and access via TTBR0 is disable make sure we
re-activate the lwp before calling mi_userret; otherwise bad things
happen, e.g. for signals.
 1.24 13-Aug-2014  matt Add __NO_FIQ to prevent testing of the PSR FIQ bit
Use VALID_R15_PSR(pc, spsr) instead of testing explicitly
 1.23 28-Mar-2014  matt branches: 1.23.4;
Make sure the pmap is activated before returning to userland.
 1.22 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.21 16-Aug-2012  matt branches: 1.21.2; 1.21.4;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.20 20-Dec-2010  matt branches: 1.20.8; 1.20.16;
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.19 23-Nov-2009  rmind branches: 1.19.4;
Amend #ifdef with DIAGNOSTIC case, avoids gcc warning about unused var.
 1.18 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.17 19-Dec-2008  njoly Fix remaining archs (arm, luna68k, powerpc and sh3) that were still
using a proc argument instead of an expected lwp for ADDUPROF macro.

ok by christos.
 1.16 19-Nov-2008  matt Add some KASSERTS and tests for I32_bit to include F32_bit
 1.15 22-Jul-2008  matt branches: 1.15.2; 1.15.8;
Implement workaround for:
arm11 Errata 364296:Possible Cache Data Corruption with Hit-Under-Miss

Remove hack in userret which is redundant with workaround.

workaround code from <imre.deak@teleca.com>
 1.14 27-Apr-2008  matt branches: 1.14.2; 1.14.4; 1.14.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.13 05-Nov-2007  ad branches: 1.13.16; 1.13.18; 1.13.20;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.12 17-Oct-2007  garbled 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.11 02-Oct-2007  ad branches: 1.11.2;
Make want_resched a member of cpu_info.
 1.10 18-Feb-2007  matt branches: 1.10.4; 1.10.12; 1.10.18; 1.10.20; 1.10.22; 1.10.24; 1.10.26;
Changes for newlock2.
 1.9 09-Feb-2007  ad branches: 1.9.2;
Merge newlock2 to head.
 1.8 24-Jan-2007  hubertf Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.7 11-Dec-2005  christos branches: 1.7.20; 1.7.28;
merge ktrace-lwp.
 1.6 31-Oct-2003  cl branches: 1.6.16;
Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 17-Jan-2003  thorpej branches: 1.4.2;
Merge the nathanw_sa branch.
 1.3 24-Mar-2002  bjh21 arm26 -> acorn26 changes.
 1.2 05-Jan-2002  chris branches: 1.2.2; 1.2.4;
Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.1 21-Dec-2001  bjh21 Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
 1.2.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 05-Jan-2002  thorpej file ast.c was added on branch kqueue on 2002-01-10 19:37:45 +0000
 1.2.2.9 07-Jan-2003  thorpej In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless. Replace it with a "more work to do"
boolean argument. Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1. This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

Collapse the SA vs. non-SA cases of preempt() together, making the
conditional code block much smaller, and don't call sa_preempt() if
more work is to come.

NOTE: THIS IS NOT A COMPLETE FIX TO THE preempt()-in-uiomove() PROBLEM
THAT CURRENTLY EXISTS FOR SA PROCESSES.
 1.2.2.8 26-Sep-2002  nathanw Change "if (l->l_flag & L_SA_UPCALL)" to "while (l->l_flag & L_SA_UPCALL)"
in userret() functions or equivalent, to permit delivery of multiple upcalls
in a single kernel entry.

XXX It's getting crowded in here. Collapsing posting signals, upcalls, and
XXX kernel-exit handling into one mechanism would be nice.
 1.2.2.7 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.2.2.6 11-Apr-2002  thorpej Make these compile again.
 1.2.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.3 11-Jan-2002  nathanw More catchup.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 05-Jan-2002  nathanw file ast.c was added on branch nathanw_sa on 2002-01-08 00:23:06 +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.6.16.3 15-Nov-2007  yamt sync with head.
 1.6.16.2 27-Oct-2007  yamt sync with head.
 1.6.16.1 26-Feb-2007  yamt sync with head.
 1.7.28.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.7.20.2 01-Feb-2007  ad Sync with head.
 1.7.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.9.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.10.26.1 06-Oct-2007  yamt sync with head.
 1.10.24.4 07-Nov-2007  matt Make non-ARM11 compile again
 1.10.24.3 06-Nov-2007  matt sync with HEAD
 1.10.24.2 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.10.24.1 28-Aug-2007  matt Deal with astpending/want_resched move to cpu_info
 1.10.22.1 01-Jan-2008  chris Sync with HEAD.
 1.10.20.2 06-Nov-2007  joerg Sync with HEAD.
 1.10.20.1 02-Oct-2007  joerg Sync with HEAD.
 1.10.18.2 26-Dec-2007  rjs Sync with HEAD.
 1.10.18.1 01-Nov-2007  rjs Sync with HEAD.
 1.10.12.1 03-Oct-2007  garbled Sync with HEAD
 1.10.4.2 03-Dec-2007  ad Sync with HEAD.
 1.10.4.1 09-Oct-2007  ad Sync with head.
 1.11.2.1 13-Nov-2007  bouyer Sync with HEAD
 1.13.20.3 11-Mar-2010  yamt sync with head
 1.13.20.2 04-May-2009  yamt sync with head.
 1.13.20.1 16-May-2008  yamt sync with head.
 1.13.18.1 18-May-2008  yamt sync with head.
 1.13.16.3 17-Jan-2009  mjf Sync with HEAD.
 1.13.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.13.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.14.6.1 19-Oct-2008  haad Sync with HEAD.
 1.14.4.1 28-Jul-2008  simonb Sync with head.
 1.14.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.15.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.15.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.4.1 05-Mar-2011  rmind sync with head
 1.20.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.20.8.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.20.8.1 30-Oct-2012  yamt sync with head
 1.21.4.2 18-May-2014  rmind sync with head
 1.21.4.1 28-Aug-2013  rmind sync with head
 1.21.2.2 03-Dec-2017  jdolecek update from HEAD
 1.21.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.4.1 10-Nov-2014  martin Actually do pullup rev 1.25 for ticket #188
 1.25.2.2 28-Aug-2017  skrll Sync with HEAD
 1.25.2.1 06-Jun-2015  skrll Sync with HEAD
 1.28.8.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.30.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.23 20-Oct-2022  skrll Trailing whitespace.
 1.22 11-Dec-2020  dholland arm copyin/out: make copyin not use copyout's epilogue (typo in labels)

The epilogues are the same, so this is harmless, but if they ever
changed (e.g. after rearranging the register usage) it would be broken
in a very confusing way.
 1.21 24-Jan-2018  skrll branches: 1.21.16;
Remove port-acorn26

OK core@
 1.20 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.19 29-Oct-2012  chs branches: 1.19.2;
_ARCH_ARM_6 -> _ARM_ARCH_6
 1.18 31-Jul-2012  matt branches: 1.18.2;
Use bcopyinout_xscale.S for armv6+ platforms since they have the
needed instructions.
 1.17 18-Jan-2009  bjh21 branches: 1.17.14; 1.17.22;
Now that GET_CURPCB and GET_CURCPU are generally available, use them
unconditionally rather than rolling our own (often badly) all over the
place.
 1.16 17-Jan-2009  bjh21 Clear out the vestigial support for the Simtec Hydra board. Now that we're
getting support for proper SMP ARMs, keeping non-functional support for
a seriously crippled not-really-SMP system is likely to cause more problems
than it's worth, even if it was fun for a while.
 1.15 27-Apr-2008  matt branches: 1.15.8; 1.15.16;
Merge kernel changes in matt-armv6 to HEAD.
 1.14 11-Dec-2005  christos branches: 1.14.52; 1.14.76; 1.14.78; 1.14.80;
merge ktrace-lwp.
 1.13 31-Oct-2003  scw Insert some nops around the load instructions in badaddr_read_N().
That way, we can be sure any imprecise data abort actually happens
before clearing pcb_onfault.
 1.12 31-Oct-2003  scw Overhaul arm32's abort handlers:

- Assume a permission fault is always the result of an attempted
write, so no need to disassemble the opcode.
(as discussed with Richard Earnshaw/Jason Thorpe a week or two ago)

- Split out non-MMU data aborts into separate functions, and deal
correctly with XScale imprecise aborts. Specifically, the old code
made no attempt to handle the double abort faults which can occur
as a result of two consecutive external (imprecise) aborts. This
was easy to provoke by read(2)ing from a /dev/mem offset which caused
an external abort. With the old code, this would bring the system
down instantly, with little clue as to why. (hint: tf_spsr held
PSR_ABT32_MODE...)

- Re-write badaddr_read() to use pcb_onfault instead of adding extra
overhead to data_abort_handler(). A side effect of this is that it
now benefits from the XScale double abort recovery.

- Invoke the cpu-specific prefetch/data abort fixup routines only if
the host cpu actually needs it. On other cpus, the code is optimised
away.

- Sprinkle __predict_{false,true} in all the right places.

- G/C some excess debugging baggage.
 1.11 13-Oct-2003  scw Xscale-optimised bcopyinout.

Contributed by Wasabi Systems.
 1.10 24-May-2003  thorpej branches: 1.10.2;
Now that the pmap doesn't fall over when we use pld, enable it if
__XSCALE__ is defined. This nearly doubles the lmbench bw-pipe
performance on an ADI BRH board.
 1.9 13-Oct-2002  bjh21 branches: 1.9.4;
Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.8 13-Oct-2002  bjh21 Use cpu_number() to find curpcb, rather than assuming CPU 0.
 1.7 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.6 22-Aug-2002  briggs branches: 1.6.2; 1.6.4;
Handle copies to unaligned addresses a bit better.
 1.5 17-Aug-2002  thorpej More local label fixups.
 1.4 15-Aug-2002  briggs Use local label names (.Lfoo vs. (Lfoo or foo))
 1.3 12-Aug-2002  bjh21 branches: 1.3.2;
Add RCSID and remove unused <sys/errno.h>.
 1.2 12-Aug-2002  bjh21 When copyin/out or copyin/outstr catches a pagefault, have it return the
correct error code (provided by the fault handler in R0) rather than always
returning EFAULT.
 1.1 11-Aug-2002  bjh21 New, improved version of copyin(), copyout(), and kcopy() by Allen Briggs.
This version works on both 26-bit and 32-bit machines. For large copies,
it's up to three times as fast as the old arm32 version and five times as
fast as the old arm26 version. For small copies it seems to be even faster
(getrusage() is apparently over ten times faster on an ARM610).

Hooray for Allen!
 1.3.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.4 27-Aug-2002  thorpej Sync with -current.
 1.3.2.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.3.2.1 12-Aug-2002  nathanw file bcopyinout.S was added on branch nathanw_sa on 2002-08-13 02:17:48 +0000
 1.6.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.4.1 22-Aug-2002  jdolecek file bcopyinout.S was added on branch kqueue on 2002-09-06 08:32:10 +0000
 1.6.2.2 30-Aug-2002  gehenna catch up with -current.
 1.6.2.1 22-Aug-2002  gehenna file bcopyinout.S was added on branch gehenna-devsw on 2002-08-30 00:19:01 +0000
 1.9.4.3 10-Feb-2003  jmc Pullup revs 1.2-1.6 (requested by chris in ticket #1157)
Provide better stability for arm ports by reducing instances of
unaligned copying.
 1.9.4.2 18-Nov-2002  he Pull up revision 1.1 (new, requested by bjh21 in ticket #689):
New and much improved version of copyin(), copyout(), and
kcopy() which works on both 26-bit and 32-bit machines.
 1.9.4.1 13-Oct-2002  he file bcopyinout.S was added on branch netbsd-1-6 on 2002-11-18 02:36:47 +0000
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.80.2 04-May-2009  yamt sync with head.
 1.14.80.1 16-May-2008  yamt sync with head.
 1.14.78.1 18-May-2008  yamt sync with head.
 1.14.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.52.1 28-Aug-2007  matt Use RET. Use new macros to get curpcb.
 1.15.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.15.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.17.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.17.14.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.17.14.1 30-Oct-2012  yamt sync with 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.1 28-Aug-2013  rmind sync with head
 1.21.16.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.12 20-Oct-2022  skrll Trailing whitespace.
 1.11 01-Dec-2013  joerg For load/store double, name the second register explicitly.
 1.10 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.9 12-Aug-2013  matt Fix a bad mov pc,lr -> RET
 1.8 11-Aug-2013  matt fix conditional instructions to conform to unified syntax
use push/pop
use RET/RETc
 1.7 18-Jan-2009  bjh21 branches: 1.7.14; 1.7.24; 1.7.28;
Now that GET_CURPCB and GET_CURCPU are generally available, use them
unconditionally rather than rolling our own (often badly) all over the
place.
 1.6 17-Jan-2009  bjh21 Clear out the vestigial support for the Simtec Hydra board. Now that we're
getting support for proper SMP ARMs, keeping non-functional support for
a seriously crippled not-really-SMP system is likely to cause more problems
than it's worth, even if it was fun for a while.
 1.5 27-Apr-2008  matt branches: 1.5.8; 1.5.16;
Merge kernel changes in matt-armv6 to HEAD.
 1.4 06-Dec-2005  ross branches: 1.4.52; 1.4.76; 1.4.78; 1.4.80;
Must have a nop after an add to the pc.
This corrects a bug affecting kcopy() to unaligned dst addresses.
 1.3 15-Dec-2003  scw branches: 1.3.4; 1.3.16; 1.3.18;
Work-around an obscure bug (reported by a couple of people, and reproduced
exactly twice by me) which causes the code at the top of copyin which
word-aligns the destination pointer to copy more bytes than necessary,
resulting in an alignment fault later on.

The bug is difficult to reproduce, but as far as I can tell it seems
to be as a result of the condition codes being corrupted, possibly
following a page fault caused by the first ldrbt/strb instructions.
The subsequent ldr<cc>bt/str<cc>b instructions then _always_ execute.
I can't think of any obvious reason why this would happen, though.
 1.2 23-Oct-2003  scw A few minor tweaks to the onfault handlers.
Save some instructions in the non-fault return path.
 1.1 13-Oct-2003  scw Xscale-optimised bcopyinout.

Contributed by Wasabi Systems.
 1.3.18.1 21-Jun-2006  yamt sync with head.
 1.3.16.1 26-Mar-2009  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1993):
sys/arch/arm/arm/bcopyinout_xscale.S: revision 1.4
Must have a nop after an add to the pc.
This corrects a bug affecting kcopy() to unaligned dst addresses.
 1.3.4.5 11-Dec-2005  christos Sync with head.
 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 15-Dec-2003  skrll file bcopyinout_xscale.S was added on branch ktrace-lwp on 2004-08-03 10:32:29 +0000
 1.4.80.2 04-May-2009  yamt sync with head.
 1.4.80.1 16-May-2008  yamt sync with head.
 1.4.78.1 18-May-2008  yamt sync with head.
 1.4.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.52.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.5.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.7.28.2 18-May-2014  rmind sync with head
 1.7.28.1 28-Aug-2013  rmind sync with head
 1.7.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.14.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.9 20-Oct-2022  skrll Trailing whitespace.
 1.8 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.7 11-Aug-2013  matt Use push/pop
 1.6 11-Aug-2013  matt Change r12 -> ip
Change all condition instructions so they pass unified syntax
 1.5 15-Aug-2002  briggs branches: 1.5.134; 1.5.150; 1.5.160; 1.5.166;
Use local label names (.Lfoo vs. (Lfoo or foo))
 1.4 02-Jun-2001  bjh21 branches: 1.4.2; 1.4.4; 1.4.10; 1.4.18;
Save R14 (in a proper stack frame) around {read,write}_multi_1, since page
faults can corrupt it on arm26.
 1.3 02-Jun-2001  bjh21 Add write_multi_1().
 1.2 30-May-2001  bjh21 Add read_multi_1() which does what it says fairly fast.
 1.1 29-May-2001  bjh21 Move blockio.S from sys/arch/arm32/arm32 to sys/arch/arm/arm, since I want to
start using it on arm26.

hpcarm gets to keep its own version, since it's not identical and I haven't
got an hpcarm box to test.
 1.4.18.1 30-Aug-2002  gehenna catch up with -current.
 1.4.10.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.4.10.1 02-Jun-2001  thorpej file blockio.S was added on branch nathanw_sa on 2002-08-19 21:38:49 +0000
 1.4.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.166.1 28-Aug-2013  rmind sync with head
 1.5.160.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.150.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.5.134.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.13 18-Oct-2020  skrll Trailing whitespace
 1.12 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.11 01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.10 28-May-2017  jmcneill Add a few bootconfig helpers:
- get_bootconf_string: returns a copy of the "value" part of a k=v pair
as a string.
- match_bootconf_option: returns true if the "value" part of a k=v pair
exists and the supplied val param is present in the beginning of the
k=v pair's value.
 1.9 02-Mar-2016  christos PR/50881: David Binderman: Remove redundant code.
 1.8 06-Jan-2015  jmcneill add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
 1.7 05-Sep-2014  matt branches: 1.7.2;
Don't use not as a variable since it's reserved in C++.
 1.6 02-Aug-2009  gavan branches: 1.6.22; 1.6.38;
On NetBSD/iyonix:

* Disable interrupts in otherwise-configure Nvidia graphics card
* Support genfb console, based on information supplied by the bootloader
* Support kernel args
* Support ways to choose which console to use
* Clarify argument parsing a little.

(from me and abs)
 1.5 24-Oct-2006  bjh21 branches: 1.5.58; 1.5.76;
ANSIfy, KNF, remove unnecessary includes.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 02-Jun-2005  he branches: 1.3.2;
Adapt to shadowing and qualifier-cast warnings.
 1.2 10-Mar-2002  lukem branches: 1.2.14;
* rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
 1.1 13-May-2001  bjh21 branches: 1.1.2; 1.1.4; 1.1.10;
Move get_bootconf_option() into a new file, sys/arch/arm/arm/bootconfig.c,
since it's in no way machine-dependent. It's not really ARM-specific either,
but I don't think it's useful enough to be made part of the MI kernel.
 1.1.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.10.1 13-May-2001  nathanw file bootconfig.c was added on branch nathanw_sa on 2002-04-01 07:39:05 +0000
 1.1.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.14.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.1 30-Dec-2006  yamt sync with head.
 1.4.22.1 10-Dec-2006  yamt sync with head.
 1.4.20.1 18-Nov-2006  ad Sync with head.
 1.5.76.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.58.1 19-Aug-2009  yamt sync with head.
 1.6.38.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.6.22.1 03-Dec-2017  jdolecek update from HEAD
 1.7.2.3 28-Aug-2017  skrll Sync with HEAD
 1.7.2.2 19-Mar-2016  skrll Sync with HEAD
 1.7.2.1 06-Apr-2015  skrll Sync with HEAD
 1.4 28-Oct-2013  matt branches: 1.4.2;
Make these compatible with thumb/thumb2
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 15-Jul-2012  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Add byte-swap versions.
Use RET and RETc(c)
Use ENTRY_NP
 1.1 06-Jun-2012  skrll Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.2.8.2 18-May-2014  rmind sync with head
 1.2.8.1 28-Aug-2013  rmind sync with head
 1.2.6.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.2.6.2 30-Oct-2012  yamt sync with head
 1.2.6.1 15-Jul-2012  yamt file bus_space_a2x.S was added on branch yamt-pagecache on 2012-10-30 17:18:55 +0000
 1.2.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 10-Aug-2012  jdc Pull up revisions:
src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
src/sys/arch/arm/gemini/files.gemini revision 1.12
src/sys/arch/arm/mpcore/files.mpcore revision 1.2
src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
src/sys/arch/arm/omap/files.omap revision 1.6
src/sys/arch/arm/omap/files.omap2 revision 1.9
src/sys/arch/arm/omap/omap_a2x_io.S delete
src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.2.2.1 15-Jul-2012  jdc file bus_space_a2x.S was added on branch netbsd-6 on 2012-08-10 12:15:51 +0000
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 28-Oct-2013  matt file bus_space_a2x.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.4 28-Oct-2013  matt branches: 1.4.2;
Make these compatible with thumb/thumb2
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 15-Jul-2012  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Add byte-swap versions.
Use RET and RETc(c)
Use ENTRY_NP
 1.1 06-Jun-2012  skrll Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.2.8.2 18-May-2014  rmind sync with head
 1.2.8.1 28-Aug-2013  rmind sync with head
 1.2.6.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.2.6.2 30-Oct-2012  yamt sync with head
 1.2.6.1 15-Jul-2012  yamt file bus_space_a4x.S was added on branch yamt-pagecache on 2012-10-30 17:18:55 +0000
 1.2.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 10-Aug-2012  jdc Pull up revisions:
src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
src/sys/arch/arm/gemini/files.gemini revision 1.12
src/sys/arch/arm/mpcore/files.mpcore revision 1.2
src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
src/sys/arch/arm/omap/files.omap revision 1.6
src/sys/arch/arm/omap/files.omap2 revision 1.9
src/sys/arch/arm/omap/omap_a2x_io.S delete
src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.2.2.1 15-Jul-2012  jdc file bus_space_a4x.S was added on branch netbsd-6 on 2012-08-10 12:15:51 +0000
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 28-Oct-2013  matt file bus_space_a4x.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.12 24-Sep-2020  skrll Trailing whitespace
 1.11 28-Oct-2013  matt Make these compatible with thumb/thumb2
 1.10 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.9 19-Mar-2013  skrll branches: 1.9.6;
To quote the BCM2835 datasheet that's publicly available

"The BCM2835 system uses an AMBA AXI-compatible interface
structure. In order to keep the system complexity low and data
throughput high, the BCM2835 AXI system does not always
return read data in-order."

Deal with this by defining DSB for _ARM_ARCH_6.

OK matt@
 1.8 27-Sep-2012  matt Add DSB
 1.7 15-Jul-2012  matt branches: 1.7.2;
Add byte-swap versions.
Use RET and RETc(c)
Use ENTRY_NP
 1.6 19-Jun-2010  matt branches: 1.6.8; 1.6.16;
Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.5 11-Dec-2005  christos branches: 1.5.80; 1.5.98; 1.5.100; 1.5.102;
merge ktrace-lwp.
 1.4 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.3 27-Mar-2003  mycroft branches: 1.3.2;
Add a couple of byte-wide variants that weren't implemented -- I guess because
nobody else has a byte-accessible bus.
 1.2 29-Aug-2002  briggs Add generic_bs_sr_4
 1.1 12-Apr-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add some generic bus_space ops, which are pulled in by the
"bus_space_generic" configuration attribute.
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 12-Apr-2002  jdolecek file bus_space_asm_generic.S was added on branch kqueue on 2002-06-23 17:34:42 +0000
 1.1.6.1 07-Dec-2002  he Pull up revision 1.2 (requested by briggs in ticket #748):
Add generic_bs_sr_4.
 1.1.4.1 31-Aug-2002  gehenna catch up with -current.
 1.1.2.3 29-Aug-2002  briggs Sync with head.
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 12-Apr-2002  nathanw file bus_space_asm_generic.S was added on branch nathanw_sa on 2002-04-17 00:02:22 +0000
 1.3.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.102.1 03-Jul-2010  rmind sync with head
 1.5.100.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.80.1 11-Aug-2010  yamt sync with head.
 1.6.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.6.8.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.6.8.1 30-Oct-2012  yamt sync with head
 1.7.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.2 23-Jun-2013  tls resync from head
 1.7.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.6.2 18-May-2014  rmind sync with head
 1.9.6.1 28-Aug-2013  rmind sync with head
 1.5 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.4 11-Dec-2005  christos branches: 1.4.98; 1.4.114; 1.4.124; 1.4.130;
merge ktrace-lwp.
 1.3 04-Jul-2005  bsh Reduce 1K bytes of code size by gathering calls to panic into one
subroutine.
 1.2 10-Sep-2001  reinoud branches: 1.2.4; 1.2.22;
Initial commitment of the bus_space_mmap() functions as proposed by Jason R
Thorpe as an extension to the bus_space(9) API.

Only the mainbus has a working mmap... iomd, podulebus and isa dont have
one yet. Its trivial to add the iomd and isa's memory part but am a bit
hessistant to add it without knowing its implications by heart.

Podulebus might be implemented in 32 bits EASI but otherwise its not really
transparent since there is AFAIK no function to explicitly read one byte or
so .. or is this implemented in a higher level ?

ARM26 and arch/arm32/dnard (Shark) kernels compile and RiscPC and Shark
kernels are tested and function OK.

Implications of other ARM systems like hpcarm and ebarm are propably
minimal or solved trivially.
 1.1 18-Jun-2001  bjh21 branches: 1.1.2; 1.1.4; 1.1.6;
Merge arm32/dev/bus_space_notimpl.S and hpcarm/hpcarm/bus_space_notimpl.S
into arm/arm/bus_space_notimpl.S. They were identical anyway.

This file has no excuse for being in assembler, but I'll leave that for another
day.
 1.1.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.22.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.4.2 10-Sep-2001  reinoud Initial commitment of the bus_space_mmap() functions as proposed by Jason R
Thorpe as an extension to the bus_space(9) API.

Only the mainbus has a working mmap... iomd, podulebus and isa dont have
one yet. Its trivial to add the iomd and isa's memory part but am a bit
hessistant to add it without knowing its implications by heart.

Podulebus might be implemented in 32 bits EASI but otherwise its not really
transparent since there is AFAIK no function to explicitly read one byte or
so .. or is this implemented in a higher level ?

ARM26 and arch/arm32/dnard (Shark) kernels compile and RiscPC and Shark
kernels are tested and function OK.

Implications of other ARM systems like hpcarm and ebarm are propably
minimal or solved trivially.
 1.2.4.1 10-Sep-2001  reinoud file bus_space_notimpl.S was added on branch nathanw_sa on 2001-09-10 02:20:20 +0000
 1.4.130.1 28-Aug-2013  rmind sync with head
 1.4.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.114.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.4.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3 18-Sep-2021  jmcneill bus_space_is_equal: fix crash when called with NULL tag
 1.2 08-Sep-2021  jmcneill Consider two tags equal if they share the same cookie. For fdtbus,
we may have different tags to deal with mapping attributes and CPU vs bus
address translation, but otherwise represent the same bus space.
 1.1 13-Apr-2020  maxv branches: 1.1.2; 1.1.4;
Add KASAN-DMA support on aarch64, same as amd64. Discussed with skrll@.
 1.1.4.2 21-Apr-2020  martin Sync with HEAD
 1.1.4.1 13-Apr-2020  martin file bus_stubs.c was added on branch phil-wifi on 2020-04-21 18:42:03 +0000
 1.1.2.2 20-Apr-2020  bouyer Sync with HEAD
 1.1.2.1 13-Apr-2020  bouyer file bus_stubs.c was added on branch bouyer-xenpvh on 2020-04-20 11:28:52 +0000
 1.19 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.18 18-Aug-2013  matt branches: 1.18.42;
Include <arm/locore.h>
 1.17 16-Aug-2012  matt branches: 1.17.2; 1.17.4;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.16 21-Nov-2009  rmind branches: 1.16.12; 1.16.20;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.15 24-Apr-2008  ad branches: 1.15.2; 1.15.4; 1.15.20;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.14 20-Dec-2007  dsl branches: 1.14.6; 1.14.8;
Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.13 04-Mar-2007  christos branches: 1.13.16; 1.13.20; 1.13.22; 1.13.30; 1.13.34;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 18-Feb-2007  ad More signals/locking changes.
 1.11 18-Feb-2007  matt Adapt to newlock2
 1.10 09-Feb-2007  ad branches: 1.10.2;
Merge newlock2 to head.
 1.9 05-Aug-2006  bjh21 branches: 1.9.4;
Centralize the various checks for validity of a CPU context in one macro,
so we don't have to get it right in lots of different places.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 13-Sep-2005  christos split compat_16 functions to their own file and make this compile again.
 1.6 17-Jan-2003  thorpej branches: 1.6.2; 1.6.18;
Merge the nathanw_sa branch.
 1.5 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.4 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.3 10-Mar-2001  bjh21 branches: 1.3.2; 1.3.4; 1.3.10;
Don't allow the I and F (IRQ and FIQ disable) flags to be set in the PSR
by sigreturn. This prevents user processes disabling interrupts by messing
with their signal context.
 1.2 04-Mar-2001  bjh21 branches: 1.2.2;
ANSIfy while I'm here.
 1.1 04-Mar-2001  bjh21 Make compat_13_sys_sigreturn() work on arm26, and move it from
arch/arm/arm32/compat_13_machdep.c to arch/arm/arm/compat_13_machdep.c.
 1.2.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.10.6 18-Oct-2002  nathanw Catch up to -current.
 1.3.10.5 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.3.10.4 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.3.10.3 08-Jan-2002  nathanw Catch up to -current.
 1.3.10.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.3.10.1 10-Mar-2001  thorpej file compat_13_machdep.c was added on branch nathanw_sa on 2001-11-15 08:28:22 +0000
 1.3.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 10-Mar-2001  bouyer file compat_13_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.6.18.5 21-Jan-2008  yamt sync with head
 1.6.18.4 03-Sep-2007  yamt sync with head.
 1.6.18.3 26-Feb-2007  yamt sync with head.
 1.6.18.2 30-Dec-2006  yamt sync with head.
 1.6.18.1 21-Jun-2006  yamt sync with head.
 1.6.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.10.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.10.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.13.30.1 26-Dec-2007  ad Sync with head.
 1.13.22.1 09-Jan-2008  matt sync with HEAD
 1.13.20.1 01-Jan-2008  chris Sync with HEAD.
 1.13.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.14.8.1 18-May-2008  yamt sync with head.
 1.14.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.20.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.15.4.3 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.15.4.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.15.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.15.2.1 11-Mar-2010  yamt sync with head
 1.16.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.16.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.12.1 30-Oct-2012  yamt sync with head
 1.17.4.1 28-Aug-2013  rmind sync with head
 1.17.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.21 04-Mar-2023  skrll Trailing whitespace
 1.20 27-Oct-2021  thorpej Use the signal trampoline version constants from <sys/signal.h>.
 1.19 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.18 24-Jan-2018  skrll branches: 1.18.16;
Remove port-acorn26

OK core@
 1.17 18-Aug-2013  matt Include <arm/locore.h>
 1.16 16-Aug-2012  matt branches: 1.16.2; 1.16.4;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.15 16-Aug-2012  matt Rename process_frame to lwp_trapframe
 1.14 25-Jan-2012  tsutsui branches: 1.14.4;
STACKALIGN(fp) -> STACK_ALIGN(fp, STACK_ALIGNBYTES)
per recent param.h cleanup.
 1.13 30-Jun-2011  wiz branches: 1.13.2; 1.13.6;
dependant -> dependent
 1.12 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.11 21-Nov-2008  ad _KERNEL_OPT
 1.10 24-Apr-2008  ad branches: 1.10.2; 1.10.4; 1.10.8; 1.10.10; 1.10.16;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.9 21-Dec-2007  matt branches: 1.9.6; 1.9.8;
Make this compile again.
 1.8 20-Dec-2007  dsl Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.7 04-Mar-2007  christos branches: 1.7.16; 1.7.20; 1.7.22; 1.7.30; 1.7.34;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.6 18-Feb-2007  ad More signals/locking changes.
 1.5 18-Feb-2007  briggs Adapt to newlock2.
 1.4 09-Feb-2007  ad branches: 1.4.2;
Merge newlock2 to head.
 1.3 05-Aug-2006  bjh21 branches: 1.3.4;
Centralize the various checks for validity of a CPU context in one macro,
so we don't have to get it right in lots of different places.
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.8; 1.2.18;
merge ktrace-lwp.
 1.1 13-Sep-2005  christos branches: 1.1.6;
split compat_16 functions to their own file and make this compile again.
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 13-Sep-2005  skrll file compat_16_machdep.c was added on branch ktrace-lwp on 2005-11-10 13:55:09 +0000
 1.2.18.6 21-Jan-2008  yamt sync with head
 1.2.18.5 03-Sep-2007  yamt sync with head.
 1.2.18.4 26-Feb-2007  yamt sync with head.
 1.2.18.3 30-Dec-2006  yamt sync with head.
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file compat_16_machdep.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:08 +0000
 1.2.8.1 11-Aug-2006  yamt sync with head
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.3.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.4.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.4.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.7.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.7.30.1 26-Dec-2007  ad Sync with head.
 1.7.22.1 09-Jan-2008  matt sync with HEAD
 1.7.20.1 01-Jan-2008  chris Sync with HEAD.
 1.7.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.10.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.10.4.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.10.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.10.2.2 11-Mar-2010  yamt sync with head
 1.10.2.1 04-May-2009  yamt sync with head.
 1.13.6.1 18-Feb-2012  mrg merge to -current.
 1.13.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.13.2.2 30-Oct-2012  yamt sync with head
 1.13.2.1 17-Apr-2012  yamt sync with head
 1.14.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.16.4.1 28-Aug-2013  rmind sync with head
 1.16.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14 20-Oct-2022  skrll Trailing whitespace.
 1.13 30-Jun-2020  maxv Make copystr() a MI C function, part of libkern and shared on all
architectures.

Notes:

- On alpha and ia64 the function is kept but gets renamed locally to avoid
symbol collision. This is because on these two arches, I am not sure
whether the ASM callers do not rely on fixed registers, so I prefer to
keep the ASM body for now.
- On Vax, only the symbol is removed, because the body is used from other
functions.
- On RISC-V, this change fixes a bug: copystr() was just a wrapper around
strlcpy(), but strlcpy() makes the operation less safe (strlen on the
source beyond its size).
- The kASan, kCSan and kMSan wrappers are removed, because now that
copystr() is in C, the compiler transformations are applied to it,
without the need for manual wrappers.

Could test on amd64 only, but should be fine.
 1.12 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.11 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.10 18-Jan-2009  bjh21 branches: 1.10.14; 1.10.24; 1.10.28;
Now that GET_CURPCB and GET_CURCPU are generally available, use them
unconditionally rather than rolling our own (often badly) all over the
place.
 1.9 27-Apr-2008  matt branches: 1.9.8; 1.9.16;
Merge kernel changes in matt-armv6 to HEAD.
 1.8 13-Oct-2002  bjh21 branches: 1.8.88; 1.8.112; 1.8.114; 1.8.116;
Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.7 13-Oct-2002  bjh21 Use cpu_number() to find curpcb, rather than assuming CPU 0.
 1.6 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.5 17-Aug-2002  thorpej branches: 1.5.2; 1.5.4;
More local label fixups.
 1.4 15-Aug-2002  briggs Use local label names (.Lfoo vs. (Lfoo or foo))
 1.3 12-Aug-2002  bjh21 branches: 1.3.2;
Add RCSID.
 1.2 12-Aug-2002  bjh21 When copyin/out or copyin/outstr catches a pagefault, have it return the
correct error code (provided by the fault handler in R0) rather than always
returning EFAULT.
 1.1 11-Aug-2002  bjh21 Move the arm32 copystr.S from arch/arm/arm32 to arch/arm/arm and add support
for 26-bit modes (basically saving R14 when we might get a page fault).
Use it on all ARM architectures now.
 1.3.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.3.2.1 12-Aug-2002  nathanw file copystr.S was added on branch nathanw_sa on 2002-08-13 02:17:48 +0000
 1.5.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.4.1 17-Aug-2002  jdolecek file copystr.S was added on branch kqueue on 2002-09-06 08:32:11 +0000
 1.5.2.2 30-Aug-2002  gehenna catch up with -current.
 1.5.2.1 17-Aug-2002  gehenna file copystr.S was added on branch gehenna-devsw on 2002-08-30 00:19:01 +0000
 1.8.116.2 04-May-2009  yamt sync with head.
 1.8.116.1 16-May-2008  yamt sync with head.
 1.8.114.1 18-May-2008  yamt sync with head.
 1.8.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.88.1 28-Aug-2007  matt Use RET. Use new macros to get curpcb.
 1.9.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.9.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.28.1 28-Aug-2013  rmind sync with head
 1.10.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.14.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.10 10-Nov-2020  rin Stop turning on EABI flag to core files dumped by OABI binaries.
This seems a bug introduced in rev 1.5:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/arm/core_machdep.c#rev1.5
 1.9 20-Nov-2019  pgoyette branches: 1.9.8;
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation. Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !
 1.8 27-Apr-2015  skrll branches: 1.8.18;
ARM spells the System Control Register SCTLR
 1.7 25-Feb-2014  matt branches: 1.7.6;
Default to EXEC_ELF32
 1.6 25-Feb-2014  matt #include <arm/locore.h>
 1.5 24-Feb-2014  matt If we are dumping a EABI coredump, set the version to EABI5.
If we are dumping a BE coredump on a BE8 system, set the BE8 flag.
 1.4 04-Jan-2014  dsl branches: 1.4.2;
Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
 1.3 01-Jan-2014  dsl Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
 1.2 15-Aug-2009  matt branches: 1.2.12; 1.2.22; 1.2.26;
Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.1 19-Nov-2008  ad branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1.12.3 19-Aug-2009  yamt sync with head.
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 19-Nov-2008  yamt file core_machdep.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:38 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 19-Nov-2008  skrll file core_machdep.c was added on branch nick-hppapmap on 2009-01-19 13:15:56 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 19-Nov-2008  mjf file core_machdep.c was added on branch mjf-devfs2 on 2009-01-17 13:27:51 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 19-Nov-2008  haad file core_machdep.c was added on branch haad-dm on 2008-12-13 01:13:01 +0000
 1.2.26.1 18-May-2014  rmind sync with head
 1.2.22.2 03-Dec-2017  jdolecek update from HEAD
 1.2.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.12.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.4.2.3 25-Feb-2014  matt Tag BE8 coredumps properly.
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 04-Jan-2014  matt file core_machdep.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.7.6.1 06-Jun-2015  skrll Sync with HEAD
 1.8.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.13 01-Dec-2020  rin Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.12 12-Nov-2020  rin If neither COMPAT_NETBSD32 nor MODULAR is defined, there's
no chance for lwp to be running under COMPAT_NETBSD32.

Suggested by mrg.
 1.11 10-Nov-2020  rin Test (epp->ep_esch->es_emul != &emul_netbsd) instead of
(epp->ep_esch->es_emul == &emul_netbsd32) to determine whether curlwp is
running on COMPAT_NETBSD32 or not.

The former is possible even if COMPAT_NETBSD32 is not built in the main
kernel. Now, compat_netbsd32 module can work on !COMPAT_NETBSD32 kernel.

Discussed with pgoyette.

XXX
Apply similar fixes, i.e., drop ``#ifdef COMPAT_NETBSD32'' conditional
codes from the rest parts of MD codes for aarch64 and mips64.
 1.10 27-Apr-2015  skrll branches: 1.10.30;
ARM spells the System Control Register SCTLR
 1.9 20-Feb-2014  matt branches: 1.9.6;
Make sure to clear MDLWP_NOALIGNFLT on !aapcs or !(armv6 && armv7)
 1.8 20-Dec-2013  matt branches: 1.8.2;
If we are exec'ing AAPCS and running on armv6+, disable alignment faults
since gcc 4.8 will generate code that uses unaligned accesses.
 1.7 22-Oct-2013  matt Read the right register for checking big endianess.
 1.6 21-Oct-2013  joerg Missing subject.
 1.5 10-Sep-2013  matt Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.
 1.4 05-Aug-2013  matt Add EF_ARM_BE8
Make sure that running a program, that it right big-endian format for the
processor. (BE8 for armv7, BE32 for all others).
 1.3 11-Aug-2012  matt branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8;
Use oabi instead of atpcs32
 1.2 05-Aug-2012  matt back out elf note changes and use EF_ARM_ABIVERS to determine EABI usage.
 1.1 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.3.8.2 18-May-2014  rmind sync with head
 1.3.8.1 28-Aug-2013  rmind sync with head
 1.3.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.6.1 11-Aug-2012  matt file cpu_exec.c was added on branch matt-nb6-plus on 2012-11-28 22:40:10 +0000
 1.3.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.3.4.2 30-Oct-2012  yamt sync with head
 1.3.4.1 11-Aug-2012  yamt file cpu_exec.c was added on branch yamt-pagecache on 2012-10-30 17:18:55 +0000
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.3 25-Feb-2014  matt fix typo
 1.8.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.2.1 20-Dec-2013  matt file cpu_exec.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.9.6.1 06-Jun-2015  skrll Sync with HEAD
 1.10.30.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.13 20-Oct-2022  skrll Trailing whitespace.
 1.12 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.11 15-Feb-2015  skrll Really fix arm_cksumdata for <4 bytes of data
 1.10 14-Feb-2015  skrll Correct arm_cksumdata for <4 bytes of data
 1.9 06-Jan-2015  christos fix conditional; makes 0 len mbuf, 0 offset, 0 len test work.
 1.8 22-Dec-2013  matt branches: 1.8.4; 1.8.6;
Use arm_cksumdata instead of .L_cksumdata
pop {..., pc} instead of pop {..., lr}; RET
 1.7 19-Dec-2013  joerg Use explicit register pairs as arguments for ldrd.
 1.6 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.5 18-Aug-2013  matt Fix local symbol to be local
use END/ASEND
 1.4 12-Aug-2013  riz Fix up some missed unified syntax.
 1.3 11-Aug-2013  matt Use unified syntax for conditional instructions
Use RETc/RET
 1.2 27-Jan-2008  chris branches: 1.2.2; 1.2.4; 1.2.12; 1.2.14; 1.2.36; 1.2.52; 1.2.62; 1.2.68;
Fix arm cpu_in_cksum. It was walking the mbuf chain wrongly, and trying
to read from the wrong memory address and so causing protection faults.

Tested with iperf, mounting nfs drives, and also the regress tool.
 1.1 26-Jan-2008  chris branches: 1.1.2;
Add arm version of cpu_in_cksum. Based on previous in_cksum4 code.

In fact it's mostly the same code, with a different stub on it.

On a cats the regress/sys/net/in_cksum tests show that it takes around
50-60% of the time the C version takes. In some cases it takes as low as
20%.
 1.1.2.3 09-Feb-2008  chris Sync to HEAD.
 1.1.2.2 27-Jan-2008  chris Sync to HEAD.
 1.1.2.1 26-Jan-2008  chris file cpu_in_cksum.S was added on branch chris-arm-intr-rework on 2008-01-27 13:08:36 +0000
 1.2.68.2 18-May-2014  rmind sync with head
 1.2.68.1 28-Aug-2013  rmind sync with head
 1.2.62.2 03-Dec-2017  jdolecek update from HEAD
 1.2.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.52.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.36.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.14.2 23-Mar-2008  matt sync with HEAD
 1.2.14.1 27-Jan-2008  matt file cpu_in_cksum.S was added on branch matt-armv6 on 2008-03-23 02:03:54 +0000
 1.2.12.2 28-Feb-2008  rjs Sync with HEAD.
 1.2.12.1 27-Jan-2008  rjs file cpu_in_cksum.S was added on branch hpcarm-cleanup on 2008-02-28 21:58:52 +0000
 1.2.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.4.1 27-Jan-2008  mjf file cpu_in_cksum.S was added on branch mjf-devfs on 2008-02-18 21:04:22 +0000
 1.2.2.2 04-Feb-2008  yamt sync with head.
 1.2.2.1 27-Jan-2008  yamt file cpu_in_cksum.S was added on branch yamt-lazymbuf on 2008-02-04 09:21:44 +0000
 1.8.6.1 06-Apr-2015  skrll Sync with HEAD
 1.8.4.2 17-Feb-2015  martin Fix previous (r1.11 missing in last pullup)
 1.8.4.1 16-Feb-2015  martin Pull up following revision(s) (requested by skrll in ticket #522):
sys/arch/arm/conf/std.arm: revision 1.3
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.9
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.10
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.11
Fix conditional; makes 0 len mbuf, 0 offset, 0 len test work.
-
Correct arm_cksumdata for <4 bytes of data
Really fix arm_cksumdata for <4 bytes of data
-
Re-enable CPU_IN_CKSUM now the bugs are fixed.
 1.8 23-Dec-2012  matt branches: 1.8.2; 1.8.6; 1.8.14;
Make inner loop do up 128 bytes into one shot.
Reorganize the code that deals with non-dword starts.
 1.7 23-Dec-2012  matt Generate the trailing mask at the start and put it and the starting address
in r11/r10 and use them as need. Always round the length endian address to
a word boundary. Unconditionally apply the trailing mask at the end since
it's a cheap op.
 1.6 22-Dec-2012  matt When doing 16 bytes at a time, alternate register sets to reduce load stall
times.
 1.5 22-Dec-2012  matt Always round up to word lengths.
 1.4 21-Dec-2012  matt More optimizations (have separate 64-byte loop which alternates loads
and add of different registers). Be more consistent on endian issues.
Use pld.
 1.3 20-Dec-2012  matt Add fast path for dealing with a single 32-bit word at the end.
 1.2 20-Dec-2012  matt Make this work. Various fixes and some further optimizations.
 1.1 19-Dec-2012  matt Move the final ip checksum to a common file to be included.
Add a generic ip checksum calculator for a buffer (ptr/len).
 1.8.14.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.14.1 23-Dec-2012  matt file cpu_in_cksum_buffer.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.8.6.2 25-Feb-2013  tls resync with head
 1.8.6.1 23-Dec-2012  tls file cpu_in_cksum_buffer.S was added on branch tls-maxphys on 2013-02-25 00:28:23 +0000
 1.8.2.2 23-Jan-2013  yamt sync with head
 1.8.2.1 23-Dec-2012  yamt file cpu_in_cksum_buffer.S was added on branch yamt-pagecache on 2013-01-23 00:05:39 +0000
 1.4 23-Dec-2012  matt branches: 1.4.2; 1.4.6; 1.4.14;
Conditional execution still takes one cycle per skipped instruction.
branch to unlikely cases instead of conditionally skipping them.
 1.3 20-Dec-2012  matt Add $NetBSD$
 1.2 20-Dec-2012  matt Move loading of r1 with 0xffff to cpu_in_cksum_fold.S
 1.1 19-Dec-2012  matt Move the final ip checksum to a common file to be included.
Add a generic ip checksum calculator for a buffer (ptr/len).
 1.4.14.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.14.1 23-Dec-2012  matt file cpu_in_cksum_fold.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.4.6.2 25-Feb-2013  tls resync with head
 1.4.6.1 23-Dec-2012  tls file cpu_in_cksum_fold.S was added on branch tls-maxphys on 2013-02-25 00:28:23 +0000
 1.4.2.2 23-Jan-2013  yamt sync with head
 1.4.2.1 23-Dec-2012  yamt file cpu_in_cksum_fold.S was added on branch yamt-pagecache on 2013-01-23 00:05:39 +0000
 1.4 20-Dec-2012  matt branches: 1.4.2; 1.4.6; 1.4.14;
Move loading of r1 with 0xffff to cpu_in_cksum_fold.S
 1.3 19-Dec-2012  matt Move the final ip checksum to a common file to be included.
Add a generic ip checksum calculator for a buffer (ptr/len).
 1.2 18-Dec-2012  matt Add ldrd support (one additional instruction over 5 ldrs) but two of them
won't be executed resulting in 2 less loads which should save a few cyles.
 1.1 18-Dec-2012  matt Add a routine to compute the IP checksum of a 20-byte IP header.
 1.4.14.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.14.1 20-Dec-2012  matt file cpu_in_cksum_v4hdr.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.4.6.2 25-Feb-2013  tls resync with head
 1.4.6.1 20-Dec-2012  tls file cpu_in_cksum_v4hdr.S was added on branch tls-maxphys on 2013-02-25 00:28:23 +0000
 1.4.2.2 23-Jan-2013  yamt sync with head
 1.4.2.1 20-Dec-2012  yamt file cpu_in_cksum_v4hdr.S was added on branch yamt-pagecache on 2013-01-23 00:05:39 +0000
 1.6 06-Sep-2025  riastradh paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs
 1.5 14-Nov-2021  riastradh branches: 1.5.4; 1.5.12;
arm: Fix CPU startup synchronization.

- Use load-acquire instead of (wrong) membar_consumer then load in
cpu_boot_secondary_processors and cpu_hatched_p.

=> (Could use load then membar_consumer instead but load-acquire is
shorter.)

- Issue dmb ish before setting or clearing the bit in
cpu_set_hatched and cpu_clr_mbox to effect a store-release.

=> (Could use membar_exit, which is semantically weaker than dmb ish
but on arm is just implemented as dmb ish.)

=> (Could use stlr except we don't have atomic_ops(9) to do that.)

This way, everything before cpu_set_hatched or cpu_clr_mbox is
guaranteed to happen before everything after
cpu_boot_secondary_processors, which was previously not guaranteed.
 1.4 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.3 03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.2 30-Nov-2020  skrll Ensure stores are observed before the 'sev' instructions.
 1.1 15-Feb-2020  skrll branches: 1.1.2; 1.1.6; 1.1.10;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.1.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 15-Feb-2020  martin file cpu_subr.c was added on branch phil-wifi on 2020-04-08 14:07:27 +0000
 1.1.2.2 29-Feb-2020  ad Sync with head.
 1.1.2.1 15-Feb-2020  ad file cpu_subr.c was added on branch ad-namecache on 2020-02-29 20:18:17 +0000
 1.5.12.1 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/riscv/riscv/cpu_subr.c: revision 1.6
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
common/lib/libc/arch/i386/atomic/atomic.S: revision 1.38
common/lib/libc/arch/sparc/atomic/membar_ops.S: revision 1.9
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
common/lib/libc/arch/sparc64/atomic/membar_ops.S: revision 1.10
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
sys/arch/virt68k/virt68k/locore.s: revision 1.17
common/lib/libc/arch/x86_64/atomic/atomic.S: revision 1.32

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.5.4.1 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
common/lib/libc/arch/i386/atomic/atomic.S: revision 1.38
common/lib/libc/arch/sparc/atomic/membar_ops.S: revision 1.9
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
common/lib/libc/arch/sparc64/atomic/membar_ops.S: revision 1.10
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
common/lib/libc/arch/x86_64/atomic/atomic.S: revision 1.32
(all via patch)

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.186 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.185 22-Dec-2022  ryo Explicitly disable overflow interrupts before enabling the cycle counter.
 1.184 16-May-2022  skrll branches: 1.184.4;
port-arm/50635: arm11_setup() cpuctrlmask value causes CPU_CONTROL_VECRELOC bit to toggle

Fix slightly differently to as suggested in the PR. Annotate arm10_setup
while I'm here.
 1.183 27-Nov-2021  skrll Apply some errata workarounds for Cortex A17
 1.182 13-Nov-2021  jmcneill Set ACTLR.SMP=1 on Cortex-A17
 1.181 02-Jul-2021  skrll Be consistent about #ifndef ARM32_DISABLE_ALIGNMENT_FAULTS. NFCI.
 1.180 31-Jan-2021  skrll branches: 1.180.4;
One #include "opt_cputypes.h" is enough for anyone
 1.179 01-Dec-2020  rin Fix earmv6{,hf}eb start-up routines:

- Turn on U-bit in SCTLR before E-bit is turned on by ``setend be'',
in order to avoid undefined condition. ARM1176JZF-S, at least, halts
if only E-bit is turned on.

- Turn on EE-bit in SCTLR instead of B-bit as we've switched to BE8.
 1.178 30-Oct-2020  skrll branches: 1.178.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.177 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.176 05-Feb-2020  skrll Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.

armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO

bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.

XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.175 20-Oct-2018  skrll branches: 1.175.4; 1.175.6;
Clean up around cpu_ttb and fix a bunch of builds
 1.174 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.173 23-Aug-2018  skrll Whitespace
 1.172 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.171 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.170 12-Jul-2018  jakllsch <sys/pmc.h> is gone; don't #include it
 1.169 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.168 01-Apr-2018  ryo branches: 1.168.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.167 22-Oct-2017  skrll branches: 1.167.2;
KNF
 1.166 27-Aug-2017  skrll #ifdef whack-a-mole
 1.165 26-Aug-2017  skrll Fixup CPU_PJ4B for recent armv7 tlb operation changes.
 1.164 24-Aug-2017  jmcneill Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.163 28-Jan-2017  jakllsch Drop inadvertent redundant CPU_CONTROL_MMU_ENABLE ((1 < 22)) for PJ4Bv7.

This was intended to be CPU_CONTROL_UNAL_ENABLE, which is already handled.

Should fix PR kern/51921.
 1.162 18-Oct-2016  kiyohara branches: 1.162.2;
Indent.
 1.161 30-May-2016  dholland branches: 1.161.2;
PR 50669 David Binderman: remove dead code
 1.160 23-Jan-2016  christos Rename the cpu_id() define to cpu_idnum() so that it does not conflict with
dtrace and friends.
 1.159 10-Dec-2015  skrll PR port-arm/50512: Source code condition impossible

Fix condition which broke ARM1136 function selection when ARM1176 support
was added
 1.158 25-Nov-2015  skrll G/C TEGRAK1_PMAP_WORKAROUND.

Using XN (eXecute Never) properly means speculative reads from devices
aren't done. Pretty sure this was the cause of the wedges.
 1.157 15-Oct-2015  skrll Setting actlr.bit15=1 (Force in order issue in the branch execution unit)
makes my jetson tk1 stable. Apply this workaround until we figure out
what the real problem is.
 1.156 02-Jul-2015  skrll Use armreg_*_{read,write} instead of handcrafted asm

No functional change.
 1.155 03-Jun-2015  hsuenaga initialize sdcache operations for PJ4B.
otherwise the kernel crashes without 'options L2CACHE_ENABLE.'
 1.154 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.153 17-Apr-2015  hsuenaga don't call L2 maintance function if L2 cache is disabled.
 1.152 15-Apr-2015  hsuenaga clean up cpufuncs of CPU_PJ4B.

PJ4B is a ARMv7 compatible CPU, so most of cpufuncs are just redundant.
we need funcs for:
- Marvell specific registers
- workaround of errata
- and Marvell specific L2 cache maintainance
if I/O coherency fabric is enabled(option AURORA_IO_CACHE_COHERENCY),
probaly we don't need to maintain L2 cache by software.
 1.151 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.150 31-Jul-2014  skrll branches: 1.150.2; 1.150.4;
Trailing whitespace.
 1.149 30-Jul-2014  skrll Apply some errata workarounds
 1.148 27-Jul-2014  skrll More fixes as a step towards ARM_MMU_EXTENDED on RPI.

- don't set CPU_CONTROL_SYST_ENABLE in arm11x6_setup for ARM_MMU_EXTENDED

- Use the new MMU defines for V6N

- pull in arm/cpuconf.h in vmparam s that VM_MAXUSER_ADDRESS gets set
correctly.
 1.147 18-Apr-2014  christos Include cpufunc_proto.h before locore.h so that we define cpu_cpwait first.
XXX: this is a mess.
 1.146 14-Apr-2014  matt Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.145 10-Apr-2014  matt change cortex_cpufunc to armv7_cpufuncs. CPU_CORTEX -> CPU_ARMV7
 1.144 30-Mar-2014  matt branches: 1.144.2;
arm11 ARM_MMU_EXTENDED support (setting CPU_CONTROL_XP_ENABLE)
 1.143 30-Mar-2014  skrll Use arm11_setttb for arm1176 as well.
 1.142 29-Mar-2014  matt cortex doesn't need xscale_setup
use arm11_setttb for arm11x6.
 1.141 28-Mar-2014  matt Initialize cache way_size and sets
 1.140 21-Feb-2014  matt For now, don't reset arm_cache_prefer_mask unless both l1 caches are PIPT
 1.139 20-Feb-2014  matt Keep track of what each cache is (VIVT/VIPT/PIPT).

cpu0: 32KB/32B 2-way L1 VIPT Instruction cache
cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu0: 256KB/64B 8-way write-through L2 PIPT Unified cache
 1.138 20-Feb-2014  matt armv7 doens't need to use the arm11 routines anymore.
 1.137 20-Feb-2014  matt Make sure AFLT_ENABLE in the cpuctrl mask for armv7_setup.
 1.136 23-Jan-2014  matt For armv7, CPU_CONTROL_UNAL_ENABLE is MBO/SBPO.
Make sure CPU_CONTROL_EX_BEND is set for big endian kernels.
Don't clear bits we aren't setting.
 1.135 21-Jan-2014  christos - comment out set but not used variables.
- make commenting out the cpuctrlmask consistent
 1.134 12-Jan-2014  joerg Improve assembler syntax.
 1.133 04-Jan-2014  joerg Add missing volatile for hidden side effects of asm.
 1.132 20-Dec-2013  matt Add CPU_IS_ARMV6_P() macro
 1.131 18-Dec-2013  skrll Remove unused variables.
 1.130 12-Nov-2013  matt Make sure CPU_CONTROL_UNAL_ENABLE is enabled for armv7 cpus (should be
already but ...)
 1.129 12-Nov-2013  skrll Add CPU_CONTROL_UNAL_ENABLE. New ABIs demand unaligned accesses!
 1.128 06-Nov-2013  christos ifdef notyet code.
 1.127 23-Oct-2013  skrll Fix PR/48332 by reverting to passing 0xffffffff as the cpuctrlmask.
Comment out the cpuctrlmask that doesn't work for the imx23_olinuxino
leaving it there for reference.
 1.126 20-Oct-2013  skrll Use cpuctrlmask in the arm1[01] case.
 1.125 18-Aug-2013  matt Add a CPU_IS_ARMV7_P() macro (nonv7 evals to false, v7 only true, otherwise
cpu_armv7_p is checked (and is set by cpuconf for cortex and pj4b).
 1.124 18-Aug-2013  matt Include <arm/locore.h>
 1.123 18-Jun-2013  matt branches: 1.123.2;
Only set CPU_CONTROL_VECRELOC if ARM_HAS_VBAR is not defined.
 1.122 12-Jun-2013  matt Nuke cpu_pfr, just use the armreg_pfr?_read inlines
 1.121 12-Jun-2013  matt If the L1 instruction cache policy is PIPT, don't set the prefer_mask.
 1.120 19-May-2013  rkujawa Plug support for PJ4B core into our ARM CPU support infrastructure.

Obtained from Marvell, Semihalf.
 1.119 28-Dec-2012  msaitoh Enable DCache Streaming Switch and Write Allocate for Sheeva CPU.
This change improve system performance significantly.
 1.118 12-Nov-2012  skrll C99 types
 1.117 19-Oct-2012  matt Add armv7_drain_writebuf (which is just a dsb).
 1.116 11-Sep-2012  matt branches: 1.116.2;
Add secondary cache range ops
 1.115 07-Sep-2012  matt Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.114 07-Sep-2012  matt Change _l2_ to _log2_ to make sure they don't confused with level 2.
 1.113 29-Aug-2012  matt Recode armv7_dcache_wbinv_all in asm. Add armv7_dcache_inv_all and
armv7_icache_inv_all as well.
Use dsb/dmb/isb instructions
 1.112 29-Aug-2012  matt always start PMC cycle counter for ARM11 and Cortex.
 1.111 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.110 16-Aug-2012  matt Move the standard definitions of the {UND,IRQ,FIQ,ABT}_STACK_SIZE to
<arm32/machdep.h>
Move the extern for cpu_reset_address to the same file.
Add cpu_reset_address_paddr.
Kill cpu_reset_v4_MMU_disable.
if cpu_reset_address is NULL, then the MMU will be disabled.
 1.109 23-Jul-2012  skrll Make auxiliary register naming consistent for the 1136.
 1.108 21-Jul-2012  skrll Add support for the ARM1176JZS
 1.107 14-Jul-2012  hans Support cpu_sleep() on Sheeva CPUs.
 1.106 13-Jul-2012  matt Begin support for Cortex A5, A7, A15 and expand A8 and A9 definitions.
Instead of testing all possible CPUids for a cortex, we know what range
a cortex will be so mask out the insignificant parts and do a single test.
 1.105 20-May-2012  skrll Add the 'Z' to the 1176 cpu product name.

ok matt@
 1.104 31-Jan-2012  matt branches: 1.104.2;
Convert stragglers to use real C89 prototypes.
 1.103 10-Mar-2011  bsh branches: 1.103.4; 1.103.8;
add MPCore to CPU-ID table
add branch predict bit to arm11_options
 1.102 10-Mar-2011  bsh Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.101 02-Oct-2010  kiyohara branches: 1.101.2;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.100 23-Sep-2010  kiyohara Replace some whitespaces to Tab.
 1.99 05-Jul-2010  kiyohara Remove unnecessary white-spaces.
 1.98 05-Jul-2010  kiyohara Fix set the control register.
 1.97 19-Jun-2010  matt Fix cache probing on Cortex. Add missing CORTEX dependency in cpu.c
 1.96 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.95 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.94 27-Dec-2009  uebayasi branches: 1.94.2; 1.94.4;
Add write-through cache work-around for ARM11 as well as ARM9/ARM10. Analyzed
& tested on i.MX35 with help from Tsubai Masanari.
 1.93 15-Mar-2009  cegger ansify function definitions
 1.92 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.91 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.90 12-Dec-2008  matt branches: 1.90.2;
Fix merge botch from april...
 1.89 15-Oct-2008  matt branches: 1.89.2; 1.89.10;
Add fa526_flush_prefetchbuf
 1.88 14-Oct-2008  matt Add FA526 support (compile tested only)
 1.87 27-Aug-2008  matt Add support Cortex-A8. Pretend they are ARM11s. Support new cache sizing
method introduced with Cortex-A8.
 1.86 22-Jul-2008  matt Implement workaround for:
arm11 Errata 364296:Possible Cache Data Corruption with Hit-Under-Miss

Remove hack in userret which is redundant with workaround.

workaround code from <imre.deak@teleca.com>
 1.85 13-Jul-2008  chris Remove repeated setting of cpuctl bit for vectors being high in cpu setup
code.

Pointed out in private email by Kevin Lo.
 1.84 27-Apr-2008  matt branches: 1.84.2; 1.84.4; 1.84.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.83 15-Mar-2008  rearnsha branches: 1.83.2; 1.83.4;
Allow detection of VFP devices on ARM11 cores.
 1.82 24-Feb-2008  matt allow arm11 to use high vectors.
 1.81 15-Apr-2007  matt branches: 1.81.8; 1.81.12; 1.81.14; 1.81.30; 1.81.34;
Convert to cpufunc_* to struct initializers.
 1.80 08-Mar-2007  matt branches: 1.80.2; 1.80.4;
Fix inverted test (cputype != 0) and now my shark boots again!
 1.79 04-Mar-2007  bjh21 Finally make cpufuncs work properly on acorn26, since something seems to be
using it. This entailed adding support for ARM2 and ARM2as, and allowing
for getting CPU IDs other than from CP15, since ARM2(as) doesn't have CP15.
 1.78 06-Jan-2007  christos branches: 1.78.2;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.77 26-Mar-2006  peter branches: 1.77.8; 1.77.12;
Report the SA1100 control register state.

From Arnaud Lacombe on port-hpcarm.
 1.76 24-Dec-2005  perry branches: 1.76.4; 1.76.6; 1.76.8; 1.76.10; 1.76.12;
bare asm -> __asm
 1.75 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.74 11-Dec-2005  christos merge ktrace-lwp.
 1.73 20-Jul-2005  nonaka Added i80219.
 1.72 04-Jul-2005  bsh branches: 1.72.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.71 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.70 02-Jun-2005  he Adapt to shadowing and qualifier-cast warnings.
 1.69 10-May-2005  rearnsha Detect arm1026ej-s.
 1.68 22-Dec-2004  joff support high vectors on ARM9
 1.67 03-Apr-2004  bsh add an option to force ARM9 dcache to write-through mode.
 1.66 26-Jan-2004  rearnsha Switch the ARM9 to using the Dcache in write-back mode. Avoid an
unknown problem with dcache_inv_range by using a wbinv for now
(similarly for ARM10).

When setting the ARM9 system control register, use the computed
cpuctrlmask value (not 0xffffffff) so that the clocking-mode bits are
not reset to FastBus mode (which isn't very fast).
 1.65 05-Nov-2003  scw Add "options ARM32_DISABLE_ALIGNMENT_FAULTS" to forcibly disable
alignment fault checking if necessary.

This option gets the acorn32 port working again.

XXX: Richard Earnshaw suggested enabling alignment faults for
XXX: userland only on acorn32. Need to investigate this.
 1.64 25-Oct-2003  scw Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.63 06-Sep-2003  rearnsha Support for ARM10. Extract some additional information about the
dcache so that we can have cache cleaning code that works for any
permitted arm10 cache architecture.
 1.62 03-Sep-2003  mycroft Recognize some TI processors -- not that you'd want to use them.
 1.61 15-Jul-2003  lukem __KERNEL_RCSID()
 1.60 25-May-2003  ichiro branches: 1.60.2;
About CP14 register, ixp425 does not need xscalereg.h
 1.59 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.58 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.57 21-Apr-2003  thorpej #ifdef, not #if, for XSCALE_NO_COALESCE_WRITES.
 1.56 18-Apr-2003  scw - In the various cpu_setup() functions, check if the vector page
is at ARM_VECTORS_HIGH and set CPU_CONTROL_VECRELOC if so.

- Don't de-ref a NULL args pointer in parse_cpu_options().
 1.55 18-Mar-2003  bsh simplify CPU ID test for Intel PXA2xx by masking core revision part.

This also allows the kernel to run on pxa255.
 1.54 20-Aug-2002  briggs Coalesced writes on xscale systems do not always work. If
XSCALE_NO_COALESCE_WRITES is set, disable. Otherwise, enable.
 1.53 20-Aug-2002  briggs Enable branch prediction and write coalescing on XScale.
 1.52 16-Aug-2002  thorpej * Add a new machdep.powersave sysctl, which controls the use of
the CPU's "sleep" function in the idle loop.
* Default all CPUs to not use powersave, except for the PDA processors
(SA11x0 and PXA2x0).

This significantly reduces inteterrupt latency in high-performance
applications (and was good to squeeze another ~10% out of an XScale
IOP on a Gig-E benchmark).
 1.51 16-Aug-2002  thorpej If __ARMEB__ is defined, always set CPU_CONTROL_BEND_ENABLE in
the CPU control register.
 1.50 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.49 22-Jul-2002  briggs Handle i80200 step D0 and i80321 step B0
 1.48 15-Jul-2002  ichiro add support for ixp12x0
 1.47 10-Jul-2002  ichiro add cpu id for "PXA250/210 3rd version CPUcore".

for using many PDA/xscale-core.
 1.46 07-Jun-2002  thorpej Add the CPU ID for the 600MHz i80321 part.
 1.45 22-May-2002  thorpej Back out an unintended change.
 1.44 03-May-2002  rjs branches: 1.44.2; 1.44.4;
Use processor specific versions of ARM cache control functions for SA1100
and SA1110 instead of using SA110 ones.

Rename common StrongARM functions from sa110_* to sa1_*.

Reviewed by Jason Thorpe.
 1.43 03-May-2002  thorpej Add support for the Intel PXA210 and PXA250. From Hiroyuki Bessho, PR 16617.
 1.42 12-Apr-2002  thorpej Default all XScale core processors to the read/write-allocate write-back
cache mode. Add a new XSCALE_CACHE_WRITE_THROUGH option for people who
are paranoid about the cache-related errata (you *do* have to line up
the planets correctly to trip them, but having the option is useful).
 1.41 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.40 09-Apr-2002  thorpej Define 2 classes of ARM MMUs:
1. Generic (compatible with ARM6)
1. XScale (can be used as generic, but also has certainly nifty extensions).

Define abstract PTE bit defintions for each MMU class. If only one MMU
class is configured into the kernel (based on CPU_* options), then we
get the constants for that MMU class. Otherwise we indirect through
varaibles set up via set_cpufuncs().

XXX The XScale bits are currently the same as the generic bits. Baby steps.
 1.39 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.38 28-Mar-2002  thorpej Use write-back caching on the Verde.
 1.37 27-Mar-2002  thorpej The 80321 manual lies; it does have a CPU ID distinct from the 80200.
Add that CPU ID, and add a case for it.
 1.36 26-Mar-2002  thorpej Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.35 24-Mar-2002  bjh21 Add ARM610 cache information. Not yet tested because booting on ARM610s seems
to be broken at present.
 1.34 16-Mar-2002  bjh21 Get rid of the #ifdef DEBUG_FAULT_CORRECTION #ifdef mess, and use a
couple of conditionally-defined macros instead. This makes the
fault-correction code almost readable.
 1.33 16-Mar-2002  bjh21 Kill some unnecessary settings of arm_dcache_align_mask.
 1.32 16-Mar-2002  bjh21 For those CPUs which don't have a cache-type register, keep the details
of the cache in a static table. Note that the table isn't complete --
contributions of cache details for CPUs whose data sheets I haven't got are
welcome.
 1.31 16-Mar-2002  reinoud Clean up cpufunc.c so you can really use it for debugging ... the
dependency on DEBUG_PMAP was useless anyway since the PMAP_DEBUG was
printing soooo much garbage cpufunc's debugging stuff was lost anyway.
 1.30 09-Mar-2002  bjh21 Replace cpu_id and cpu_ctrl in struct _cpu with ci_cpuid and ci_ctrl in
struct cpu_info. Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
 1.29 30-Jan-2002  thorpej Set the CPU sleep routine to sa11x0_cpu_sleep() on SA-1100 and SA-1110
processors.
 1.28 25-Jan-2002  thorpej * Default dcache_inv_range to xscale_cache_flushD_rng for XScale
cores.
* For i80200 Step-A0 and Step-A1, set dcache_inv_range to
xscale_cache_purgeD_rng to work around a bug where a D$
"invalidate by address" doesn't properly clear the dirty
bits on the cache block (i80200 errata item #25).
 1.27 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.26 24-Jan-2002  briggs Two changes for XScale:
1) Add defparam XSCALE_CCLKCFG to define a parameter for the
CCLKCFG register. Default it to '9' on the IQ80310.
2) Add a sleep call to the xscale CPU function vector (replacing
the nullop) which should drop the CPU into "idle" mode when
cpu_switch finds nothing on the run queues.
 1.25 23-Jan-2002  thorpej i80200: Call i80200_intr_init() to initialize the ICU, rather than
doing it ourselves.
 1.24 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.23 08-Dec-2001  chris Improve comment on the clockswitching asm code, it doesn't use r0 at all, it just needs it to make valid asm.
 1.22 01-Dec-2001  thorpej Reset the i80200 ICU and PMU to a pristine state very early.
 1.21 01-Dec-2001  bjh21 Don't define get_cachetype() unless it's going to be used.
 1.20 01-Dec-2001  thorpej On the i80200, disable ECC in the Bus Controller Unit early on; we
don't really have code to deal with ECC errors yet.
 1.19 29-Nov-2001  thorpej Fetch cache info from the Cache Type register on ARM7TDMI and "greater"
processors. Report this when the processor is attached.
 1.18 26-Nov-2001  thorpej Add code to run the XScale cache in write-though mode, and do so
for now...
 1.17 23-Nov-2001  thorpej Disable the BTB by default on the XScale again; there's some early
stepping errata to deal with before we can safely do this.
 1.16 19-Nov-2001  thorpej Add a "cpwait" cpufunc, currently a nullop on all but XScale.
"cpwait" ensures that all coprocessor operations have completed
before returning.
 1.15 14-Nov-2001  thorpej branches: 1.15.2;
* Give the XScale its own cpu_control() entry point; we have to flush
the Branch Target Buffer of the BPRD bit changes.
* Enable Branch Prediction on the XScale by default.
* Don't invalidate the Branch Target Buffer explicitly. the i80200
manual (section 5.1, Branch Target Buffer Operation) notes that
manual software management of the BTB is unnecessary; it is flushed
implicitly when:
* processor resets
* FCSE process ID is written
* I-cache is invalidated
 1.14 10-Nov-2001  thorpej Fix some whitespace.
 1.13 07-Nov-2001  thorpej First cut at XScale setup code. Needs more work.
 1.12 18-Oct-2001  rearnsha branches: 1.12.2;
Add support calls for ARM9.

Where ARM9, StrongARM and XScale share the same function, rename it
as armv4_XXX.
 1.11 09-Jul-2001  reinoud branches: 1.11.2;
Changed the variable within the ARM6 late abort section from cpu_ctrl to
cpuctrl ...
 1.10 07-Jun-2001  chris branches: 1.10.2;
Checkin fix to ARM7TDMI support. As per patch from John Fremlin to
port-arm32.
 1.9 03-Jun-2001  chris Add support for ARM7TDMI, as provided in a patch from John Fremlin to port-arm32.

Shouldn't effect any currently in tree ports.
 1.8 03-Jun-2001  bjh21 Rather than duplicating the LDM/STM/LDC/STC fixup code between
early_abort_fixup() and late_abort_fixup(), have the latter tail-call the
former. This saves another 200 bytes, and I've found my ARM710a card now, so
I've even tested it.
 1.7 02-Jun-2001  bjh21 In {early,late}_abort_fixup(), return ABORT_FIXUP_FAILED, rather than
panic'ing, if we hit an instruction we can't fix up. This saves 250-odd bytes
of code, and should allow the caller to print a more useful message.
 1.6 02-Jun-2001  bjh21 late_abort_fixup: Get the indentation right!
 1.5 02-Jun-2001  bjh21 Replace arm6_dataabt_fixup() and arm7_dataabt_fixup() with early_abort_fixup()
and late_abort_fixup(), based on the abort model in use, rather than the CPU
type. This cleans up the code and makes it smaller. Only tested on an
ARM6 -- I can't find my ARM710a card right now.
 1.4 02-Jun-2001  bjh21 Initial cpufunc operations for ARM3. Not actually used yet.
 1.3 13-May-2001  bjh21 Include opt_cputypes.h, since we use CPU_*.
 1.2 13-May-2001  bjh21 Don't include parse_cpu_options() unless we're going to use it. This fixes
a warning on arm26.
 1.1 06-May-2001  bjh21 Move cpufunc stuff from arm32/arm32 to arm/arm. The only change involved is
to add recognition of the SA-1100 and SA-1110 for compatibility with hpcarm
(which is now using this code as well).
 1.10.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.11.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.11.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.15.2.11 27-Aug-2002  thorpej Sync with -current.
 1.15.2.10 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.15.2.9 13-Aug-2002  nathanw Catch up to -current.
 1.15.2.8 01-Aug-2002  nathanw Catch up to -current.
 1.15.2.7 20-Jun-2002  nathanw Catch up to -current.
 1.15.2.6 17-Apr-2002  nathanw Catch up to -current.
 1.15.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.15.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.15.2.3 11-Jan-2002  nathanw More catchup.
 1.15.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.15.2.1 14-Nov-2001  nathanw file cpufunc.c was added on branch nathanw_sa on 2002-01-08 00:23:06 +0000
 1.44.4.5 07-Dec-2002  he Pull up revision 1.53 (requested by thorpej in ticket #703):
Enable branch prediction and write coalescing on XScale.
 1.44.4.4 18-Nov-2002  he Pull up revision 1.51 (requested by thorpej in ticket #685):
If __ARMEB__ is defined, always set CPU_CONTROL_BEND_ENABLE
in the CPU control register.
 1.44.4.3 29-Jul-2002  lukem Pull up revision 1.49 (requested by thorpej in ticket #549):
Handle i80200 step D0 and i80321 step B0
 1.44.4.2 07-Jun-2002  thorpej pullup-1-6 ticket #208:

syssrc/sys/arch/arm/arm/cpufunc.c 1.46
syssrc/sys/arch/arm/arm32/cpu.c 1.38
syssrc/sys/arch/arm/include/armreg.h 1.19

Original log message:

Add the CPU ID for the 600MHz i80321 part.
 1.44.4.1 23-May-2002  tv Pull up revision 1.45 (requested by thorpej):
Back out an unintended change.
 1.44.2.5 30-Aug-2002  gehenna catch up with -current.
 1.44.2.4 21-Jul-2002  gehenna catch up with -current.
 1.44.2.3 16-Jul-2002  gehenna catch up with -current.
 1.44.2.2 14-Jul-2002  gehenna catch up with -current.
 1.44.2.1 30-May-2002  gehenna Catch up with -current.
 1.60.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.60.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.60.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.60.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.60.2.1 03-Aug-2004  skrll Sync with HEAD
 1.72.2.5 17-Mar-2008  yamt sync with head.
 1.72.2.4 27-Feb-2008  yamt sync with head.
 1.72.2.3 03-Sep-2007  yamt sync with head.
 1.72.2.2 26-Feb-2007  yamt sync with head.
 1.72.2.1 21-Jun-2006  yamt sync with head.
 1.76.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.76.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.76.8.1 01-Apr-2006  yamt sync with head.
 1.76.6.1 22-Apr-2006  simonb Sync with head.
 1.76.4.1 09-Sep-2006  rpaulo sync with head
 1.77.12.1 21-Feb-2007  snj branches: 1.77.12.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.77.12.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.77.8.1 12-Jan-2007  ad Sync with head.
 1.78.2.2 07-May-2007  yamt sync with head.
 1.78.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.80.4.1 11-Jul-2007  mjf Sync with head.
 1.80.2.1 27-May-2007  ad Sync with head.
 1.81.34.4 17-Jan-2009  mjf Sync with HEAD.
 1.81.34.3 28-Sep-2008  mjf Sync with HEAD.
 1.81.34.2 02-Jun-2008  mjf Sync with HEAD.
 1.81.34.1 03-Apr-2008  mjf Sync with HEAD.
 1.81.30.1 24-Mar-2008  keiichi sync with head.
 1.81.14.3 23-Mar-2008  matt sync with HEAD
 1.81.14.2 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.81.14.1 29-Aug-2007  matt Make arm11 use the armv6 cpufuncs.
 1.81.12.1 21-Mar-2008  chris Sync with head.
 1.81.8.1 28-Feb-2008  rjs Sync with HEAD.
 1.83.4.5 09-Oct-2010  yamt sync with head
 1.83.4.4 11-Aug-2010  yamt sync with head.
 1.83.4.3 11-Mar-2010  yamt sync with head
 1.83.4.2 04-May-2009  yamt sync with head.
 1.83.4.1 16-May-2008  yamt sync with head.
 1.83.2.1 18-May-2008  yamt sync with head.
 1.84.6.1 19-Oct-2008  haad Sync with HEAD.
 1.84.4.2 28-Jul-2008  simonb Sync with head.
 1.84.4.1 18-Jul-2008  simonb Sync with head.
 1.84.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.89.10.3 09-Jun-2014  matt Fix tpyo.
 1.89.10.2 26-Mar-2014  matt For armv7, enable BE properly. Make sure UNAL is always set.
 1.89.10.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.89.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.89.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.90.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.94.4.3 21-Apr-2011  rmind sync with head
 1.94.4.2 05-Mar-2011  rmind sync with head
 1.94.4.1 03-Jul-2010  rmind sync with head
 1.94.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.94.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.101.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.103.8.2 02-Jun-2012  mrg sync to latest -current.
 1.103.8.1 18-Feb-2012  mrg merge to -current.
 1.103.4.6 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.103.4.5 23-Jan-2013  yamt sync with head
 1.103.4.4 16-Jan-2013  yamt sync with (a bit old) head
 1.103.4.3 30-Oct-2012  yamt sync with head
 1.103.4.2 23-May-2012  yamt sync with head.
 1.103.4.1 17-Apr-2012  yamt sync with head
 1.104.2.3 13-Jul-2016  snj Pull up following revision(s) (requested by skrll in ticket #1354):
sys/arch/arm/arm/cpufunc.c: revision 1.159
PR port-arm/50512: Source code condition impossible
Fix condition which broke ARM1136 function selection when ARM1176 support
was added
 1.104.2.2 07-Jan-2013  riz Pull up following revision(s) (requested by msaitoh in ticket #774):
sys/arch/arm/arm/cpufunc.c: revision 1.119
Enable DCache Streaming Switch and Write Allocate.
This change improve system performance significantly.
 1.104.2.1 09-Aug-2012  jdc branches: 1.104.2.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.104.2.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.116.2.5 03-Dec-2017  jdolecek update from HEAD
 1.116.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.116.2.3 23-Jun-2013  tls resync from head
 1.116.2.2 25-Feb-2013  tls resync with head
 1.116.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.123.2.2 18-May-2014  rmind sync with head
 1.123.2.1 28-Aug-2013  rmind sync with head
 1.144.2.1 10-Aug-2014  tls Rebase.
 1.150.4.9 28-Aug-2017  skrll Sync with HEAD
 1.150.4.8 05-Feb-2017  skrll Sync with HEAD
 1.150.4.7 05-Dec-2016  skrll Sync with HEAD
 1.150.4.6 09-Jul-2016  skrll Sync with HEAD
 1.150.4.5 19-Mar-2016  skrll Sync with HEAD
 1.150.4.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.150.4.3 22-Sep-2015  skrll Sync with HEAD
 1.150.4.2 06-Jun-2015  skrll Sync with HEAD
 1.150.4.1 06-Apr-2015  skrll Sync with HEAD
 1.150.2.2 12-Jan-2016  snj Pull up following revision(s) (requested by skrll in ticket #1060):
sys/arch/arm/arm/cpufunc.c: revision 1.159
PR port-arm/50512: Source code condition impossible
Fix condition which broke ARM1136 function selection when ARM1176 support
was added
 1.150.2.1 27-May-2015  msaitoh branches: 1.150.2.1.2;
Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.150.2.1.2.1 12-Jan-2016  snj Pull up following revision(s) (requested by skrll in ticket #1060):
sys/arch/arm/arm/cpufunc.c: revision 1.159
PR port-arm/50512: Source code condition impossible
Fix condition which broke ARM1136 function selection when ARM1176 support
was added
 1.161.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.161.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.162.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.167.2.5 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.167.2.4 20-Oct-2018  pgoyette Sync with head
 1.167.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.167.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.167.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.168.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.168.2.1 10-Jun-2019  christos Sync with HEAD
 1.175.6.1 29-Feb-2020  ad Sync with head.
 1.175.4.1 27-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #742):

sys/arch/arm/arm32/pmap.c: revision 1.388
sys/arch/arm/arm32/armv7_generic_space.c: revision 1.11
sys/arch/arm/arm/cpufunc.c: revision 1.176
sys/arch/arm/conf/Makefile.arm: revision 1.54 (via patch)
sys/arch/arm/include/arm32/pmap.h: revision 1.161

Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.
armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO
bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.
XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.178.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.178.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.180.4.1 01-Aug-2021  thorpej Sync with HEAD.
 1.184.4.1 23-Dec-2022  martin Pull up following revision(s) (requested by ryo in ticket #20):

sys/arch/arm/arm/cpufunc.c: revision 1.185
sys/dev/tprof/tprof.c: revision 1.22
sys/arch/arm/arm32/arm32_boot.c: revision 1.45
sys/dev/tprof/tprof_armv8.c: revision 1.19
sys/dev/tprof/tprof_armv7.c: revision 1.12
sys/arch/aarch64/aarch64/cpu.c: revision 1.71
sys/arch/aarch64/aarch64/cpu.c: revision 1.72

tprof_lock is not a spin mutex. use mutex_{enter,exit}(). oops

Explicitly disable overflow interrupts before enabling the cycle counter.

PMCR_EL0.LC should be set. ARM deprecates use of PMCR_EL0.LC=0

Even if an overflow interrupt is occured for a counter outside tprof management,
the bit of onverflow status register must be cleared to prevent an interrupt storm.
 1.17 11-Nov-2021  skrll Trailing whitespace
 1.16 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.15 16-Feb-2012  christos branches: 1.15.2; 1.15.4;
don't need arm/cpu.h, we just need the cpureg.h...
 1.14 27-Apr-2008  matt branches: 1.14.18; 1.14.34; 1.14.38; 1.14.42;
Merge kernel changes in matt-armv6 to HEAD.
 1.13 11-Dec-2005  christos branches: 1.13.52; 1.13.76; 1.13.78; 1.13.80;
merge ktrace-lwp.
 1.12 06-Sep-2003  rearnsha Add a function to read the processor cache configuation register.
 1.11 10-Nov-2001  thorpej branches: 1.11.2; 1.11.20;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.10 18-Oct-2001  rearnsha branches: 1.10.2;
Add support calls for ARM9.

Where ARM9, StrongARM and XScale share the same function, rename it
as armv4_XXX.
 1.9 18-Oct-2001  rearnsha Use 'p15' consistently in all mcr and mrc instructions.

Fix warnings in stm/ldm instructions of get_pc_str_offset.
 1.8 16-Sep-2001  chris Add the first tweak from PR 12364. Don't switch the flush block on an SA, as it makes second and subsequent flushes less efficient. The other tweaks are already committed.
 1.7 05-Sep-2001  matt branches: 1.7.2;
Don't clean the minidata cache by default on XScale.
 1.6 30-Aug-2001  matt When invaliding single icache line on XScale, the branch target buffer
also needs to be invalidated. Also, but in the right sequence to empty
the pipeline on XScale.
 1.5 27-Aug-2001  matt Add xscale cpufuncs (using the sa110 ones when they are identical).
 1.4 05-Jun-2001  bjh21 branches: 1.4.2; 1.4.4;
Add get_pc_str_offset(), which returns the offset between the address of an
instruction that stores the program counter and the value of PC that's stored.
This can vary between ARM implementations, but is guaranteed to be constant on
a given one.
 1.3 03-Jun-2001  chris Add support for ARM7TDMI, as provided in a patch from John Fremlin to port-arm32.

Shouldn't effect any currently in tree ports.
 1.2 02-Jun-2001  bjh21 Initial cpufunc operations for ARM3. Not actually used yet.
 1.1 06-May-2001  bjh21 Move cpufunc stuff from arm32/arm32 to arm/arm. The only change involved is
to add recognition of the SA-1100 and SA-1110 for compatibility with hpcarm
(which is now using this code as well).
 1.4.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.11.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.20.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.2 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.11.2.1 10-Nov-2001  thorpej file cpufunc_asm.S was added on branch nathanw_sa on 2001-11-10 23:14:09 +0000
 1.13.80.1 16-May-2008  yamt sync with head.
 1.13.78.1 18-May-2008  yamt sync with head.
 1.13.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.52.1 28-Aug-2007  matt Use RET instead of mov pc,lr
 1.14.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.14.38.1 18-Feb-2012  mrg merge to -current.
 1.14.34.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.14.34.1 17-Apr-2012  yamt sync with head
 1.14.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.15.4.1 28-Aug-2013  rmind sync with head
 1.15.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12 20-Oct-2022  skrll Trailing whitespace.
 1.11 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.10 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.9 03-Jan-2010  uebayasi branches: 1.9.12; 1.9.22; 1.9.26;
s/These is/These are/
 1.8 17-Oct-2007  garbled branches: 1.8.20; 1.8.38;
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.7 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.6 06-Jan-2007  christos branches: 1.6.6; 1.6.14; 1.6.20; 1.6.22; 1.6.24; 1.6.26;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.24;
merge ktrace-lwp.
 1.4 03-Jun-2005  rearnsha branches: 1.4.2;
Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.3 02-Jun-2005  rearnsha Fix off-by-one error on cache-range functions (where we use op-by-VA) which
caused us to expunge one more line than necessary.
 1.2 23-Aug-2004  thorpej Use the RET macro, rather than "bx lr" unconditionally. Makes this file
compile again for the INTEGRATOR configuration.
 1.1 06-Sep-2003  rearnsha branches: 1.1.4;
Processor-specific operations for ARM10 class devices.
 1.1.4.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.4 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.3 25-Aug-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Sep-2003  skrll file cpufunc_asm_arm10.S was added on branch ktrace-lwp on 2004-08-03 10:32:29 +0000
 1.4.2.2 27-Oct-2007  yamt sync with head.
 1.4.2.1 26-Feb-2007  yamt sync with head.
 1.5.24.1 21-Feb-2007  snj Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.5.20.1 12-Jan-2007  ad Sync with head.
 1.6.26.1 06-Nov-2007  matt sync with HEAD
 1.6.24.1 01-Jan-2008  chris Sync with HEAD.
 1.6.22.1 02-Oct-2007  joerg Sync with HEAD.
 1.6.20.1 01-Nov-2007  rjs Sync with HEAD.
 1.6.14.1 03-Oct-2007  garbled Sync with HEAD
 1.6.6.1 09-Oct-2007  ad Sync with head.
 1.8.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.20.1 11-Mar-2010  yamt sync with head
 1.9.26.2 18-May-2014  rmind sync with head
 1.9.26.1 28-Aug-2013  rmind sync with head
 1.9.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.12.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.17 29-Oct-2014  skrll Don't flush random ASIDs. Instead always assume KERNEL_PID, i.e. 0.
All other TLB flushes are done via

pmap_tlb_invalidate_addr -> tlb_invalidate_addr

OK matt@
 1.16 29-Oct-2014  skrll Simplify #ifdefs
 1.15 31-Jul-2014  skrll branches: 1.15.2;
Comments.
 1.14 31-Jul-2014  skrll Trailing whitespace
 1.13 29-Jul-2014  skrll Remove very old and incorrect comment.
 1.12 30-Mar-2014  matt branches: 1.12.2;
Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.11 20-Feb-2014  matt Refactor and cleanup a bit. Prepare for ASIDs.
 1.10 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.9 22-Sep-2012  matt branches: 1.9.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.8 18-Jul-2012  skrll branches: 1.8.2;
Typo in comment
 1.7 10-May-2012  skrll Typo
 1.6 03-Jan-2010  uebayasi branches: 1.6.12; 1.6.16; 1.6.20;
s/These is/These are/
 1.5 27-Apr-2008  matt branches: 1.5.18;
Merge kernel changes in matt-armv6 to HEAD.
 1.4 17-Oct-2007  garbled branches: 1.4.16; 1.4.18; 1.4.20;
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.3 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.2 11-Dec-2005  christos branches: 1.2.30; 1.2.38; 1.2.46; 1.2.48; 1.2.50; 1.2.52; 1.2.54;
merge ktrace-lwp.
 1.1 03-Jun-2005  rearnsha branches: 1.1.2; 1.1.8;
Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.1.8.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.1 03-Jun-2005  skrll file cpufunc_asm_arm11.S was added on branch ktrace-lwp on 2005-11-10 13:55:09 +0000
 1.1.2.1 27-Oct-2007  yamt sync with head.
 1.2.54.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.52.3 06-Nov-2007  matt sync with HEAD
 1.2.52.2 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.2.52.1 29-Aug-2007  matt Call armv6_*. Use RET
 1.2.50.1 01-Jan-2008  chris Sync with HEAD.
 1.2.48.1 02-Oct-2007  joerg Sync with HEAD.
 1.2.46.1 01-Nov-2007  rjs Sync with HEAD.
 1.2.38.1 03-Oct-2007  garbled Sync with HEAD
 1.2.30.1 09-Oct-2007  ad Sync with head.
 1.4.20.2 11-Mar-2010  yamt sync with head
 1.4.20.1 16-May-2008  yamt sync with head.
 1.4.18.1 18-May-2008  yamt sync with head.
 1.4.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.6.16.1 02-Jun-2012  mrg sync to latest -current.
 1.6.12.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.6.12.2 30-Oct-2012  yamt sync with head
 1.6.12.1 23-May-2012  yamt sync with head.
 1.8.2.3 03-Dec-2017  jdolecek update from HEAD
 1.8.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.2 18-May-2014  rmind sync with head
 1.9.2.1 28-Aug-2013  rmind sync with head
 1.12.2.1 10-Aug-2014  tls Rebase.
 1.15.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.4 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.3 21-Jul-2012  skrll branches: 1.3.2; 1.3.4;
Add support for the ARM1176JZS
 1.2 27-Apr-2008  matt branches: 1.2.18; 1.2.34; 1.2.40;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 12-Oct-2007  matt branches: 1.1.2; 1.1.8; 1.1.20; 1.1.22; 1.1.24;
file cpufunc_asm_arm1136.S was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.1.8.1 12-Oct-2007  matt file cpufunc_asm_arm1136.S was added on branch matt-nb4-arm on 2007-11-10 02:56:24 +0000
 1.1.2.1 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.2.40.1 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.2.34.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.34.1 30-Oct-2012  yamt sync with head
 1.2.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.4.1 28-Aug-2013  rmind sync with head
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10 20-Jan-2018  christos PR/52934: Yasushi Oshima: Apply the erratum fix that was applied to wbinv_range
to isync_range so that we don't hang when we try to sync from execcmd_readvn().
XXX: pullup 8
 1.9 15-Jul-2017  skrll branches: 1.9.2;
Fix a comment
 1.8 12-Jul-2017  skrll In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all

Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.7 30-Jul-2014  skrll branches: 1.7.2; 1.7.4; 1.7.20;
Use lower case. No functional change.
 1.6 30-Jul-2014  skrll Fixup some comments.
 1.5 30-Jul-2014  skrll Trailing whitespace.
 1.4 30-Mar-2014  matt branches: 1.4.2;
Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.3 18-Aug-2013  matt branches: 1.3.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 22-Sep-2012  matt branches: 1.2.2; 1.2.4;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.1 21-Jul-2012  skrll branches: 1.1.2; 1.1.4;
Add support for the ARM1176JZS
 1.1.4.3 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 21-Jul-2012  jdc file cpufunc_asm_arm11x6.S was added on branch netbsd-6 on 2012-08-09 06:36:45 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 28-Aug-2013  rmind sync with head
 1.2.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.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 22-Sep-2012  yamt file cpufunc_asm_arm11x6.S was added on branch yamt-pagecache on 2012-10-30 17:18:55 +0000
 1.3.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.2.1 18-Aug-2013  matt file cpufunc_asm_arm11x6.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.7.20.2 22-Jan-2018  martin Pull up following revision(s) (requested by skrll in ticket #507):
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.10
PR/52934: Yasushi Oshima: Apply the erratum fix that was applied to wbinv_range
to isync_range so that we don't hang when we try to sync from execcmd_readvn().
XXX: pullup 8
 1.7.20.1 12-Jul-2017  martin Pull up following revision(s) (requested by skrll in ticket #122):
sys/arch/arm/arm32/genassym.cf: revision 1.75
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.8
In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all
Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.7.4.1 28-Aug-2017  skrll Sync with HEAD
 1.7.2.2 19-Feb-2018  snj Pull up following revision(s) (requested by skrll in ticket #1555):
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: 1.10
PR/52934: Yasushi Oshima: Apply the erratum fix that was applied to wbinv_range
to isync_range so that we don't hang when we try to sync from execcmd_readvn().
 1.7.2.1 23-Jul-2017  snj Pull up following revision(s) (requested by skrll in ticket #1452):
sys/arch/arm/arm32/genassym.cf: revision 1.75
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.8
In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all
Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.9.2.2 15-Jul-2017  skrll 2264596
 1.9.2.1 15-Jul-2017  skrll file cpufunc_asm_arm11x6.S was added on branch perseant-stdc-iso10646 on 2017-07-15 06:25:21 +0000
 1.5 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.4 30-Mar-2014  matt branches: 1.4.28; 1.4.30;
Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 11-Dec-2011  kiyohara branches: 1.2.6; 1.2.10;
Require arm3_cache_flush for ARM2/ARM250.
 1.1 10-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.150; 1.1.166; 1.1.170;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.170.1 18-Feb-2012  mrg merge to -current.
 1.1.166.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.1.166.1 17-Apr-2012  yamt sync with head
 1.1.150.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 10-Nov-2001  thorpej file cpufunc_asm_arm3.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.1.4.2 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.4.1 10-Nov-2001  thorpej file cpufunc_asm_arm3.S was added on branch nathanw_sa on 2001-11-10 23:14:10 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 10-Nov-2001  thorpej file cpufunc_asm_arm3.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:26 +0000
 1.2.10.2 18-May-2014  rmind sync with head
 1.2.10.1 28-Aug-2013  rmind sync with head
 1.2.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.30.1 10-Jun-2019  christos Sync with HEAD
 1.4.28.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8 20-Oct-2022  skrll Trailing whitespace.
 1.7 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.6 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 22-Sep-2012  matt branches: 1.5.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.4 03-Jan-2010  uebayasi branches: 1.4.12; 1.4.20; 1.4.22;
s/These is/These are/
 1.3 17-Oct-2007  garbled branches: 1.3.20; 1.3.38;
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.2 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.1 10-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.40; 1.1.82; 1.1.90; 1.1.98; 1.1.100; 1.1.102; 1.1.104;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.104.1 06-Nov-2007  matt sync with HEAD
 1.1.102.1 01-Jan-2008  chris Sync with HEAD.
 1.1.100.1 02-Oct-2007  joerg Sync with HEAD.
 1.1.98.1 01-Nov-2007  rjs Sync with HEAD.
 1.1.90.1 03-Oct-2007  garbled Sync with HEAD
 1.1.82.1 09-Oct-2007  ad Sync with head.
 1.1.40.1 27-Oct-2007  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 10-Nov-2001  thorpej file cpufunc_asm_arm67.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.1.4.2 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.4.1 10-Nov-2001  thorpej file cpufunc_asm_arm67.S was added on branch nathanw_sa on 2001-11-10 23:14:10 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 10-Nov-2001  thorpej file cpufunc_asm_arm67.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:26 +0000
 1.3.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.20.1 11-Mar-2010  yamt sync with head
 1.4.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.12.1 30-Oct-2012  yamt sync with head
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.8 20-Oct-2022  skrll Trailing whitespace.
 1.7 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.6 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 22-Sep-2012  matt branches: 1.5.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.4 03-Jan-2010  uebayasi branches: 1.4.12; 1.4.20; 1.4.22;
s/These is/These are/
 1.3 17-Oct-2007  garbled branches: 1.3.20; 1.3.38;
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.2 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.1 10-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.40; 1.1.82; 1.1.90; 1.1.98; 1.1.100; 1.1.102; 1.1.104;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.104.1 06-Nov-2007  matt sync with HEAD
 1.1.102.1 01-Jan-2008  chris Sync with HEAD.
 1.1.100.1 02-Oct-2007  joerg Sync with HEAD.
 1.1.98.1 01-Nov-2007  rjs Sync with HEAD.
 1.1.90.1 03-Oct-2007  garbled Sync with HEAD
 1.1.82.1 09-Oct-2007  ad Sync with head.
 1.1.40.1 27-Oct-2007  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 10-Nov-2001  thorpej file cpufunc_asm_arm7tdmi.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.1.4.2 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.4.1 10-Nov-2001  thorpej file cpufunc_asm_arm7tdmi.S was added on branch nathanw_sa on 2001-11-10 23:14:10 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 10-Nov-2001  thorpej file cpufunc_asm_arm7tdmi.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:26 +0000
 1.3.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.20.1 11-Mar-2010  yamt sync with head
 1.4.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.12.1 30-Oct-2012  yamt sync with head
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.11 20-Oct-2022  skrll Trailing whitespace.
 1.10 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.9 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.8 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.7 22-Sep-2012  matt branches: 1.7.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.6 03-Jan-2010  uebayasi branches: 1.6.12; 1.6.20; 1.6.22;
s/These is/These are/
 1.5 27-Apr-2008  matt branches: 1.5.18;
Merge kernel changes in matt-armv6 to HEAD.
 1.4 17-Oct-2007  garbled branches: 1.4.20;
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.3 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.2 11-Nov-2001  thorpej branches: 1.2.2; 1.2.4; 1.2.6; 1.2.40; 1.2.82; 1.2.90; 1.2.98; 1.2.100; 1.2.102; 1.2.104;
Use numeric labels for loops.
 1.1 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.2.104.1 06-Nov-2007  matt sync with HEAD
 1.2.102.1 01-Jan-2008  chris Sync with HEAD.
 1.2.100.1 02-Oct-2007  joerg Sync with HEAD.
 1.2.98.1 01-Nov-2007  rjs Sync with HEAD.
 1.2.90.1 03-Oct-2007  garbled Sync with HEAD
 1.2.82.1 09-Oct-2007  ad Sync with head.
 1.2.40.1 27-Oct-2007  yamt sync with head.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 11-Nov-2001  thorpej file cpufunc_asm_arm8.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.2.4.2 11-Nov-2001  thorpej Use numeric labels for loops.
 1.2.4.1 11-Nov-2001  thorpej file cpufunc_asm_arm8.S was added on branch nathanw_sa on 2001-11-11 00:47:50 +0000
 1.2.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.2.1 11-Nov-2001  thorpej file cpufunc_asm_arm8.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:26 +0000
 1.4.20.1 11-Mar-2010  yamt sync with head
 1.5.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.6.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.12.1 30-Oct-2012  yamt sync with head
 1.7.2.2 18-May-2014  rmind sync with head
 1.7.2.1 28-Aug-2013  rmind sync with head
 1.12 20-Oct-2022  skrll Trailing whitespace.
 1.11 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.10 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.9 22-Sep-2012  matt branches: 1.9.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.8 07-Sep-2012  matt branches: 1.8.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.7 03-Jan-2010  uebayasi branches: 1.7.12; 1.7.20;
s/These is/These are/
 1.6 17-Oct-2007  garbled branches: 1.6.20; 1.6.38;
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.5 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.4 11-Dec-2005  christos branches: 1.4.30; 1.4.38; 1.4.46; 1.4.48; 1.4.50; 1.4.52;
merge ktrace-lwp.
 1.3 26-Jan-2004  rearnsha branches: 1.3.16;
Switch the ARM9 to using the Dcache in write-back mode. Avoid an
unknown problem with dcache_inv_range by using a wbinv for now
(similarly for ARM10).

When setting the ARM9 system control register, use the computed
cpuctrlmask value (not 0xffffffff) so that the clocking-mode bits are
not reset to FastBus mode (which isn't very fast).
 1.2 29-Jan-2002  rearnsha branches: 1.2.18;
Fix copying and disclaimer (ARM != Causality).
 1.1 10-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 10-Nov-2001  thorpej file cpufunc_asm_arm9.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 10-Nov-2001  nathanw file cpufunc_asm_arm9.S was added on branch nathanw_sa on 2002-02-28 04:07:16 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 10-Nov-2001  thorpej file cpufunc_asm_arm9.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:27 +0000
 1.2.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.18.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 27-Oct-2007  yamt sync with head.
 1.4.52.1 06-Nov-2007  matt sync with HEAD
 1.4.50.1 01-Jan-2008  chris Sync with HEAD.
 1.4.48.1 02-Oct-2007  joerg Sync with HEAD.
 1.4.46.1 01-Nov-2007  rjs Sync with HEAD.
 1.4.38.1 03-Oct-2007  garbled Sync with HEAD
 1.4.30.1 09-Oct-2007  ad Sync with head.
 1.6.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.20.1 11-Mar-2010  yamt sync with head
 1.7.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.12.1 30-Oct-2012  yamt sync with head
 1.8.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.2 18-May-2014  rmind sync with head
 1.9.2.1 28-Aug-2013  rmind sync with head
 1.6 20-Oct-2022  skrll Trailing whitespace.
 1.5 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.4 28-Jan-2014  martin Replace the RET macro with mov pc,lr unconditionally - this is armv4
specific source.
Ok: matt@
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 14-Oct-2008  matt branches: 1.2.12; 1.2.28; 1.2.38; 1.2.44;
Add FA526 support (compile tested only)
 1.1 10-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.128; 1.1.132; 1.1.138;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.138.1 19-Oct-2008  haad Sync with HEAD.
 1.1.132.1 04-May-2009  yamt sync with head.
 1.1.128.1 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 10-Nov-2001  thorpej file cpufunc_asm_armv4.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.1.4.2 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.1.4.1 10-Nov-2001  thorpej file cpufunc_asm_armv4.S was added on branch nathanw_sa on 2001-11-10 23:14:10 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 10-Nov-2001  thorpej file cpufunc_asm_armv4.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:27 +0000
 1.2.44.2 18-May-2014  rmind sync with head
 1.2.44.1 28-Aug-2013  rmind sync with head
 1.2.38.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.28.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.9 20-Oct-2022  skrll Trailing whitespace.
 1.8 07-Oct-2021  rin trailing whitespace/tab
 1.7 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.6 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 22-Sep-2012  matt branches: 1.5.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.4 07-Sep-2012  matt branches: 1.4.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.3 06-Jan-2007  christos branches: 1.3.68; 1.3.84; 1.3.92;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.2 11-Dec-2005  christos branches: 1.2.20; 1.2.24;
merge ktrace-lwp.
 1.1 03-Jun-2005  rearnsha branches: 1.1.2; 1.1.8;
Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.1.8.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.1 03-Jun-2005  skrll file cpufunc_asm_armv5.S was added on branch ktrace-lwp on 2005-11-10 13:55:09 +0000
 1.1.2.1 26-Feb-2007  yamt sync with head.
 1.2.24.1 21-Feb-2007  snj Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.2.20.1 12-Jan-2007  ad Sync with head.
 1.3.92.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.84.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.3.84.1 30-Oct-2012  yamt sync with head
 1.3.68.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.7 07-Oct-2021  rin Reduce diff with cpufunc_asm_armv5.S, from which this file was derived.
 1.6 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.5 25-Dec-2013  joerg Use symbolic form for the third argument of mrc.
 1.4 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.3 22-Sep-2012  matt branches: 1.3.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.2 07-Sep-2012  matt branches: 1.2.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.1 06-Jan-2007  christos branches: 1.1.2; 1.1.6; 1.1.8; 1.1.74; 1.1.90; 1.1.98;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.1.98.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.90.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.1.90.1 30-Oct-2012  yamt sync with head
 1.1.74.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.8.2 26-Feb-2007  yamt sync with head.
 1.1.8.1 06-Jan-2007  yamt file cpufunc_asm_armv5_ec.S was added on branch yamt-lazymbuf on 2007-02-26 09:05:52 +0000
 1.1.6.2 21-Feb-2007  snj Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.1.6.1 06-Jan-2007  snj file cpufunc_asm_armv5_ec.S was added on branch netbsd-4 on 2007-02-21 18:36:03 +0000
 1.1.2.2 12-Jan-2007  ad Sync with head.
 1.1.2.1 06-Jan-2007  ad file cpufunc_asm_armv5_ec.S was added on branch newlock2 on 2007-01-12 01:00:41 +0000
 1.2.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.2 18-May-2014  rmind sync with head
 1.3.2.1 28-Aug-2013  rmind sync with head
 1.8 15-Jul-2017  skrll branches: 1.8.2;
Spell invalidate correctly in comments. No functional change.
 1.7 01-Aug-2014  skrll branches: 1.7.4;
Whitespace.
 1.6 18-Aug-2013  matt branches: 1.6.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 22-Sep-2012  matt branches: 1.5.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.4 10-Dec-2010  bsh branches: 1.4.8; 1.4.16; 1.4.18;
fix a LINTSTUB
 1.3 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.2 27-Apr-2008  matt branches: 1.2.18; 1.2.20; 1.2.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 28-Aug-2007  matt branches: 1.1.2; 1.1.10; 1.1.22; 1.1.24; 1.1.26;
file cpufunc_asm_armv6.S was initially added on branch matt-armv6.
 1.1.26.2 11-Aug-2010  yamt sync with head.
 1.1.26.1 16-May-2008  yamt sync with head.
 1.1.24.1 18-May-2008  yamt sync with head.
 1.1.22.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.1.10.1 28-Aug-2007  matt file cpufunc_asm_armv6.S was added on branch matt-nb4-arm on 2007-11-10 02:56:24 +0000
 1.1.2.3 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.1.2.2 11-Sep-2007  matt in idcache_wbinv_all, make sure to wb the data cache.
 1.1.2.1 28-Aug-2007  matt CPU functions for ARM Architecture V6.
 1.2.22.2 05-Mar-2011  rmind sync with head
 1.2.22.1 03-Jul-2010  rmind sync with head
 1.2.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.18.3 03-Dec-2017  jdolecek update from HEAD
 1.4.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.8.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.4.8.1 30-Oct-2012  yamt sync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.7.4.1 28-Aug-2017  skrll Sync with HEAD
 1.8.2.2 15-Jul-2017  skrll 2336627
 1.8.2.1 15-Jul-2017  skrll file cpufunc_asm_armv6.S was added on branch perseant-stdc-iso10646 on 2017-07-15 06:20:23 +0000
 1.28 06-Oct-2018  skrll Add the ARM ARM cache operation name in some comments
 1.27 24-Aug-2017  jmcneill branches: 1.27.2; 1.27.4;
Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.26 09-Jun-2015  skrll Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@
 1.25 07-Jun-2015  skrll Dont use magic number.

No functional change.
 1.24 30-May-2015  skrll Typo in previous
 1.23 30-May-2015  skrll Provide a armv7_dcache_l1inv_all
 1.22 16-May-2015  skrll Add MULTIPROCESSOR tlb flushes to armv7_tlb_flushID. Also, invalidate the
branch predictor.

This function is only used by db_write_bytes and kobj_machdep
 1.21 09-Nov-2014  skrll branches: 1.21.2;
Ensure all memory operations are complete by before wfi. For example, the
cpu could have just been in uvm_pageidlezero.
 1.20 29-Oct-2014  skrll Add some dsb instructions to avoid Cortex A7 errata
 1.19 29-Oct-2014  skrll Don't flush random ASIDs. Instead always assume KERNEL_PID, i.e. 0.
All other TLB flushes are done via

pmap_tlb_invalidate_addr -> tlb_invalidate_addr

OK matt@
 1.18 31-Jul-2014  matt branches: 1.18.2;
Remove a leftover _XXX
 1.17 10-Apr-2014  matt Address PR/48710.
r3 is not trashed during the routine so the level is preserved.
The only two real bugs was not initializing r3 to 0 to start with L1 cache
and the invalid fetching the set count from r3. The mov r1, #0 should have
been mov r3, #0 and has been corrected.
Instead of two shifts, just use ubfx to extract the set bits and then compare
them to 0.
Add some other minor optimizations that make the code a little clearer.
 1.16 28-Mar-2014  matt branches: 1.16.2;
Add ARM_MMU_EXTENDED support
 1.15 24-Feb-2014  matt Don't need to round since values are N-1.
 1.14 20-Feb-2014  matt Add armv7 versions of tlb routines.
 1.13 20-Feb-2014  matt for non-of-power-2 sets, we need to round to next power of 2. (which is
simply doubling the value and then subtracting 1).
 1.12 18-Aug-2013  matt branches: 1.12.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.11 21-Nov-2012  matt branches: 1.11.2;
Always supply all registers (don't make one implicit).
 1.10 21-Oct-2012  matt Implement a "fast" path for IRQ handling out of the idle loop. Since we
are in SVC32 already we only need to save a few registers. Processing is
also simplified since we know we can't return to user-mode.
 1.9 19-Oct-2012  matt Add armv7_drain_writebuf (which is just a dsb).
 1.8 17-Oct-2012  matt Add a few more DSBs before flushing cache lines.
 1.7 07-Oct-2012  matt Fix range ops to properly flush.
 1.6 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.5 11-Sep-2012  matt branches: 1.5.2;
Compute cache line size before doing the loop.
Map translation table for MP with outer-cache=NONE
 1.4 06-Sep-2012  matt Enable "shareable" access to the page table for armv7. PTE_SYNC only does
a DSB now on an armv7 cpu and no longer needs to flush the cache line to ram.
 1.3 29-Aug-2012  matt Recode armv7_dcache_wbinv_all in asm. Add armv7_dcache_inv_all and
armv7_icache_inv_all as well.
Use dsb/dmb/isb instructions
 1.2 19-Jun-2010  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.14; 1.2.22;
Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.1 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.2.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.14.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.2.14.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.14.1 30-Oct-2012  yamt sync with head
 1.2.6.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.6.1 19-Jun-2010  uebayasi file cpufunc_asm_armv7.S was added on branch uebayasi-xip on 2010-08-17 06:44:01 +0000
 1.2.4.2 11-Aug-2010  yamt sync with head.
 1.2.4.1 19-Jun-2010  yamt file cpufunc_asm_armv7.S was added on branch yamt-nfs-mp on 2010-08-11 22:51:38 +0000
 1.2.2.2 03-Jul-2010  rmind sync with head
 1.2.2.1 19-Jun-2010  rmind file cpufunc_asm_armv7.S was added on branch rmind-uvmplock on 2010-07-03 01:19:13 +0000
 1.5.2.4 03-Dec-2017  jdolecek update from HEAD
 1.5.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.2 25-Feb-2013  tls resync with head
 1.5.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.2.2 18-May-2014  rmind sync with head
 1.11.2.1 28-Aug-2013  rmind sync with head
 1.12.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.2.1 18-Aug-2013  matt file cpufunc_asm_armv7.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.16.2.1 10-Aug-2014  tls Rebase.
 1.18.2.2 10-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #209):
sys/arch/arm/pic/pic.c: revision 1.25
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.312
sys/arch/arm/arm32/bus_dma.c: revision 1.89
sys/arch/arm/arm32/pmap.c: revision 1.313
sys/arch/arm/arm32/pmap.c: revision 1.314
sys/arch/arm/arm32/pmap.c: revision 1.315
sys/arch/arm/arm32/pmap.c: revision 1.316
Include opt_multiprocessor.h
When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
Post a dmb before invalidating the cache in the post-{read,write}
operations to ensure that any/all cachelines brought in via speculation
are really flushed.
Ensure all memory operations are complete by before wfi. For example, the
cpu could have just been in uvm_pageidlezero.
In pmap_fault_fixup re-instate the TLB flush for the shared L1 case that
occurs for non-ARM_MMU_EXTENDED kernels.
This fixes rump/rumpkern/t_sp:stress_killer on rpi which is currently
non-ARM_MMU_EXTENDED
Remove an unnecessary flush that sneaked in as part of break-before-make
change.
Remove an XXXNH comment.
Update PTE_SYNC_CURRENT to add a dsb for armv7 - part of the
break-before-make fix.
 1.18.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.21.2.3 28-Aug-2017  skrll Sync with HEAD
 1.21.2.2 22-Sep-2015  skrll Sync with HEAD
 1.21.2.1 06-Jun-2015  skrll Sync with HEAD
 1.27.4.1 10-Jun-2019  christos Sync with HEAD
 1.27.2.1 20-Oct-2018  pgoyette Sync with head
 1.8 20-Oct-2022  skrll Trailing whitespace.
 1.7 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.6 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 22-Sep-2012  matt branches: 1.5.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.4 16-Oct-2008  matt branches: 1.4.2; 1.4.10; 1.4.16; 1.4.18; 1.4.34; 1.4.42; 1.4.44;
Fix c&p typo.
 1.3 15-Oct-2008  matt Add fa526_flush_prefetchbuf
 1.2 15-Oct-2008  matt Make sure the register used is 0 when doing ops which affect the entire
cache or tlb.
 1.1 14-Oct-2008  matt Add FA526 support (compile tested only)
 1.4.44.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.34.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.4.34.1 30-Oct-2012  yamt sync with head
 1.4.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.16.2 04-May-2009  yamt sync with head.
 1.4.16.1 16-Oct-2008  yamt file cpufunc_asm_fa526.S was added on branch yamt-nfs-mp on 2009-05-04 08:10:38 +0000
 1.4.10.2 17-Jan-2009  mjf Sync with HEAD.
 1.4.10.1 16-Oct-2008  mjf file cpufunc_asm_fa526.S was added on branch mjf-devfs2 on 2009-01-17 13:27:51 +0000
 1.4.2.2 19-Oct-2008  haad Sync with HEAD.
 1.4.2.1 16-Oct-2008  haad file cpufunc_asm_fa526.S was added on branch haad-dm on 2008-10-19 22:15:41 +0000
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.4 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 17-Aug-2002  thorpej branches: 1.2.2; 1.2.136; 1.2.152; 1.2.162; 1.2.168;
More local label fixups.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4;
add support for ixp12x0
 1.1.4.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.4.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file cpufunc_asm_ixp12x0.S was added on branch nathanw_sa on 2002-08-01 02:41:11 +0000
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file cpufunc_asm_ixp12x0.S was added on branch gehenna-devsw on 2002-07-21 13:00:27 +0000
 1.2.168.2 18-May-2014  rmind sync with head
 1.2.168.1 28-Aug-2013  rmind sync with head
 1.2.162.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.152.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.136.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.1 17-Aug-2002  jdolecek file cpufunc_asm_ixp12x0.S was added on branch kqueue on 2002-09-06 08:32:13 +0000
 1.14 20-Oct-2022  skrll Trailing whitespace.
 1.13 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.12 07-Jan-2017  kiyohara Add a white-space into comment and `*/'.
 1.11 20-May-2015  hsuenaga branches: 1.11.2;
move register accessor macros for MPIDR and AUXFMC0 to armreg.h
 1.10 19-May-2015  hsuenaga fix Marvell Coherency Barrier register address.
configure coherency bus maintance broadcast using MPIDR. we need to configure
this regardless of 'options MULTIPROCESSOR.'
 1.9 14-May-2015  matt Use movw/movw
 1.8 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.7 15-Apr-2015  hsuenaga clean up cpufuncs of CPU_PJ4B.

PJ4B is a ARMv7 compatible CPU, so most of cpufuncs are just redundant.
we need funcs for:
- Marvell specific registers
- workaround of errata
- and Marvell specific L2 cache maintainance
if I/O coherency fabric is enabled(option AURORA_IO_CACHE_COHERENCY),
probaly we don't need to maintain L2 cache by software.
 1.6 26-Mar-2015  hsuenaga set ttbr0/1 using correct register(r2).
 1.5 29-Oct-2014  skrll branches: 1.5.2;
Don't flush random ASIDs. Instead always assume KERNEL_PID, i.e. 0.
All other TLB flushes are done via

pmap_tlb_invalidate_addr -> tlb_invalidate_addr

OK matt@
 1.4 30-Mar-2014  matt branches: 1.4.4; 1.4.6;
Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.3 18-Aug-2013  matt branches: 1.3.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 19-May-2013  rkujawa branches: 1.2.2; 1.2.4;
Add CVS ID.
 1.1 19-May-2013  rkujawa Add CPU functions for PJ4B core.
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 28-Aug-2013  rmind sync with head
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 19-May-2013  tls file cpufunc_asm_pj4b.S was added on branch tls-maxphys on 2013-06-23 06:19:59 +0000
 1.3.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.2.1 18-Aug-2013  matt file cpufunc_asm_pj4b.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.4.6.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.4.4.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.4.4.1 30-Mar-2014  yamt file cpufunc_asm_pj4b.S was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.5.2.3 05-Feb-2017  skrll Sync with HEAD
 1.5.2.2 06-Jun-2015  skrll Sync with HEAD
 1.5.2.1 06-Apr-2015  skrll Sync with HEAD
 1.11.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.16 20-Oct-2022  skrll Trailing whitespace.
 1.15 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.14 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.13 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.12 22-Sep-2012  matt branches: 1.12.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.11 03-Jan-2010  uebayasi branches: 1.11.12; 1.11.20; 1.11.22;
s/These is/These are/
 1.10 17-Oct-2007  garbled branches: 1.10.20; 1.10.38;
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.9 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.8 17-Aug-2002  thorpej branches: 1.8.24; 1.8.66; 1.8.74; 1.8.82; 1.8.84; 1.8.86; 1.8.88;
More local label fixups.
 1.7 17-Aug-2002  chris following Jason's change to _xscale, convert bpl's to bhi's, saves looping more than needed in some cases.
 1.6 14-Aug-2002  thorpej Fix some whitespace.
 1.5 03-May-2002  rjs branches: 1.5.2; 1.5.4;
Use processor specific versions of ARM cache control functions for SA1100
and SA1110 instead of using SA110 ones.

Rename common StrongARM functions from sa110_* to sa1_*.

Reviewed by Jason Thorpe.
 1.4 14-Nov-2001  thorpej branches: 1.4.2; 1.4.4;
Eliminate some duplicated code here (similar to XScale code):
* sa110_cache_purgeD() is the same as sa110_cache_cleanD() on the
SA-1 -- make it an alias.
* sa110_cache_syncI() and sa110_cache_purgeID() are identical to
sa110_cache_cleanD() on the SA-1, with the exception that the
I-cache must also be flushed. Save code duplication by moving
the I-cache flush before the D-cache clean and letting it fall
through.
 1.3 11-Nov-2001  thorpej branches: 1.3.2;
Fix a missing-whitespace typo.
 1.2 11-Nov-2001  thorpej * Define prologue/epilogue macros for the cache clean functions,
and use them, rather than replicating the code several times.
* Use numbered labels for loops.
 1.1 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.3.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 11-Nov-2001  thorpej file cpufunc_asm_sa1.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:27 +0000
 1.4.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.1 14-Nov-2001  thorpej file cpufunc_asm_sa1.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.4.2.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.4.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.4.2.1 14-Nov-2001  nathanw file cpufunc_asm_sa1.S was added on branch nathanw_sa on 2002-06-20 03:38:00 +0000
 1.5.4.1 18-Nov-2002  he Pull up revision 1.7 (requested by thorpej in ticket #690):
Convert bpl's to bhi's, saves looping more than needed in
some cases.
 1.5.2.1 30-Aug-2002  gehenna catch up with -current.
 1.8.88.1 06-Nov-2007  matt sync with HEAD
 1.8.86.1 01-Jan-2008  chris Sync with HEAD.
 1.8.84.1 02-Oct-2007  joerg Sync with HEAD.
 1.8.82.1 01-Nov-2007  rjs Sync with HEAD.
 1.8.74.1 03-Oct-2007  garbled Sync with HEAD
 1.8.66.1 09-Oct-2007  ad Sync with head.
 1.8.24.1 27-Oct-2007  yamt sync with head.
 1.10.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.10.20.1 11-Mar-2010  yamt sync with head
 1.11.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.11.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.12.1 30-Oct-2012  yamt sync with head
 1.12.2.2 18-May-2014  rmind sync with head
 1.12.2.1 28-Aug-2013  rmind sync with head
 1.6 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.5 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.4 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.3 17-Aug-2002  thorpej branches: 1.3.134; 1.3.150; 1.3.160; 1.3.166;
More local label fixups.
 1.2 03-May-2002  rjs branches: 1.2.2;
Add sa11x0_context_switch and sa11x0_drain_readbuf.

Reviewed by Ben Harris and Jason Thorpe.
 1.1 30-Jan-2002  thorpej branches: 1.1.2; 1.1.4;
Add a sleep routine for the SA-11x0.
 1.1.4.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 30-Jan-2002  nathanw file cpufunc_asm_sa11x0.S was added on branch nathanw_sa on 2002-02-28 04:07:17 +0000
 1.1.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 30-Jan-2002  jdolecek file cpufunc_asm_sa11x0.S was added on branch kqueue on 2002-02-11 20:07:16 +0000
 1.2.2.1 30-Aug-2002  gehenna catch up with -current.
 1.3.166.2 18-May-2014  rmind sync with head
 1.3.166.1 28-Aug-2013  rmind sync with head
 1.3.160.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.150.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.134.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6 14-Apr-2014  matt Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.5 30-Mar-2014  matt branches: 1.5.2;
Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.4 18-Aug-2013  matt branches: 1.4.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.3 07-Sep-2012  matt branches: 1.3.2; 1.3.4;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.2 14-Jul-2012  hans Support cpu_sleep() on Sheeva CPUs.
 1.1 02-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.22;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.14.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.1.14.1 30-Oct-2012  yamt sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 02-Oct-2010  rmind file cpufunc_asm_sheeva.S was added on branch rmind-uvmplock on 2011-03-05 20:49:28 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 02-Oct-2010  uebayasi file cpufunc_asm_sheeva.S was added on branch uebayasi-xip on 2010-10-22 07:21:01 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 02-Oct-2010  yamt file cpufunc_asm_sheeva.S was added on branch yamt-nfs-mp on 2010-10-09 03:31:38 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 28-Aug-2013  rmind sync with head
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 18-Aug-2013  matt file cpufunc_asm_sheeva.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:35 +0000
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.25 20-Oct-2022  skrll Trailing whitespace.
 1.24 17-Jan-2018  christos rename DCACHE_SIZE to XSCALE_DCACHE_SIZE to avoid conflict with genassym
field offset with the same name.
 1.23 30-Mar-2014  matt Allow for 8KB page size. Add ARM_MMU_EXTENDED support.
Add missing END()
 1.22 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.21 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.20 22-Sep-2012  matt branches: 1.20.2;
Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.19 03-Jan-2010  uebayasi branches: 1.19.12; 1.19.20; 1.19.22;
s/These is/These are/
 1.18 17-Oct-2007  garbled branches: 1.18.20; 1.18.38;
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.17 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.16 17-Aug-2002  thorpej branches: 1.16.24; 1.16.66; 1.16.74; 1.16.82; 1.16.84; 1.16.86; 1.16.88;
More local label fixups.
 1.15 14-Aug-2002  thorpej Fix a fencepost in the cache flush routines, caused by using the wrong
condition on a branch (bpl where bhi should have been used). The error
caused one more line than intended to be flushed, which is particularly
bad if you're doing a dcache-invalidate operation.
 1.14 09-Aug-2002  thorpej * Drain write buffer after cleaning the mini-D$.
* Fix a typo in a comment.
 1.13 09-Apr-2002  thorpej branches: 1.13.2; 1.13.4;
* Move the code that cleans the XScale mini-data cache into its
own function.
* Add a new function which sets up the mini-data cache clean area
properly.
 1.12 19-Mar-2002  briggs Ignore cpu_sleep() if called with anything other than ARM_SLEEP_MODE_IDLE.
 1.11 24-Jan-2002  thorpej Shave an instruction off the case where we want to do a CPWAIT and
then return.
 1.10 24-Jan-2002  thorpej Update copyright years and author list.
 1.9 24-Jan-2002  thorpej Work around a bug in the XScale core's D-cache. The work-around is to
use 2 adjacent cache-size areas for global cache clean, alternating
between the two of them on each call. Without this, D-cache blocks
aren't evicted properly, and no one seems to know why.
 1.8 24-Jan-2002  briggs Two changes for XScale:
1) Add defparam XSCALE_CCLKCFG to define a parameter for the
CCLKCFG register. Default it to '9' on the IQ80310.
2) Add a sleep call to the xscale CPU function vector (replacing
the nullop) which should drop the CPU into "idle" mode when
cpu_switch finds nothing on the run queues.
 1.7 26-Nov-2001  thorpej branches: 1.7.2;
Add code to run the XScale cache in write-though mode, and do so
for now...
 1.6 26-Nov-2001  thorpej Sprinkle CPWAIT around to enforce some barriers. Also deal with some
pre-B-step errata: must clean-dcache-line to an address before
invalidate-dcache-line to that address, or the dirty bits will not
get cleanred in the dcache array for that line.
 1.5 19-Nov-2001  thorpej Add a "cpwait" cpufunc, currently a nullop on all but XScale.
"cpwait" ensures that all coprocessor operations have completed
before returning.
 1.4 14-Nov-2001  thorpej branches: 1.4.2;
* Give the XScale its own cpu_control() entry point; we have to flush
the Branch Target Buffer of the BPRD bit changes.
* Enable Branch Prediction on the XScale by default.
* Don't invalidate the Branch Target Buffer explicitly. the i80200
manual (section 5.1, Branch Target Buffer Operation) notes that
manual software management of the BTB is unnecessary; it is flushed
implicitly when:
* processor resets
* FCSE process ID is written
* I-cache is invalidated
 1.3 11-Nov-2001  thorpej branches: 1.3.2;
Some fixes/cleanup to the XScale cache clean code:
* Define a CPWAIT macro as described in the i80200 manual and use it,
rather than replicating the code in a few places.
* The i80200 manual notes that the line-allocate operation used to
do global D$ clean does not actually perform a load/fill request
from external memory, and thus does not actually place valid data
in the cache lines allocated. Require that machine-dependent code
allocate an appropriately-sized chunk of unmapped VA space for the
global clean operation in order to avoid unpredictable results.
* The i80200 manual notes that the VA range for the Mini-Data global
clean (which *must* be mapped to physical memory) must be reserved
exclusively for cleaning the Mini-Data cache. Require that machine-
dependent code allocate an appropriately-sized chunk of memory for
this purpose.
 1.2 11-Nov-2001  thorpej * Define prologue/epilogue macros for the cache clean functions,
and use them, like we do in the SA-1 code.
* Use numbered labels for loops.
 1.1 10-Nov-2001  thorpej Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.3.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 11-Nov-2001  thorpej file cpufunc_asm_xscale.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:28 +0000
 1.4.2.7 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.4.2.6 13-Aug-2002  nathanw Catch up to -current.
 1.4.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.4.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.2.1 14-Nov-2001  nathanw file cpufunc_asm_xscale.S was added on branch nathanw_sa on 2002-01-08 00:23:06 +0000
 1.7.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 26-Nov-2001  thorpej file cpufunc_asm_xscale.S was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.13.4.2 18-Nov-2002  he Pull up revision 1.15 (requested by thorpej in ticket #681):
Fix a fencepost error in the cache flush routines, caused
by using the wrong condition on a branch.
 1.13.4.1 16-Nov-2002  he Pull up revision 1.14 (requested by thorpej in ticket #661):
Drain write buffer after cleaning the mini-D$, and fix a
typo in a comment.
 1.13.2.1 30-Aug-2002  gehenna catch up with -current.
 1.16.88.1 06-Nov-2007  matt sync with HEAD
 1.16.86.1 01-Jan-2008  chris Sync with HEAD.
 1.16.84.1 02-Oct-2007  joerg Sync with HEAD.
 1.16.82.1 01-Nov-2007  rjs Sync with HEAD.
 1.16.74.1 03-Oct-2007  garbled Sync with HEAD
 1.16.66.1 09-Oct-2007  ad Sync with head.
 1.16.24.1 27-Oct-2007  yamt sync with head.
 1.18.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.18.20.1 11-Mar-2010  yamt sync with head
 1.19.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.19.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.12.1 30-Oct-2012  yamt sync with head
 1.20.2.2 18-May-2014  rmind sync with head
 1.20.2.1 28-Aug-2013  rmind sync with head
 1.6 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.5 11-Dec-2005  christos branches: 1.5.26;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 04-Mar-2001  matt branches: 1.3.26;
s/vm_offset_t/vaddr_t/g
 1.2 13-Jan-2001  bjh21 branches: 1.2.2;
Make db_disasm_interface const.
 1.1 12-Jan-2001  bjh21 Move db_disasm.c into sys/arch/arm/arm. Use arm26 version, since it should
generate smaller compiled code.
 1.2.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 13-Jan-2001  bouyer file db_disasm.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.3.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.26.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 26-Feb-2007  yamt sync with head.
 1.5.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.33 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.32 25-Apr-2017  skrll Report trapframe where possible
 1.31 24-Jan-2015  skrll branches: 1.31.2;
Fix crash(8) backtrace support.
 1.30 29-Mar-2014  skrll branches: 1.30.4; 1.30.6;
Trailing whitespace
 1.29 29-Mar-2014  skrll Allow crash(8) to compile this.
 1.28 18-Jan-2013  skrll branches: 1.28.2;
Print the frame pointer for each level and don't print the registers
within the frame by default. Provide a '/f' flag to get the full trace.

Discussed with matt@
 1.27 31-Dec-2012  skrll At each function level print a useful offset (as also shown in rlv)

OK from gimpy
 1.26 12-Nov-2012  skrll C99 types
 1.25 14-Sep-2012  matt Only fetch savecode if scp is word aligned (prevents recursive ddb faults).
 1.24 17-Feb-2012  christos branches: 1.24.2;
fix off-by-one in frame handling, and add a missing db_read
 1.23 16-Feb-2012  christos Arrange so that we can be used from userland, by not accessing pointers
directly and using db_read_bytes().
XXX: arm26 not handled.
 1.22 01-Jul-2010  rmind branches: 1.22.8; 1.22.12; 1.22.16;
Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour. Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
 1.21 21-Nov-2009  rmind branches: 1.21.2; 1.21.4;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.20 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.19 15-Mar-2009  cegger ansify function definitions
 1.18 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.17 02-Jul-2008  rmind branches: 1.17.4; 1.17.10; 1.17.14;
Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
 1.16 22-Feb-2007  thorpej branches: 1.16.44; 1.16.48; 1.16.50; 1.16.52;
TRUE -> true, FALSE -> false
 1.15 22-Feb-2007  matt Fix lossage from boolean_t -> bool and updated x86 bus_dma.
 1.14 21-Feb-2007  thorpej Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.13 20-Feb-2007  ad - Add /a modifier to trace that allows a specific LWP to be selected.
- When doing trace/t, always note which pid/lid combination is being traced.
 1.12 17-Feb-2007  pavel Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
 1.11 06-Sep-2006  ad branches: 1.11.8;
Use p_find(addr, PFIND_LOCKED) in case the proclist_lock is held.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 30-May-2005  he branches: 1.9.2;
Adapt to constification of sys/ddb/db_interface.h.
 1.8 17-Jan-2003  thorpej branches: 1.8.2;
Merge the nathanw_sa branch.
 1.7 10-Apr-2002  thorpej vm_offset_t -> vaddr_t,paddr_t
 1.6 24-Mar-2002  bjh21 arm26->acorn26 transition.
 1.5 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.4 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.3 09-Nov-2001  thorpej branches: 1.3.2;
Make the DDB trace output a lot easier to look at.
 1.2 09-Sep-2001  toshii branches: 1.2.2;
Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.1 05-Jun-2001  bjh21 branches: 1.1.2; 1.1.4; 1.1.6;
Replace arm/arm32/db_trace.c and arm26/arm26/db_trace.c with a unified version
in arm/arm. This version is based on the arm26 version, and includes dumping
the contents of stack frames, with automatic determination of the save code
pointer offset.
 1.1.6.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.3.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.3.2.1 09-Nov-2001  thorpej file db_trace.c was added on branch nathanw_sa on 2001-11-15 06:39:20 +0000
 1.8.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.2 26-Feb-2007  yamt sync with head.
 1.9.2.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 14-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.16.52.1 03-Jul-2008  simonb Sync with head.
 1.16.50.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.16.48.3 11-Aug-2010  yamt sync with head.
 1.16.48.2 11-Mar-2010  yamt sync with head
 1.16.48.1 04-May-2009  yamt sync with head.
 1.16.44.1 28-Sep-2008  mjf Sync with HEAD.
 1.17.14.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.17.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.21.4.1 03-Jul-2010  rmind sync with head
 1.21.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.22.12.1 18-Feb-2012  mrg merge to -current.
 1.22.8.5 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22.8.4 23-Jan-2013  yamt sync with head
 1.22.8.3 16-Jan-2013  yamt sync with (a bit old) head
 1.22.8.2 30-Oct-2012  yamt sync with head
 1.22.8.1 17-Apr-2012  yamt sync with head
 1.24.2.4 03-Dec-2017  jdolecek update from HEAD
 1.24.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.2.2 25-Feb-2013  tls resync with head
 1.24.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.28.2.1 18-May-2014  rmind sync with head
 1.30.6.2 28-Aug-2017  skrll Sync with HEAD
 1.30.6.1 06-Apr-2015  skrll Sync with HEAD
 1.30.4.1 25-Jan-2015  martin Pull up following revision(s) (requested by skrll in ticket #454):
sys/arch/arm/arm/db_trace.c: revision 1.31
Fix crash(8) backtrace support.
 1.31.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.42 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.41 24-Oct-2019  christos branches: 1.41.8;
Add a function cast
 1.40 30-Oct-2018  skrll Allow setend be decode
 1.39 03-Jun-2017  skrll branches: 1.39.2; 1.39.8; 1.39.10;
Adjust the output of {ldr,str}x instructions slightly and deal with the
writeback bit.
 1.38 02-Jun-2017  skrll Fix the fix by removing redundant lines. Thanks chuq.
 1.37 02-Jun-2017  skrll Fix up some instructions. Prompted by chuq.
 1.36 26-Apr-2017  skrll Move mcrr/mrrc earlier so they match before stc/ldc
 1.35 11-Mar-2017  skrll Fixup the catchall for the media instructions that are currently unhandled
so that swi, etc can match
 1.34 14-Dec-2015  skrll branches: 1.34.2; 1.34.4;
Move mcrr and mrrc up the list so they match ahead of ldc/ldc2
 1.33 02-May-2015  skrll Move /* A5.2.10 Synchronisation primitives */ block earlier so it
matches correctly
 1.32 31-Mar-2015  skrll More instructions. Lots left to do.
 1.31 18-Jan-2015  skrll Remove incorrect entries
 1.30 17-Jan-2015  skrll Document 'e'
 1.29 17-Jan-2015  skrll Remove duplicate entry
 1.28 02-Jan-2015  skrll Do revision 1.20: Decode movw/movt properly.

Hi Matt.
 1.27 02-Jan-2015  skrll Trailing whitespace.
 1.26 02-Jan-2015  skrll The mode synonyms are different for stm and ldm - handle this.

PR/49520: arm/disassem.c doesn't use proper address mode name for loads
 1.25 21-Nov-2014  joerg branches: 1.25.2;
Preserve const.
 1.24 03-Mar-2014  matt branches: 1.24.4;
Add more instructions including ldrex/strex variants
 1.23 10-Jan-2014  matt byte swap the insn on BE8 it's LE in memory but needs to be BE to decode.
 1.22 18-Aug-2013  matt Don't include <arm/locore.h>, just <arm/armreg.h>
 1.21 09-Aug-2013  matt Decode movw/movt
 1.20 18-Dec-2012  matt branches: 1.20.2;
Start adding support for disassembling some NEON instructions.
 1.19 16-Feb-2012  christos branches: 1.19.2;
cast printf so it can be used from userland, and include the proper include
files for userland if not kernel.
 1.18 27-Apr-2008  matt branches: 1.18.10; 1.18.18; 1.18.34; 1.18.38; 1.18.40; 1.18.42;
Merge kernel changes in matt-armv6 to HEAD.
 1.17 11-Dec-2005  christos branches: 1.17.52; 1.17.60; 1.17.76; 1.17.78; 1.17.80;
merge ktrace-lwp.
 1.16 02-Jun-2005  he Adapt to shadowing and qualifier-cast warnings.
 1.15 21-Aug-2004  rearnsha Don't fault if handed a Thumb address to disassemble. Simply print
out 'thumb insn' and punt.
 1.14 27-Mar-2003  mycroft branches: 1.14.2;
Doh, fix a pasto -- the ldr/str mask had a bad bit set.
 1.13 27-Mar-2003  mycroft Fix multiple problems with ldrh/strh/ldrsb/ldrsh disassembly:
* The offset format was wrong.
* There is no post-increment or index register update.
* It wasn't even matching because the mask was wrong.
Also touch up ldr/str disassembly slightly.
 1.12 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.11 04-Mar-2001  matt branches: 1.11.4; 1.11.8;
s/vm_offset_t/vaddr_t/g
 1.10 18-Jan-2001  bjh21 branches: 1.10.2;
Tidy up some comments.
 1.9 18-Jan-2001  bjh21 Add ARMv5 instructions: BLX, CLZ, BKPT, MCR2, MRC2, CDP2, LDC2, STC2.
Also correct a comment.
 1.8 13-Jan-2001  bjh21 Make all the disasm_interface_t arguments const, thus allowing us to
allocate them statically in the text segment. Do so for disassemble().
 1.7 13-Jan-2001  bjh21 ANSIfy, un-__Pify, and in the case of disassem.c, add an RCSID.
 1.6 12-Jan-2001  bjh21 Storing four-byte pointers to two-character strings is silly. All the
auxilliary tables used by the disassembler are now char[][].

The main table still uses pointers because:
- the longest instruction name, "imbrange" is >7 characters long, which would
make the field length wasteful.
- GCC spots that most of the formats are shared and makes them pointers to the
same string, so turning them into char[8] would be counter-productive.
 1.5 12-Jan-2001  bjh21 Move all the nasty big tables into the text segment. This isn't much use in
the kernel at present, but maybe one day when we have a ROMmable kernel...
 1.4 12-Jan-2001  bjh21 Correct comments (the code does support LDF, STF, LDC, STC).
Support BX (for completeness).
Correct spelling of SWP.
 1.3 12-Jan-2001  bjh21 Correct immediate constant handling: bits [11:8] are a rotation, not a shift.

Also add support for the "P" modifier to TEQ, TST, CMP and CMN, and don't
bother displaying the "S" bit for these instructions.

Together, these correct the disassembly of 0xe33ff3c2 (an instruction in
arm26 irq_handler() from "teqs r15, #0x08000000" to "teqp r15, 0x08000003".
 1.2 12-Jan-2001  bjh21 Prototypes for disassemble_readword() and disassemble_printaddr().
 1.1 12-Jan-2001  bjh21 Move the generic ARM disassembler from arm32/arm32 to arm/arm.
 1.10.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.10.2.1 18-Jan-2001  bouyer file disassem.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.11.8.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.14.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 25-Aug-2004  skrll Sync with HEAD.
 1.17.80.1 16-May-2008  yamt sync with head.
 1.17.78.1 18-May-2008  yamt sync with head.
 1.17.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.60.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.17.52.1 28-Aug-2007  matt Add decoder for mcrr/mrrc
 1.18.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.18.40.1 02-Jan-2015  martin Pull up following revision(s) (requested by skrll in ticket #1225):
sys/arch/arm/arm/disassem.c: revision 1.26
The mode synonyms are different for stm and ldm - handle this.
PR/49520: arm/disassem.c doesn't use proper address mode name for loads
 1.18.38.1 18-Feb-2012  mrg merge to -current.
 1.18.34.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.18.34.2 23-Jan-2013  yamt sync with head
 1.18.34.1 17-Apr-2012  yamt sync with head
 1.18.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.18.10.1 07-Jan-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #1939):
sys/arch/arm/arm/disassem.c: revision 1.26
The mode synonyms are different for stm and ldm - handle this.
PR/49520: arm/disassem.c doesn't use proper address mode name for loads
 1.19.2.3 03-Dec-2017  jdolecek update from HEAD
 1.19.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1 25-Feb-2013  tls resync with head
 1.20.2.2 18-May-2014  rmind sync with head
 1.20.2.1 28-Aug-2013  rmind sync with head
 1.24.4.4 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1104):
sys/arch/arm/arm/disassem.c: revisions 1.29-1.34
Remove duplicate entry
--
Document 'e'
--
Remove incorrect entries
--
More instructions. Lots left to do.
--
Move /* A5.2.10 Synchronisation primitives */ block earlier so it
matches correctly
--
Move mcrr and mrrc up the list so they match ahead of ldc/ldc2
 1.24.4.3 15-May-2015  snj Pull up following revision(s) (requested by joerg in ticket #772):
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.4
sys/arch/arm/arm/disassem.c: revision 1.25
sys/arch/arm/omap/am335x_cm_padconf.c: revision 1.3
sys/arch/arm/omap/sitara_cm.h: revision 1.2
sys/dev/ic/i82557var.h: revision 1.51
sys/dev/ic/rtl8169.c: revision 1.143
sys/dev/ieee1394/fwcrom.c: revision 1.17
sys/external/bsd/dwc2/dwc2.c: revision 1.32
dwc2_hubd appears to be unused so #if 0 it in order to appease clang
--
Preserve const.
--
No reason not to make the string const.
--
Drop unnecessary-but-harmful casts.
--
Replace void * cast with proper __UNVOLATILE.
--
Preserve const.
--
amlogic_genfb_hdmi_write_4 is currently unused, mark it as such.
 1.24.4.2 04-Jan-2015  martin Pull up following revision(s) (requested by skrll in ticket #377):
sys/arch/arm/arm/disassem.c: revision 1.27
sys/arch/arm/arm/disassem.c: revision 1.28
Trailing whitespace.
Do revision 1.20: Decode movw/movt properly.
Hi Matt.
 1.24.4.1 04-Jan-2015  martin Pull up following revision(s) (requested by skrll in ticket #375):
sys/arch/arm/arm/disassem.c: revision 1.26
The mode synonyms are different for stm and ldm - handle this.
PR/49520: arm/disassem.c doesn't use proper address mode name for loads
 1.25.2.4 28-Aug-2017  skrll Sync with HEAD
 1.25.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.2.2 06-Jun-2015  skrll Sync with HEAD
 1.25.2.1 06-Apr-2015  skrll Sync with HEAD
 1.34.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.34.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.39.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.39.10.1 10-Jun-2019  christos Sync with HEAD
 1.39.8.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.39.2.1 31-Oct-2018  martin Pull up following revision(s) (requested by skrll in ticket #1076):

sys/arch/arm/arm/disassem.c: revision 1.40

Allow setend be decode
 1.41.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 04-Mar-2001  matt s/vm_offset_t/vaddr_t/g
 1.3 13-Jan-2001  bjh21 branches: 1.3.2;
Make all the disasm_interface_t arguments const, thus allowing us to
allocate them statically in the text segment. Do so for disassemble().
 1.2 13-Jan-2001  bjh21 ANSIfy, un-__Pify, and in the case of disassem.c, add an RCSID.
 1.1 12-Jan-2001  bjh21 Move the generic ARM disassembler from arm32/arm32 to arm/arm.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 13-Jan-2001  bouyer file disassem.h was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.26 03-Apr-2019  christos centralize setdisklabel(9)
 1.25 25-Apr-2014  martin branches: 1.25.28;
If we don't find any label, default partition a to full disk size
and type 4.2BSD (like most other architectures and everything using MBR
does).
 1.24 09-Mar-2013  christos branches: 1.24.6; 1.24.10;
- make errors positive like elsewhere in the kernel, document error returns
- KNF
- fix commented out debugging
 1.23 15-Mar-2009  cegger branches: 1.23.12; 1.23.22;
ansify function definitions
 1.22 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.21 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.20 02-Jan-2008  ad branches: 1.20.10; 1.20.18; 1.20.24; 1.20.28;
Merge vmlocking2 to head.
 1.19 17-Oct-2007  garbled branches: 1.19.2; 1.19.4; 1.19.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.18 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.17 29-Jul-2007  ad branches: 1.17.2; 1.17.4; 1.17.6; 1.17.8; 1.17.10;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.16 04-Mar-2007  christos branches: 1.16.2; 1.16.10; 1.16.12; 1.16.14;
fix caddr_t fallout.
 1.15 25-Nov-2006  scw branches: 1.15.4;
Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
 1.14 11-Dec-2005  christos branches: 1.14.20; 1.14.22;
merge ktrace-lwp.
 1.13 02-Jun-2005  he branches: 1.13.2;
Adapt to shadowing and qualifier-cast warnings.
 1.12 26-Sep-2004  chris Fix for cd disklabel issues on arm machines.

Because we no longer return an error message when no disklabel was found
the scsipi/cd.c code took the label we generated. The problem is that the
readdisklabel code was clearing the partition information, which included
the default partition information setup by the cd.c code. Previously when
no disklabel was found we returned an error, which caused the cd.c code to
generate a new default label which included an a partition.

According to the man page for readdisklabel:
Unspecified fields in lp should be set to zero

Therefore we have no reason to clear the partition info, as it's already
clear or contains useful default partition info.

This means if we don't find a label on disk, the default label is left as
is. I would expect the driver to have setup a much more sensible default
label than we could fake at this level.

Also don't hard code the number of partitions to the maximum. This better
matches other platforms (i386)
 1.11 25-Sep-2004  chris Following a discussion with dsl, revert the last change.

A better fix will be forth coming.
 1.10 25-Sep-2004  chris When reading the disklabel if we fail to find one, return an error.

This should fix PR's 26564 and 26809.

This allows CD installs on cats to work, as a cdxa partition is now
faked, so sysinst can mount it.

This does go against changes made for PR 21408, as it will cause the error
cd0: no disk label
to appear when running disklabel cd0.

Really readdisklabel's API should be updated to allow better error returns,
such that the driver can choose to fake the label, if readdisklabel didn't
find one.
 1.9 07-Aug-2003  agc branches: 1.9.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 10-May-2003  thorpej branches: 1.7.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.6 02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.5 30-Apr-2003  thorpej Don't consider lack of disk label to be an error. This addresses
PR kern/21408 for all of the ARM ports. Other ports should follow
this example.
 1.4 16-Apr-2003  bouyer Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
 1.3 27-Aug-2002  thorpej In bounds_check_with_label(), look for the label sector in RAW_PART,
not "a".
 1.2 19-Feb-2002  wiz branches: 1.2.8; 1.2.10;
strategy should have an 'r'. Inspired by similar change in OpenBSD.
 1.1 04-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
These are same between arm32 & arm26.
 1.1.10.2 27-Aug-2002  thorpej Sync with -current.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file disksubr.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.1.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.2.10.1 27-Aug-2002  lukem Pull up revision 1.3 (requested by thorpej in ticket #736):
In bounds_check_with_label(), look for the label sector in RAW_PART,
not "a".
 1.2.8.1 30-Aug-2002  gehenna catch up with -current.
 1.7.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.4 19-Oct-2004  skrll Sync with HEAD
 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.9.2.1 01-Oct-2004  jmc Pullup rev 1.12 (requested by chris in ticket #874)

Fix cd installation issue on arm based machines.
 1.13.2.4 21-Jan-2008  yamt sync with head
 1.13.2.3 27-Oct-2007  yamt sync with head.
 1.13.2.2 03-Sep-2007  yamt sync with head.
 1.13.2.1 30-Dec-2006  yamt sync with head.
 1.14.22.1 10-Dec-2006  yamt sync with head.
 1.14.20.1 12-Jan-2007  ad Sync with head.
 1.15.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.16.12.1 07-Aug-2007  matt Sync with HEAD.
 1.16.10.2 16-Oct-2007  garbled Sync with HEAD
 1.16.10.1 03-Oct-2007  garbled Sync with HEAD
 1.16.2.2 09-Oct-2007  ad Sync with head.
 1.16.2.1 19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.17.10.1 14-Oct-2007  yamt sync with head.
 1.17.8.2 09-Jan-2008  matt sync with HEAD
 1.17.8.1 06-Nov-2007  matt sync with HEAD
 1.17.6.2 20-Jan-2008  chris Sync to HEAD.
 1.17.6.1 01-Jan-2008  chris Sync with HEAD.
 1.17.4.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.17.2.2 28-Feb-2008  rjs Sync with HEAD.
 1.17.2.1 01-Nov-2007  rjs Sync with HEAD.
 1.19.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.19.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.28.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.20.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.10.1 04-May-2009  yamt sync with head.
 1.23.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.22.1 23-Jun-2013  tls resync from head
 1.23.12.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.24.10.1 10-Aug-2014  tls Rebase.
 1.24.6.1 18-May-2014  rmind sync with head
 1.25.28.1 10-Jun-2019  christos Sync with HEAD
 1.14 15-Jan-2024  andvar Replace format specifier from %08x to PRId64 for bp->blkno.
Exchange incorrectly placed printf() __func__ and loop arguments.

Fixes DEBUG_LABEL enabled build for acorn32.
 1.13 29-Sep-2020  msaitoh s/occurence/occurrence/
 1.12 09-Mar-2013  christos - make errors positive like elsewhere in the kernel, document error returns
- KNF
- fix commented out debugging
 1.11 09-Mar-2013  mlelstv Errors are supposed to be negative errno numbers, not -1 which is interpreted
as EPERM.
 1.10 15-Mar-2009  cegger branches: 1.10.12; 1.10.22;
ansify function definitions
 1.9 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.8 02-Jan-2008  ad branches: 1.8.10; 1.8.18; 1.8.24; 1.8.28;
Merge vmlocking2 to head.
 1.7 17-Oct-2007  garbled branches: 1.7.2; 1.7.4; 1.7.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.6 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.5 11-Dec-2005  christos branches: 1.5.30; 1.5.38; 1.5.46; 1.5.48; 1.5.50; 1.5.52; 1.5.54;
merge ktrace-lwp.
 1.4 02-Jun-2005  he branches: 1.4.2;
Adapt to shadowing and qualifier-cast warnings.
 1.3 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.2 14-Jul-2003  lukem use __KERNEL_RCSID() in a consistent manner
 1.1 04-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.28;
These are same between arm32 & arm26.
 1.1.28.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.28.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file disksubr_acorn.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.1.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.4.2.2 21-Jan-2008  yamt sync with head
 1.4.2.1 27-Oct-2007  yamt sync with head.
 1.5.54.1 14-Oct-2007  yamt sync with head.
 1.5.52.2 09-Jan-2008  matt sync with HEAD
 1.5.52.1 06-Nov-2007  matt sync with HEAD
 1.5.50.2 20-Jan-2008  chris Sync to HEAD.
 1.5.50.1 01-Jan-2008  chris Sync with HEAD.
 1.5.48.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.5.46.2 28-Feb-2008  rjs Sync with HEAD.
 1.5.46.1 01-Nov-2007  rjs Sync with HEAD.
 1.5.38.1 16-Oct-2007  garbled Sync with HEAD
 1.5.30.1 09-Oct-2007  ad Sync with head.
 1.7.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.7.4.1 31-Dec-2007  ad Make compile with new buffer cache locking scheme.

XXX This should be largely MI, please do not make another clone of disksubr.c.
 1.7.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.28.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.10.1 04-May-2009  yamt sync with head.
 1.10.22.1 23-Jun-2013  tls resync from head
 1.10.12.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.18 13-Aug-2013  matt Ignore PMBR partition if it's partition 0.
Make sure all unused parts of the partition table are zeroed.
 1.17 10-Mar-2013  christos branches: 1.17.6;
remove stray brace
 1.16 09-Mar-2013  christos - make errors positive like elsewhere in the kernel, document error returns
- KNF
- fix commented out debugging
 1.15 18-Jan-2013  msaitoh Change for non MBR disk (PR#47463):
- Check each mbrp_type field in fdisk partition table in MBR to know whether
a sector is really MBR or not. Same as MI subr_disk_mbr.c
- Check whether each number in a partition table is out of bound or not.
Same as MI subr_disk_mbr.c
- Update d_packname and d_npartitions if we found any partitions.
- Currently, the exended partitions is not supported...
 1.14 16-Oct-2012  msaitoh Fix a bug that armeb machine misunderstand MBR partition's offset
and size. Fixes PR#47081
 1.13 02-Dec-2011  jakllsch branches: 1.13.4; 1.13.6; 1.13.8;
Use xlat_mbr_fstype().
 1.12 15-Mar-2009  cegger branches: 1.12.12;
ansify function definitions
 1.11 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 17-Oct-2007  garbled branches: 1.10.20; 1.10.28; 1.10.34; 1.10.38;
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.9 08-Oct-2007  ad Merge brelse() changes from the vmlocking branch.
 1.8 04-Mar-2007  christos branches: 1.8.2; 1.8.10; 1.8.16; 1.8.18; 1.8.20; 1.8.22; 1.8.24;
fix caddr_t fallout.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 02-Jun-2005  he branches: 1.6.2;
Adapt to shadowing and qualifier-cast warnings.
 1.5 03-Nov-2004  scw Fix mbr_label_locate() to return '1' on success rather than the '0'
leftover from the call to biowait(9).
 1.4 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.3 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.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 04-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.28;
These are same between arm32 & arm26.
 1.1.28.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.28.4 14-Nov-2004  skrll Sync with HEAD.
 1.1.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.28.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file disksubr_mbr.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.1.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.6.2.2 27-Oct-2007  yamt sync with head.
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.24.1 14-Oct-2007  yamt sync with head.
 1.8.22.1 06-Nov-2007  matt sync with HEAD
 1.8.20.1 01-Jan-2008  chris Sync with HEAD.
 1.8.18.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.8.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.8.10.1 16-Oct-2007  garbled Sync with HEAD
 1.8.2.1 09-Oct-2007  ad Sync with head.
 1.10.38.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.10.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.20.1 04-May-2009  yamt sync with head.
 1.12.12.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.12.12.3 23-Jan-2013  yamt sync with head
 1.12.12.2 30-Oct-2012  yamt sync with head
 1.12.12.1 17-Apr-2012  yamt sync with head
 1.13.8.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.8.3 23-Jun-2013  tls resync from head
 1.13.8.2 25-Feb-2013  tls resync with head
 1.13.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.6.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.13.4.2 10-Feb-2013  riz Pull up following revision(s) (requested by msaitoh in ticket #804):
sys/arch/arm/arm/disksubr_mbr.c: revision 1.15
Change for non MBR disk (PR#47463):
- Check each mbrp_type field in fdisk partition table in MBR to know whether
a sector is really MBR or not. Same as MI subr_disk_mbr.c
- Check whether each number in a partition table is out of bound or not.
Same as MI subr_disk_mbr.c
- Update d_packname and d_npartitions if we found any partitions.
- Currently, the exended partitions is not supported...
 1.13.4.1 23-Oct-2012  riz Pull up following revision(s) (requested by msaitoh in ticket #617):
sys/arch/arm/arm/disksubr_mbr.c: revision 1.14
Fix a bug that armeb machine misunderstand MBR partition's offset
and size. Fixes PR#47081
 1.17.6.1 28-Aug-2013  rmind sync with head
 1.4 10-Jul-2023  rin Factor out some fdt(4) features from {,evb}arm into dev/fdt.

Now, FDT-based support to efirt, initrd, rndseed, and efirng can be
used from, e.g., riscv.

Mostly from Nick Hudson.

XXX
As Nick comments, there can be some optimizations for fdt_map_range().
efiboot may also be modified to load these objects into aligned PAs.
 1.3 18-Dec-2022  skrll Appease KDASSERT / LOCKDEBUG.

Tested by mlelstv.
 1.2 03-May-2022  skrll branches: 1.2.4;
Catch up with aarch64 TTBR0 handling in pmap_{,de}activate_efirt and
kpreempt_{en,dis}able.
 1.1 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.2.4.1 19-Dec-2022  martin Pull up following revision(s) (requested by skrll in ticket #4):

sys/arch/arm/arm32/pmap.c: revision 1.438
sys/arch/arm/arm/efi_machdep.c: revision 1.3

Appease KDASSERT / LOCKDEBUG.

Tested by mlelstv.
 1.11 22-May-2023  riastradh efi(4): Move error macros to efi.h.

PR kern/57076

XXX pullup-10
 1.10 15-Oct-2022  jmcneill branches: 1.10.2;
Add a boot option to disable EFI runtime services.
 1.9 18-Jun-2022  skrll Simplify (imo) #ifdefs a little.
 1.8 03-Apr-2022  martin efi_rtcopy is only used on little endian kernels.
 1.7 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.6 10-Oct-2021  jmcneill efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
 1.5 18-Dec-2020  skrll Make this compile on arm
 1.4 08-Sep-2020  jmcneill branches: 1.4.2;
Disable EFI runtime support for BE kernels
 1.3 16-Dec-2019  jmcneill Enable FP access for EFI RT and improve error handling.
 1.2 25-Jul-2019  jmcneill branches: 1.2.2;
Only try to call EFI RT's reset once. If it faults for some reason, just
return an error so the kernel will try to PSCI reset instead. Otherwise
we get stuck in an endless loop..
 1.1 28-Oct-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for EFI runtime services on aarch64.
 1.1.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 28-Oct-2018  christos file efi_runtime.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.1.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.1 28-Oct-2018  pgoyette file efi_runtime.c was added on branch pgoyette-compat on 2018-11-26 01:52:17 +0000
 1.2.2.1 17-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #558):

sys/arch/aarch64/aarch64/efi_machdep.c: revision 1.5
sys/arch/arm/arm/efi_runtime.h: revision 1.3
sys/arch/arm/arm/efi_runtime.c: revision 1.3

Enable FP access for EFI RT and improve error handling.
 1.4.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.10.2.1 01-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #292):

sys/arch/arm/arm/efi_runtime.c: revision 1.11
sys/dev/efi/efi.h: revision 1.3
sys/arch/x86/x86/efi_machdep.c: revision 1.5
sys/arch/x86/x86/efi_machdep.c: revision 1.6
sys/dev/efi.c: revision 1.5
sys/dev/efi.c: revision 1.6
sys/dev/efi.c: revision 1.7
sys/dev/efi.c: revision 1.8
sys/dev/efi.c: revision 1.9
sys/dev/efivar.h: revision 1.2
sys/sys/efiio.h: revision 1.3

efi(4): Parenthesize EFIERR argument out of paranoia.
PR kern/57076

efi(4): Move error macros to efi.h.
PR kern/57076

efi(4): Implement MI parts of EFIIOC_GET_TABLE.
Intended to be compatible with FreeBSD.
Not yet supported on any architectures.
PR kern/57076

efi(4): Implement EFIIOC_GET_TABLE on x86.
PR kern/57076

efi(4): Translate between size_t and unsigned long.
Fixes i386 build.
PR kern/57076

efi(4): Fix logic to handle buffer sizing.

Can't KASSERT(datasize <= databufsize) because the caller is allowed
to pass in a too-small size and get ERR_BUFFER_TOO_SMALL back, with
the actual size returned so it can resize its buffer. So just clamp
the size to the smaller of what the caller provided and what the
firwmare provided, instead of asserting anything.

PR kern/57076
 1.5 10-Jul-2023  rin Factor out some fdt(4) features from {,evb}arm into dev/fdt.

Now, FDT-based support to efirt, initrd, rndseed, and efirng can be
used from, e.g., riscv.

Mostly from Nick Hudson.

XXX
As Nick comments, there can be some optimizations for fdt_map_range().
efiboot may also be modified to load these objects into aligned PAs.
 1.4 10-Oct-2021  jmcneill efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
 1.3 16-Dec-2019  jmcneill Enable FP access for EFI RT and improve error handling.
 1.2 31-Oct-2018  jmcneill branches: 1.2.2; 1.2.6; 1.2.8;
Setup mappings for EFI runtime mmio ranges.
 1.1 28-Oct-2018  jmcneill Add support for EFI runtime services on aarch64.
 1.2.8.1 17-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #558):

sys/arch/aarch64/aarch64/efi_machdep.c: revision 1.5
sys/arch/arm/arm/efi_runtime.h: revision 1.3
sys/arch/arm/arm/efi_runtime.c: revision 1.3

Enable FP access for EFI RT and improve error handling.
 1.2.6.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 31-Oct-2018  christos file efi_runtime.h was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.2.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.1 31-Oct-2018  pgoyette file efi_runtime.h was added on branch pgoyette-compat on 2018-11-26 01:52:17 +0000
 1.10 24-Feb-2020  rin Fix previous; we need <uvm/uvm_extern.h> for machines with
!ARM_HAS_VBAR && !__ARM_FIQ_INDIRECT.
 1.9 22-Feb-2020  chs remove some unnecessary includes of internal UVM headers.
 1.8 24-Jan-2018  skrll branches: 1.8.4; 1.8.10;
Remove port-acorn26

OK core@
 1.7 12-Jun-2013  matt Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.6 19-Nov-2008  matt branches: 1.6.16; 1.6.26;
Add some KASSERTS and tests for I32_bit to include F32_bit
 1.5 03-Apr-2002  thorpej branches: 1.5.116; 1.5.120; 1.5.126; 1.5.128; 1.5.134;
Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.4 05-Feb-2002  thorpej Allow platforms to use an extra level of indirection for FIQs,
enabled by definining __ARM_FIQ_INDIRECT in <machine/types.h>.
This is needed for OpenFirmware systems (like the Shark), where
the OFW vector page is used, and kernel entries merely patched
into it.
 1.3 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.2 20-Dec-2001  bjh21 branches: 1.2.2; 1.2.4;
Remove some outdated comments: arm26 kernels use APCS-32 now, which
means they don't do silly things like restoring IRQ/FIQ disable bits
on function return.
 1.1 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.2.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 20-Dec-2001  thorpej file fiq.c was added on branch kqueue on 2002-01-10 19:37:46 +0000
 1.2.2.4 17-Apr-2002  nathanw Catch up to -current.
 1.2.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 20-Dec-2001  nathanw file fiq.c was added on branch nathanw_sa on 2002-01-08 00:23:06 +0000
 1.5.134.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.128.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.126.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.5.120.1 04-May-2009  yamt sync with head.
 1.5.116.1 17-Jan-2009  mjf Sync with HEAD.
 1.6.26.1 23-Jun-2013  tls resync from head
 1.6.16.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.8.10.1 29-Feb-2020  ad Sync with head.
 1.8.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.7 24-Jan-2018  skrll branches: 1.7.2; 1.7.4;
Remove port-acorn26

OK core@
 1.6 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.5 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.4 27-Apr-2008  matt branches: 1.4.18; 1.4.34; 1.4.44; 1.4.50;
Merge kernel changes in matt-armv6 to HEAD.
 1.3 12-Apr-2002  thorpej branches: 1.3.92; 1.3.116; 1.3.118; 1.3.120;
Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.2 01-Jan-2002  skrll branches: 1.2.2; 1.2.4;
Fix typo in comment.
 1.1 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.2.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 01-Jan-2002  thorpej file fiq_subr.S was added on branch kqueue on 2002-01-10 19:37:47 +0000
 1.2.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 01-Jan-2002  nathanw file fiq_subr.S was added on branch nathanw_sa on 2002-01-08 00:23:06 +0000
 1.3.120.1 16-May-2008  yamt sync with head.
 1.3.118.1 18-May-2008  yamt sync with head.
 1.3.116.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.92.1 28-Aug-2007  matt Use RET.
 1.4.50.2 18-May-2014  rmind sync with head
 1.4.50.1 28-Aug-2013  rmind sync with head
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.34.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.4.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.7.4.1 10-Jun-2019  christos Sync with HEAD
 1.7.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8 28-Oct-2019  joerg Add operand that GNU as considers optional, but LLVM doesn't.
 1.7 07-Apr-2019  thorpej ...and now I really have the list of arch versions that require the armv2
style of ufetch_16/ustore_16. And since it's so many, just stop naming it
for the arch version, and name it for the instruction capability.
 1.6 07-Apr-2019  thorpej Fix ARM_ARCH_* brain fart.
 1.5 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.4 24-Jan-2018  skrll branches: 1.4.4;
Remove port-acorn26

OK core@
 1.3 18-Aug-2013  matt branches: 1.3.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 18-Jan-2009  bjh21 branches: 1.2.2; 1.2.6; 1.2.18; 1.2.28; 1.2.32;
Adapt the arm32 fusu implementation for use on PROG26 configurations
and use it on acorn26.
 1.1 18-Jan-2009  bjh21 Move arch/arm/arm32/fusu.S to arch/arm/arm/fusu.S in preparation for making
it usable on acorn26 as well.
 1.2.32.1 28-Aug-2013  rmind sync with head
 1.2.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.18.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.2 04-May-2009  yamt sync with head.
 1.2.6.1 18-Jan-2009  yamt file fusu.S was added on branch yamt-nfs-mp on 2009-05-04 08:10:38 +0000
 1.2.2.2 19-Jan-2009  skrll Sync with HEAD.
 1.2.2.1 18-Jan-2009  skrll file fusu.S was added on branch nick-hppapmap on 2009-01-19 13:15:57 +0000
 1.3.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.2.1 18-Aug-2013  matt file fusu.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.4.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.1 10-Jun-2019  christos Sync with HEAD
 1.6 17-Feb-2021  skrll Trailing whitespace. *snigger*
 1.5 18-Aug-2013  matt branches: 1.5.42;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.4 28-Apr-2008  martin branches: 1.4.18; 1.4.34; 1.4.44; 1.4.50;
Remove clause 3 and 4 from TNF licenses
 1.3 06-Jan-2008  matt branches: 1.3.6; 1.3.8; 1.3.10;
Cleanup softint lossage.
 1.2 17-May-2007  yamt branches: 1.2.2; 1.2.4; 1.2.10; 1.2.14; 1.2.16; 1.2.18; 1.2.24; 1.2.30;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.1 29-Mar-2007  skrll branches: 1.1.2;
file idle_machdep.c was initially added on branch yamt-idlelwp.
 1.1.2.1 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.2.30.1 08-Jan-2008  bouyer Sync with HEAD
 1.2.24.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.18.3 21-Jan-2008  yamt sync with head
 1.2.18.2 03-Sep-2007  yamt sync with head.
 1.2.18.1 17-May-2007  yamt file idle_machdep.c was added on branch yamt-lazymbuf on 2007-09-03 14:23:12 +0000
 1.2.16.1 09-Jan-2008  matt sync with HEAD
 1.2.14.1 20-Jan-2008  chris Sync to HEAD.
 1.2.10.1 28-Feb-2008  rjs Sync with HEAD.
 1.2.4.2 11-Jul-2007  mjf Sync with head.
 1.2.4.1 17-May-2007  mjf file idle_machdep.c was added on branch mjf-ufs-trans on 2007-07-11 19:58:03 +0000
 1.2.2.4 18-Jul-2007  ad Fix merge errors.
 1.2.2.3 15-Jul-2007  ad Sync with head.
 1.2.2.2 09-Jun-2007  ad Sync with head.
 1.2.2.1 17-May-2007  ad file idle_machdep.c was added on branch vmlocking on 2007-06-09 21:36:50 +0000
 1.3.10.1 16-May-2008  yamt sync with head.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.50.1 28-Aug-2013  rmind sync with head
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.34.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.4.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9 27-Jan-2008  chris Add an arm/conf/std.arm file which contains common arm options, initially
just options CPU_IN_CKSUM.

Include std.arm in all arm platform std files.

This should reenable the asm in_cksum code for all arm platforms.

Also remove the now unused in_cksum_arm.S.
 1.8 08-Oct-2006  bjh21 branches: 1.8.24; 1.8.28; 1.8.30; 1.8.36;
Use RCSID().
 1.7 08-Oct-2006  bjh21 Go back to not saving R14 on 32-bit CPUs, with the saving being conditional
on __PROG26. This should make everyone happy except for those who don't like
#ifdefs.
 1.6 08-Oct-2006  bjh21 Use LDR/STR rather than LDM/STM for saving R14 over L_cksumdata. LDM/STM
are apparently very slow on some processors. This is an interim measure
while I work out how to expose __PROG{26,32} to assembly language.
 1.5 07-Oct-2006  bjh21 in L_cksumdata, stash R14 on the stack before doing anything. This is
helpful on acorn26, since kernel-mode page faults corrupt R14. Doing this
seems to help with the occasional crashes I've seen in this routine.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 26-Nov-2003  rearnsha branches: 1.3.4; 1.3.18;
Reposition a couple of NOP instructions for better efficiency.
 1.2 23-Sep-2003  scw Tweak register usage to shave a couple of instructions off
the Xscale code.
 1.1 11-Sep-2003  scw Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
 1.3.18.2 04-Feb-2008  yamt sync with head.
 1.3.18.1 30-Dec-2006  yamt sync with head.
 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 26-Nov-2003  skrll file in_cksum_arm.S was added on branch ktrace-lwp on 2004-08-03 10:32:29 +0000
 1.4.22.1 22-Oct-2006  yamt sync with head
 1.4.20.1 18-Nov-2006  ad Sync with head.
 1.8.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.30.2 23-Mar-2008  matt sync with HEAD
 1.8.30.1 28-Aug-2007  matt Use RET.
 1.8.28.1 27-Jan-2008  chris Sync to HEAD.
 1.8.24.1 28-Feb-2008  rjs Sync with HEAD.
 1.7 11-Sep-2003  scw Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
 1.6 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.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 14-Aug-2002  thorpej branches: 1.4.8;
Whitespace.
 1.3 08-Dec-2001  chris branches: 1.3.8;
Fix the asm macros
The tmpx registers are now outputs, this makes them all unique.
Add the fact that cc is changed by the asm (not believed to be used but rather be correct)
Correctly specify w as an input and output register, I think this was hiding the bug below!
Allow sum to be in a different input and output register.

Correct bug in psuedo header handling for in4_cksum. Seems that the new macros turned up a latent bug in the psuedo header handling, the code was moving a pointer forward 16 bytes twice, not found before as the ADD16 macro wasn't 100% accurate, as it didn't output w, even though it modified it.
 1.2 23-May-2001  chris branches: 1.2.2; 1.2.8;
Create an asm based version of in4_cksum based on the sparc version.

Also don't compute psuedo header for nxt == 0
 1.1 11-Jan-2001  bjh21 branches: 1.1.2; 1.1.4;
Start merging actual code in arm32 and arm26:
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c

Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 11-Jan-2001  bjh21 Start merging actual code in arm32 and arm26:
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c

Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
 1.1.2.1 11-Jan-2001  bjh21 file in_cksum_arm.c was added on branch thorpej_scsipi on 2001-01-11 23:27:28 +0000
 1.2.8.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 23-May-2001  nathanw file in_cksum_arm.c was added on branch nathanw_sa on 2002-01-08 00:23:06 +0000
 1.2.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.8.1 30-Aug-2002  gehenna catch up with -current.
 1.4.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2 17-Jan-2002  bjh21 branches: 1.2.2; 1.2.4;
More-or-less working signal handling for Linux processes on ARM.
 1.1 14-Jan-2002  bjh21 Crude first cut at ARMLinux binary compatibility. Successfully runs
"/emul/linux/bin/echo hello, world", dynamically linked.
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 17-Jan-2002  nathanw file linux_sigcode.S was added on branch nathanw_sa on 2002-02-28 04:07:18 +0000
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 17-Jan-2002  jdolecek file linux_sigcode.S was added on branch kqueue on 2002-02-11 20:07:16 +0000
 1.27 07-Mar-2015  christos adjust to new trace_{enter,exit}
 1.26 03-Apr-2014  rjs branches: 1.26.6;
Add support for EABI syscalls.
 1.25 18-Aug-2013  matt Use <arm/locore.h>
 1.24 12-Nov-2012  skrll branches: 1.24.2;
C99 types
 1.23 21-Nov-2009  rmind branches: 1.23.12; 1.23.20; 1.23.22;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.22 21-Oct-2008  ad branches: 1.22.12;
Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
 1.21 28-Apr-2008  martin branches: 1.21.6;
Remove clause 3 and 4 from TNF licenses
 1.20 06-Feb-2008  dsl branches: 1.20.6; 1.20.8; 1.20.10;
Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
 1.19 05-Jan-2008  dsl Don't pass 'curlwp' into trace_enter() and trace_exit().
 1.18 07-Mar-2006  thorpej branches: 1.18.2; 1.18.38; 1.18.42; 1.18.44; 1.18.50; 1.18.58;
Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.17 07-Mar-2006  thorpej Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
 1.16 05-Mar-2006  christos Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
 1.15 05-Mar-2006  christos branches: 1.15.2;
implement PT_SYSCALL
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6;
merge ktrace-lwp.
 1.13 02-Jul-2005  he branches: 1.13.2;
Delete now unused "bad" label.
 1.12 01-Jul-2005  christos PR/29607: Christian Biere systrace doesn't handle interrupted syscalls properly
Instead of jumping to the default "bad" case, jump to the error handling
switch, so that we can deal with ERESTART/EJUSTRETURN properly.
 1.11 01-Aug-2004  jdolecek the ARMLinux ARM-specific range was moved to offset 0x180 in the NetBSD
syscall table (sync with rev. 1.7 of sys/compat/linux/arch/arm/syscalls.master)
 1.10 31-Oct-2003  simonb Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
 1.9 01-Mar-2003  thorpej branches: 1.9.2;
Do the syscall_plain/syscall_fancy dance on ARM. Shaves a fair number
of cycles off the syscall overhead.

Since all COMPAT_LINUX platforms now support __HAVE_SYSCALL_INTERN,
garbage-collect the LINUX_SYSCALL_FUNCTION stuff.
 1.8 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 21-Dec-2002  manu Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
 1.6 15-Nov-2002  manu Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
 1.5 17-Jun-2002  christos MD systrace gluons.
 1.4 10-Mar-2002  bjh21 branches: 1.4.4;
__RCSID -> __KERNEL_RCSID
 1.3 17-Feb-2002  bjh21 branches: 1.3.2;
Add a prototype for linux_syscall(). It should be in a header file, but
other files that refer to it don't know its argument types anyway.
 1.2 23-Jan-2002  bjh21 branches: 1.2.2;
Add support for the ARM-specific syscalls in ARMLinux. These are invoked
by SWI numbers above 0x9f0000, but we re-map them down to somewhere just
after the end of the usual syscall range, since NetBSD doesn't handle
sparse syscall arrays well.

The only syscall I've actually implemented in this range is cacheflush(),
which was previously being mapped to fork(), causing ... interesting results.
 1.1 17-Jan-2002  bjh21 Separate out syscall() out into three parts:
swi_handler() does stuff that all SWIs will need, then calls
curproc->p_emul->e_syscall.
syscall() handles native NetBSD system calls.
linux_syscall() handles Linux system calls.
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 23-Jan-2002  jdolecek file linux_syscall.c was added on branch kqueue on 2002-02-11 20:07:17 +0000
 1.3.2.7 29-Dec-2002  thorpej Sync with HEAD.
 1.3.2.6 11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.5 20-Jun-2002  nathanw Catch up to -current.
 1.3.2.4 04-May-2002  thorpej LWP'ify.
 1.3.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.1 17-Feb-2002  nathanw file linux_syscall.c was added on branch nathanw_sa on 2002-02-28 04:07:18 +0000
 1.4.4.1 14-Jul-2002  gehenna catch up with -current.
 1.9.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.2.3 11-Feb-2008  yamt sync with head.
 1.13.2.2 21-Jan-2008  yamt sync with head
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.2.2 13-Mar-2006  yamt sync with head.
 1.15.2.1 05-Mar-2006  yamt file linux_syscall.c was added on branch yamt-pdpolicy on 2006-03-13 09:06:52 +0000
 1.18.58.1 08-Jan-2008  bouyer Sync with HEAD
 1.18.50.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.44.2 23-Mar-2008  matt sync with HEAD
 1.18.44.1 09-Jan-2008  matt sync with HEAD
 1.18.42.2 09-Feb-2008  chris Sync to HEAD.
 1.18.42.1 20-Jan-2008  chris Sync to HEAD.
 1.18.38.1 28-Feb-2008  rjs Sync with HEAD.
 1.18.2.2 07-Mar-2006  thorpej Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.18.2.1 07-Mar-2006  thorpej file linux_syscall.c was added on branch elad-kernelauth on 2006-03-07 07:21:51 +0000
 1.20.10.3 11-Mar-2010  yamt sync with head
 1.20.10.2 04-May-2009  yamt sync with head.
 1.20.10.1 16-May-2008  yamt sync with head.
 1.20.8.1 18-May-2008  yamt sync with head.
 1.20.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.20.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.22.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.23.22.3 03-Dec-2017  jdolecek update from HEAD
 1.23.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.23.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.12.1 16-Jan-2013  yamt sync with (a bit old) head
 1.24.2.2 18-May-2014  rmind sync with head
 1.24.2.1 28-Aug-2013  rmind sync with head
 1.26.6.1 06-Apr-2015  skrll Sync with HEAD
 1.8 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.7 28-Apr-2008  martin branches: 1.7.18;
Remove clause 3 and 4 from TNF licenses
 1.6 18-Feb-2007  matt branches: 1.6.44; 1.6.46; 1.6.48;
Changes for newlock2.
 1.5 11-Dec-2005  christos branches: 1.5.26;
merge ktrace-lwp.
 1.4 10-Oct-2003  matt branches: 1.4.16;
Adapt ARM Linux compat code to deal with SIGINFO.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 17-Jan-2003  thorpej branches: 1.2.2;
Merge the nathanw_sa branch.
 1.1 14-Jan-2002  bjh21 branches: 1.1.2; 1.1.4;
Crude first cut at ARMLinux binary compatibility. Successfully runs
"/emul/linux/bin/echo hello, world", dynamically linked.
 1.1.4.3 04-May-2002  thorpej LWP'ify.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 14-Jan-2002  nathanw file linux_trap.c was added on branch nathanw_sa on 2002-02-28 04:07:18 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 14-Jan-2002  jdolecek file linux_trap.c was added on branch kqueue on 2002-02-11 20:07:17 +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.16.1 26-Feb-2007  yamt sync with head.
 1.5.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.6.48.2 11-Mar-2010  yamt sync with head
 1.6.48.1 16-May-2008  yamt sync with head.
 1.6.46.1 18-May-2008  yamt sync with head.
 1.6.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.14 08-Dec-2019  skrll Typo in comment
 1.13 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.12 24-Jan-2018  skrll branches: 1.12.4;
Remove port-acorn26

OK core@
 1.11 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.10 11-Aug-2013  matt unified syntax, make it play nice with thumb
 1.9 31-Aug-2012  matt branches: 1.9.2; 1.9.4;
Add ucas32 for SMP.
 1.8 16-Aug-2012  matt Actually use the assembly version of the atomic function if compiling
for armv6 or armv7 cpus. Use atomic_cas_ptr instead of _lock_cas so
we pick up the assembly version when it's used.
 1.7 07-Jul-2010  chs branches: 1.7.8; 1.7.16;
implement ucas_* for arm.
 1.6 16-Jan-2009  bjh21 branches: 1.6.4; 1.6.6;
Simplify the pre-ARMv6 code. Specifically:
* Take advantage of conditional instructions to avoid branching.
* Tweak register allocation to remove some MOVs from the debug code.
* In the debug code, only the address of the counter varies between
the success and failure cases, so make the rest of the code common.

Also correct the initial comment: _lock_cas returns the old value, not a
boolean.
 1.5 28-Apr-2008  martin branches: 1.5.8; 1.5.16;
Remove clause 3 and 4 from TNF licenses
 1.4 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.3 10-Feb-2008  ad branches: 1.3.6; 1.3.8; 1.3.10;
Add aliases for atomic_cas_foo_ni().
 1.2 29-Nov-2007  ad - Change _lock_cas() to do compare-and-swap instead of compare-and-set.
- Add aliases for atomic_cas_ulong() and friends.
 1.1 09-Mar-2007  thorpej branches: 1.1.2; 1.1.4; 1.1.10; 1.1.18; 1.1.20; 1.1.22; 1.1.24; 1.1.26; 1.1.32;
[Missed this file in the initial commit.]

Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.1.32.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.32.1 08-Dec-2007  mjf Sync with HEAD.
 1.1.26.4 11-Feb-2008  yamt sync with head.
 1.1.26.3 07-Dec-2007  yamt sync with head
 1.1.26.2 03-Sep-2007  yamt sync with head.
 1.1.26.1 09-Mar-2007  yamt file lock_cas.S was added on branch yamt-lazymbuf on 2007-09-03 14:23:12 +0000
 1.1.24.3 23-Mar-2008  matt sync with HEAD
 1.1.24.2 28-Jan-2008  matt When building an armv6, let lock_cas use ldrex/strex
 1.1.24.1 09-Jan-2008  matt sync with HEAD
 1.1.22.2 21-Mar-2008  chris Sync with head.
 1.1.22.1 01-Jan-2008  chris Sync with HEAD.
 1.1.20.1 03-Dec-2007  joerg Sync with HEAD.
 1.1.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.1.18.1 26-Dec-2007  rjs Sync with HEAD.
 1.1.10.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.1.4.2 12-Mar-2007  rmind Sync with HEAD (missed new files in previous).
 1.1.4.1 09-Mar-2007  rmind file lock_cas.S was added on branch yamt-idlelwp on 2007-03-12 06:14:49 +0000
 1.1.2.2 03-Dec-2007  ad Sync with HEAD.
 1.1.2.1 03-Dec-2007  ad Sync with HEAD.
 1.3.10.3 11-Aug-2010  yamt sync with head.
 1.3.10.2 04-May-2009  yamt sync with head.
 1.3.10.1 16-May-2008  yamt sync with head.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.6.6.1 05-Mar-2011  rmind sync with head
 1.6.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.8.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.7.8.1 30-Oct-2012  yamt sync with head
 1.9.4.1 28-Aug-2013  rmind sync with head
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.4.1 10-Jun-2019  christos Sync with HEAD
 1.35 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.34 19-Oct-2020  christos branches: 1.34.2;
_KERNEL_OPT police
 1.33 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.32 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.31 21-Feb-2017  skrll KNF
 1.30 13-Aug-2014  matt branches: 1.30.2; 1.30.4; 1.30.6;
Add __NO_FIQ to prevent testing of the PSR FIQ bit
Use VALID_R15_PSR(pc, spsr) instead of testing explicitly
 1.29 04-Jan-2014  dsl Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
 1.28 14-Oct-2013  skrll Fix size parameter to memset. Found by gcc 4.8.
 1.27 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.26 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.25 08-Dec-2012  matt branches: 1.25.2;
Make sure the enable bit is not set when restoring the VFP context since
that has special meaning to the VFP PCU code.
 1.24 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.23 16-Aug-2012  matt branches: 1.23.2;
Rename process_frame to lwp_trapframe
 1.22 21-Nov-2009  rmind branches: 1.22.12; 1.22.20;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.21 16-May-2009  cegger KNF, same object code generated.
(checked with evbarm CP3100 kernel)
 1.20 18-Mar-2009  cegger bcopy -> memcpy
 1.19 19-Nov-2008  matt branches: 1.19.4;
Add some KASSERTS and tests for I32_bit to include F32_bit
 1.18 04-Mar-2007  christos branches: 1.18.42; 1.18.46; 1.18.52; 1.18.54; 1.18.60;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 11-Dec-2005  christos branches: 1.17.26;
merge ktrace-lwp.
 1.16 14-Sep-2005  martin Now that process_frame() is a macro (done "unannounced" in arm's
include/frame.h), don't try to define an inline function with the
same name and same contents.
 1.15 02-Jun-2005  uwe branches: 1.15.2;
Drop redundant (and wrong) cast.
 1.14 01-Jun-2005  scw Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).
 1.13 21-Aug-2004  rearnsha Support Thumb applications
 1.12 24-Mar-2004  ws Fix Frank Lancaster's broken license (after consulting with him).
Pointed out by wiz.
 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 17-Jan-2003  thorpej branches: 1.10.2;
Merge the nathanw_sa branch.
 1.9 24-Nov-2001  thorpej Move the ARM, Ltd. floating point emulator to arch/arm.
 1.8 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.7 27-Oct-2001  rearnsha branches: 1.7.2;
Add a couple more diagnostics.
 1.6 28-Feb-2001  bjh21 branches: 1.6.4; 1.6.6; 1.6.8;
PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26). Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway). Someone should try running one.
 1.5 27-Feb-2001  bjh21 opt_armfpe.h isn't arm32-specific any more.
 1.4 27-Feb-2001  bjh21 <arm/armreg.h> isn't arm26-specific any more.
 1.3 27-Feb-2001  bjh21 Stop using #ifdef arm32, since future NetBSD/arm ports are likely
not to provide it.

For things which are historical oddities of NetBSD/arm26, use #ifndef arm26.
For things which are inherently dependent on the size of program space in use,
use #ifdef PROG32 (and include opt_progmode.h).
 1.2 26-Feb-2001  bjh21 This file doesn't need <machine/cpus.h>.
 1.1 11-Feb-2001  bjh21 Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it. This should
reduce code size a little.
 1.6.8.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.6.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.6.4.1 28-Feb-2001  bouyer file process_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:18 +0000
 1.7.2.4 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.7.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.7.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.7.2.1 27-Oct-2001  thorpej file process_machdep.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.2 03-Sep-2007  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.60.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.18.54.2 28-Apr-2009  skrll Sync with HEAD.
 1.18.54.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.52.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.18.46.3 11-Mar-2010  yamt sync with head
 1.18.46.2 20-Jun-2009  yamt sync with head
 1.18.46.1 04-May-2009  yamt sync with head.
 1.18.42.1 17-Jan-2009  mjf Sync with HEAD.
 1.19.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.22.12.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.22.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.22.12.1 30-Oct-2012  yamt sync with head
 1.23.2.3 03-Dec-2017  jdolecek update from HEAD
 1.23.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 25-Feb-2013  tls resync with head
 1.25.2.2 18-May-2014  rmind sync with head
 1.25.2.1 28-Aug-2013  rmind sync with head
 1.30.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.30.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.30.2.1 28-Aug-2017  skrll Sync with HEAD
 1.34.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 05-Apr-2014  christos adjust to new signature; return consistent stuff. 0 is ok -1 is error
 1.3 11-Dec-2005  christos branches: 1.3.114; 1.3.124; 1.3.130;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Aug-2001  chris branches: 1.1.2; 1.1.8; 1.1.26;
Share procfs_machdep.c across arm.
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 05-Aug-2001  chris Share procfs_machdep.c across arm.
 1.1.8.1 05-Aug-2001  chris file procfs_machdep.c was added on branch nathanw_sa on 2001-08-05 13:09:46 +0000
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 05-Aug-2001  thorpej file procfs_machdep.c was added on branch kqueue on 2001-08-25 06:15:08 +0000
 1.3.130.1 18-May-2014  rmind sync with head
 1.3.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.114.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.8 30-Dec-2024  jmcneill psci: Add support for PSCI_CPU_SUSPEND
 1.7 07-Aug-2021  jmcneill branches: 1.7.12;
arm: PSCI: Add a function to return the PSCI conduit.
 1.6 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.5 16-Jan-2021  chs remove unused "_DIAGNOSTIC" option and opt_diagnostic.h.
note that this is unrelated to the widely used "DIAGNOSTIC" option.
 1.4 04-Dec-2020  skrll Trailing whitespace
 1.3 13-Oct-2018  jmcneill branches: 1.3.12;
Add function that returns true if PSCI has been initialized
 1.2 15-Jun-2018  jakllsch branches: 1.2.2;
Use correct value for PSCI 0.2+ PSCI_CPU_ON.
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add support for ARM Power State Coordination Interface (PSCI).
 1.1.10.2 20-Oct-2018  pgoyette Sync with head
 1.1.10.1 25-Jun-2018  pgoyette Sync with HEAD
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 28-Jun-2017  jdolecek file psci.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file psci.c was added on branch nick-nhusb on 2017-08-28 17:51:29 +0000
 1.1.4.3 18-Jun-2018  martin Pull up following revision(s) (requested by jakllsch in ticket #883):

sys/arch/arm/fdt/psci_fdt.c: revision 1.5
sys/arch/arm/arm/psci.c: revision 1.2

Use correct value for PSCI 0.2+ PSCI_CPU_ON.

Fix PSCI 0.1 detection.
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file psci.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.3.12.2 03-Apr-2021  thorpej Sync with HEAD.
 1.3.12.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.7.12.1 02-Aug-2025  perseant Sync with HEAD
 1.5 30-Dec-2024  jmcneill psci: Add support for PSCI_CPU_SUSPEND
 1.4 07-Aug-2021  jmcneill branches: 1.4.12;
arm: PSCI: Add a function to return the PSCI conduit.
 1.3 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.2 13-Oct-2018  jmcneill Add function that returns true if PSCI has been initialized
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12;
Add support for ARM Power State Coordination Interface (PSCI).
 1.1.12.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.1 20-Oct-2018  pgoyette Sync with head
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 28-Jun-2017  jdolecek file psci.h was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file psci.h was added on branch nick-nhusb on 2017-08-28 17:51:29 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file psci.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add support for ARM Power State Coordination Interface (PSCI).
 1.1.10.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 28-Jun-2017  jdolecek file psci_arm.S was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file psci_arm.S was added on branch nick-nhusb on 2017-08-28 17:51:29 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file psci_arm.S was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.53 14-Apr-2024  skrll Trailing whitespace.
 1.52 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.51 27-Nov-2018  maxv branches: 1.51.12;
Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.50 24-Jan-2018  skrll branches: 1.50.2; 1.50.4;
Remove port-acorn26

OK core@
 1.49 24-Mar-2015  matt branches: 1.49.10;
Preserve/restore user r/w tpid in mcontext.
 1.48 13-Aug-2014  matt branches: 1.48.2;
When creating a mcontext, make sure the PSR we are saving is actually valid.
 1.47 18-Aug-2013  matt branches: 1.47.4; 1.47.6; 1.47.10;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.46 04-Mar-2013  matt branches: 1.46.6;
Fix boolean inversion in FPU setcontext.
 1.45 08-Dec-2012  matt Make sure that if _UC_FPU is set, that _UC_ARM_VFP is also set.
 1.44 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.43 16-Aug-2012  matt branches: 1.43.2;
Rename process_frame to lwp_trapframe
 1.42 21-May-2012  martin Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
 1.41 25-Jan-2012  tsutsui branches: 1.41.2;
STACKALIGN(fp) -> STACK_ALIGN(fp, STACK_ALIGNBYTES)
per recent param.h cleanup.
 1.40 30-Jun-2011  wiz branches: 1.40.2; 1.40.6;
dependant -> dependent
 1.39 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.38 21-Nov-2009  rmind branches: 1.38.4; 1.38.6; 1.38.8;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.37 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.36 19-Nov-2008  ad branches: 1.36.4;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.35 24-Apr-2008  ad branches: 1.35.2; 1.35.4; 1.35.8; 1.35.10; 1.35.16;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.34 17-Oct-2007  garbled branches: 1.34.16; 1.34.18;
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.33 08-Jul-2007  pooka branches: 1.33.10; 1.33.12;
Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL. Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
 1.32 04-Mar-2007  christos branches: 1.32.2; 1.32.4; 1.32.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.31 18-Feb-2007  ad More signals/locking changes.
 1.30 18-Feb-2007  briggs Adapt to newlock2.
 1.29 09-Feb-2007  ad branches: 1.29.2;
Merge newlock2 to head.
 1.28 22-Oct-2006  peter add const
 1.27 05-Aug-2006  bjh21 branches: 1.27.4; 1.27.6;
Centralize the various checks for validity of a CPU context in one macro,
so we don't have to get it right in lots of different places.
 1.26 10-May-2006  skrll Fix a bunch of cast lvalues.
 1.25 11-Dec-2005  christos branches: 1.25.4; 1.25.6; 1.25.8; 1.25.10; 1.25.12;
merge ktrace-lwp.
 1.24 13-Sep-2005  christos split compat_16 functions to their own file and make this compile again.
 1.23 21-Aug-2004  rearnsha branches: 1.23.12;
Support throwing signals to Thumb handlers.
 1.22 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.21 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.20 26-Sep-2003  simonb Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
 1.19 13-Sep-2003  chris Tidy up a couple of bits to avoid duplication within the switch.
 1.18 23-Jun-2003  martin branches: 1.18.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.17 11-Apr-2003  nathanw Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
 1.16 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 15-Sep-2002  skrll Fix typos in comment.
 1.14 04-Jul-2002  thorpej Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.
 1.13 23-Jun-2002  thorpej When delivering a signal, arrange to have the handler invoked directly,
using the trampoline only for the return. This saves two instructions
in the trampoline, one of them being a branch.
 1.12 23-Jun-2002  thorpej When delivering a signal, there is no need to push the signal number,
code, context pointer, or handler onto the stack, so don't do so.
 1.11 24-Mar-2002  bjh21 branches: 1.11.2;
arm26 -> acorn26 changes.
 1.10 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.9 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.8 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.7 07-Aug-2001  bjh21 branches: 1.7.6;
Use STACKALIGN rather than &=~7.
 1.6 06-Aug-2001  bjh21 When delivering a signal, ensure that the stack is 8-byte-aligned.
 1.5 10-Mar-2001  bjh21 branches: 1.5.2; 1.5.4;
Don't allow the I and F (IRQ and FIQ disable) flags to be set in the PSR
by sigreturn. This prevents user processes disabling interrupts by messing
with their signal context.
 1.4 28-Feb-2001  bjh21 branches: 1.4.2;
PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26). Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway). Someone should try running one.
 1.3 27-Feb-2001  bjh21 <arm/armreg.h> isn't arm26-specific any more.
 1.2 27-Feb-2001  bjh21 Stop using #ifdef arm32, since future NetBSD/arm ports are likely
not to provide it.

For things which are historical oddities of NetBSD/arm26, use #ifndef arm26.
For things which are inherently dependent on the size of program space in use,
use #ifdef PROG32 (and include opt_progmode.h).
 1.1 13-Feb-2001  bjh21 Move sendsig() and sys___sigreturn14() from arm26/arm26/vm_machdep.c and
arm32/arm32/machdep.c into arm/arm/sig_machdep.c, merging and ANSIfying in
the process.

The code is based on the arm32 version, so I don't think anything should break
there.
 1.4.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.4.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.5.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.5.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 10-Mar-2001  bouyer file sig_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.7.6.12 17-Sep-2002  nathanw Catch up to -current.
 1.7.6.11 02-Aug-2002  nathanw LWPify sigexit() call.
 1.7.6.10 01-Aug-2002  nathanw Catch up to -current.
 1.7.6.9 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.7.6.8 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.7.6.7 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.6.6 28-Feb-2002  nathanw Catch up to -current.
 1.7.6.5 08-Jan-2002  nathanw Catch up to -current.
 1.7.6.4 17-Nov-2001  thorpej Adapt to latest MI changes. Update copyright in arm_machdep.c
 1.7.6.3 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.7.6.2 14-Nov-2001  thorpej ARM-specific mcontext support. From Klaus Klein <kleink@netbsd.org>.
 1.7.6.1 07-Aug-2001  thorpej file sig_machdep.c was added on branch nathanw_sa on 2001-11-14 20:53:08 +0000
 1.11.2.1 16-Jul-2002  gehenna catch up with -current.
 1.18.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.23.12.4 03-Sep-2007  yamt sync with head.
 1.23.12.3 26-Feb-2007  yamt sync with head.
 1.23.12.2 30-Dec-2006  yamt sync with head.
 1.23.12.1 21-Jun-2006  yamt sync with head.
 1.25.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.25.10.1 11-May-2006  elad sync with head
 1.25.8.2 11-Aug-2006  yamt sync with head
 1.25.8.1 24-May-2006  yamt sync with head.
 1.25.6.1 01-Jun-2006  kardel Sync with head.
 1.25.4.1 09-Sep-2006  rpaulo sync with head
 1.27.6.1 10-Dec-2006  yamt sync with head.
 1.27.4.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.27.4.1 18-Nov-2006  ad Sync with head.
 1.29.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.29.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.32.10.1 03-Oct-2007  garbled Sync with HEAD
 1.32.4.1 11-Jul-2007  mjf Sync with head.
 1.32.2.1 15-Jul-2007  ad Sync with head.
 1.33.12.1 06-Nov-2007  matt sync with HEAD
 1.33.10.1 01-Jan-2008  chris Sync with HEAD.
 1.34.18.1 18-May-2008  yamt sync with head.
 1.34.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.34.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.35.16.2 15-Feb-2014  matt Use STACKALIGNBYTES
 1.35.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.35.10.2 28-Apr-2009  skrll Sync with HEAD.
 1.35.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.35.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.35.4.3 15-Oct-2008  wrstuden Remove some now-unneeded includes. Matches previous changes to i386 code.
 1.35.4.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.35.4.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.35.2.2 11-Mar-2010  yamt sync with head
 1.35.2.1 04-May-2009  yamt sync with head.
 1.36.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.38.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.38.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.38.4.1 05-Mar-2011  rmind sync with head
 1.40.6.2 02-Jun-2012  mrg sync to latest -current.
 1.40.6.1 18-Feb-2012  mrg merge to -current.
 1.40.2.5 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.40.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.40.2.3 30-Oct-2012  yamt sync with head
 1.40.2.2 23-May-2012  yamt sync with head.
 1.40.2.1 17-Apr-2012  yamt sync with head
 1.41.2.1 21-May-2012  riz branches: 1.41.2.1.2;
Pull up following revision(s) (requested by martin in ticket #274):
sys/arch/amd64/amd64/process_machdep.c: revision 1.20
sys/kern/sys_lwp.c: revision 1.54
sys/arch/sparc64/sparc64/machdep.c: revision 1.267
sys/arch/mips/mips/cpu_subr.c: revision 1.16
sys/arch/vax/vax/machdep.c: revision 1.188
sys/sys/lwp.h: revision 1.161
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
sys/arch/alpha/alpha/machdep.c: revision 1.339
sys/compat/sys/ucontext.h: revision 1.6
sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
distrib/sets/lists/tests/mi: revision 1.469
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
tests/lib/libc/sys/t_lwp_create.c: revision 1.1
tests/lib/libc/sys/Makefile: revision 1.23
sys/arch/arm/arm/sig_machdep.c: revision 1.42
sys/arch/amd64/include/mcontext.h: revision 1.15
sys/arch/amd64/amd64/machdep.c: revision 1.183
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
sys/arch/i386/i386/machdep.c: revision 1.727
sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
sys/arch/sparc/sparc/machdep.c: revision 1.319
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
sys/sys/ucontext.h: revision 1.16
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.
 1.41.2.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.43.2.4 03-Dec-2017  jdolecek update from HEAD
 1.43.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.2.2 23-Jun-2013  tls resync from head
 1.43.2.1 25-Feb-2013  tls resync with head
 1.46.6.1 28-Aug-2013  rmind sync with head
 1.47.10.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.47.6.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.47.4.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.48.2.1 06-Apr-2015  skrll Sync with HEAD
 1.49.10.1 27-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1173):
sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/riscv/riscv/sig_machdep.c: revision 1.2
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.50.4.1 10-Jun-2019  christos Sync with HEAD
 1.50.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.51.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 26-Mar-2004  drochner fix references to the syscall formerly known as SYS___sigreturn14
 1.6 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.5 11-Sep-2003  martin Backout previous, now that <sys/syscall.h> is fixed it's SYS___sigreturn14
again (until we convert to siginfo).
 1.4 11-Sep-2003  briggs s/SYS___sigreturn14/SYS_compat_16___sigreturn14/
 1.3 23-Jun-2002  thorpej branches: 1.3.8;
When delivering a signal, arrange to have the handler invoked directly,
using the trampoline only for the return. This saves two instructions
in the trampoline, one of them being a branch.
 1.2 23-Jun-2002  thorpej When delivering a signal, there is no need to push the signal number,
code, context pointer, or handler onto the stack, so don't do so.
 1.1 13-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10; 1.1.18;
Separate out sigcode into its own file, since it's shared by arm26 and arm32.
 1.1.18.1 16-Jul-2002  gehenna catch up with -current.
 1.1.10.4 03-Aug-2002  thorpej Don't need an upcall trampoline; upcalls don't return.
 1.1.10.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.10.2 05-Jul-2002  thorpej When delivering an upcall, arrange to have the kernel return to
the upcall directly, and use the upcall trampoline only to exit
if the upcall returns.
 1.1.10.1 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.1.6.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 13-Jan-2001  bjh21 Separate out sigcode into its own file, since it's shared by arm26 and arm32.
 1.1.2.1 13-Jan-2001  bjh21 file sigcode.S was added on branch thorpej_scsipi on 2001-01-13 00:06:51 +0000
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4 07-Nov-2023  rin smccc: Adjust SMCCC_ARCH_ATTRIBUTE for clang/arm

Conditionally use

(1) __attribute__ ((target("arch=armv7ve")))
(2) __attribute__ ((target("armv7ve")))

for gcc and clang, respectively.

While gcc does not accept (2), clang accepts (1) but silently ignores it :(
 1.3 08-Aug-2021  jmcneill branches: 1.3.6;
fix armv7 build
 1.2 07-Aug-2021  jmcneill arm: SMCCC: Add return values to smccc_call
 1.1 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.3.6.1 14-Dec-2023  martin Pull up following revision(s) (requested by rin in ticket #495):

sys/arch/arm/arm/smccc.c: revision 1.4
sys/arch/arm/arm32/pmap.c: revision 1.441

smccc: Adjust SMCCC_ARCH_ATTRIBUTE for clang/arm
Conditionally use
(1) __attribute__ ((target("arch=armv7ve")))
(2) __attribute__ ((target("armv7ve")))
for gcc and clang, respectively.

While gcc does not accept (2), clang accepts (1) but silently ignores it :(

arm: pmap: Fix clang build without DIAGNOSTIC
 1.2 07-Aug-2021  jmcneill arm: SMCCC: Add return values to smccc_call
 1.1 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.1 11-Aug-2007  chris branches: 1.1.2;
file soft_irqhandler.c was initially added on branch chris-arm-intr-rework.
 1.1.2.4 01-Jan-2008  chris Make branch build again following sync to head.
 1.1.2.3 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.1.2.2 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.1.2.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.5 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.4 19-Feb-2007  matt branches: 1.4.18; 1.4.20; 1.4.22; 1.4.24; 1.4.30;
Make softintr_names const.
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 29-Jan-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.22;
Move the generic ARM soft interrupt code into a generic place.
 1.1.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 29-Jan-2002  nathanw file softintr.c was added on branch nathanw_sa on 2002-02-28 04:07:19 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 29-Jan-2002  jdolecek file softintr.c was added on branch kqueue on 2002-02-11 20:07:17 +0000
 1.2.16.2 07-Dec-2007  yamt sync with head
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.4.24.2 23-Mar-2008  matt sync with HEAD
 1.4.24.1 28-Jan-2008  matt Add new fast softint switch code (common for all arm).
 1.4.22.1 01-Jan-2008  chris Sync with HEAD.
 1.4.20.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.4.18.1 26-Dec-2007  rjs Sync with HEAD.
 1.69 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.68 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.67 06-Apr-2019  kamil branches: 1.67.12;
Centralized shared part of child_return() into MI part

Add a new function md_child_return() for MD specific bits only.

New child_return() is now part of MI and central code that handles
uniformly tracing code (KTR and ptrace(2)).

Synchronize value passed to ktrsysret() among ports to SYS_fork. This is
a traditional value and accessing p_lflag to check for PL_PPWAIT shall
use locking against proc_lock. Returning SYS_fork vs SYS_vfork still isn't
correct enough as there are more entry points to forking code. Instead of
making it too good, just settle with plain SYS_fork for all ports.
 1.66 03-Apr-2019  kamil Rework the fork(2)/vfork(2) event signalling under ptrace(2)

Remove the constraint of SIGTRAP event being maskable by a tracee.

Now all SIGTRAP TRAP_CHLD events are delivered to debugger.

This code touches MD specific logic and the child_return routine.
It's an intermediate step with a room for refactoring in future and
right now the least invasive approach. This allows to assert expected
behavior in already existing ATF tests and make the code prettier
in future keeping the same semantics. Probably there is a need for a MI
wrapper of child_return for shared functionality between ports.
 1.65 25-May-2018  martin branches: 1.65.2;
PR kern/53261: handle SYS_syscall indirection in MD code - the generic
version would misalign the argument array.
 1.64 24-Jan-2018  skrll branches: 1.64.2;
Remove port-acorn26

OK core@
 1.63 18-Jan-2018  skrll Fix test for SMI_IMB{,range} that was broken in 1.46

From Ramakrishna Rao Desetti
 1.62 02-Jul-2017  skrll Consistency around the user trapframe for all LWPs and there's no need to
keep assigning it in kernel entry points.
 1.61 02-Jul-2017  skrll Trailing whitespace
 1.60 13-Aug-2014  matt branches: 1.60.2; 1.60.12;
Add __NO_FIQ to prevent testing of the PSR FIQ bit
Use VALID_R15_PSR(pc, spsr) instead of testing explicitly
 1.59 29-Jan-2014  matt Add read_insn and read_thumb_insn inlines to hide the endianness of
instructions and use them as appropriate.
 1.58 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.57 26-Jun-2013  matt branches: 1.57.2;
Use sy_invoke
 1.56 16-Aug-2012  matt branches: 1.56.2;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.55 16-Aug-2012  matt Use tf instead of frame as trapframe pointer.
 1.54 01-Aug-2012  matt Make sure copyargs is 64-bit aligned (for EABI)
 1.53 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.52 11-Feb-2012  martin branches: 1.52.4;
Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.
 1.51 20-Dec-2010  matt branches: 1.51.8; 1.51.12;
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.50 21-Nov-2009  rmind branches: 1.50.4;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.49 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.48 15-Jan-2009  bjh21 ILL_ILLTRP seems like the right code for a SWI that's not in the range
assigned for syscalls, so use it.
 1.47 23-Oct-2008  matt branches: 1.47.2; 1.47.10;
fix typo (thx nick)
 1.46 23-Oct-2008  matt Rework syscall.c similar to i386. Saves 3KB
 1.45 21-Oct-2008  ad Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
 1.44 17-Oct-2008  cegger make this compile
 1.43 15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.42 28-Apr-2008  martin branches: 1.42.2; 1.42.6;
Remove clause 3 and 4 from TNF licenses
 1.41 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.40 24-Apr-2008  ad branches: 1.40.2;
- Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
 1.39 06-Feb-2008  dsl branches: 1.39.6; 1.39.8;
Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
 1.38 05-Jan-2008  dsl Don't pass 'curlwp' into trace_enter() and trace_exit().
 1.37 17-Oct-2007  garbled branches: 1.37.2; 1.37.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.36 15-Aug-2007  ad branches: 1.36.2;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.35 18-Feb-2007  matt branches: 1.35.4; 1.35.12; 1.35.16; 1.35.18; 1.35.20; 1.35.22;
Changes for newlock2.
 1.34 19-Jul-2006  ad branches: 1.34.10;
- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.33 07-Mar-2006  thorpej branches: 1.33.2;
Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.32 07-Mar-2006  thorpej Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
 1.31 05-Mar-2006  christos Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
 1.30 05-Mar-2006  christos branches: 1.30.2;
implement PT_SYSCALL
 1.29 11-Dec-2005  christos branches: 1.29.4; 1.29.6;
merge ktrace-lwp.
 1.28 10-Jul-2005  christos No point in declaring syscall_intern and syscall in a zillion places.
 1.27 01-Jul-2005  christos branches: 1.27.2;
PR/29607: Christian Biere systrace doesn't handle interrupted syscalls properly
Instead of jumping to the default "bad" case, jump to the error handling
switch, so that we can deal with ERESTART/EJUSTRETURN properly.
 1.26 24-Oct-2004  skrll Fix the argument to KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK.
 1.25 21-Aug-2004  rearnsha Handle SWI's from Thumb code.

Note: this may need further work. For the momement we unconditionally
convert a Thumb SWI insn into an ARM SWI with the operation code
zero-extended to 24 bits. However, this should really be a property
of the emulation (how do we know that all emulated systems would want
to work this way?), but that would mean pushing all the handling down
into each of the emulators.
 1.24 14-Nov-2003  scw Check alignment of the fault PC before de-referencing it.
Give the process a Illegal Instruction fault if the PC is misaligned.
 1.23 31-Oct-2003  simonb Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
 1.22 29-Oct-2003  mycroft The uninitialized variable in this case was a bug, which could probably be
used to crash the system.
 1.21 26-Oct-2003  chris Fix up some unitialised variables.
 1.20 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.19 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.18 29-Jun-2003  fvdl branches: 1.18.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.17 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.16 01-Mar-2003  thorpej Do the syscall_plain/syscall_fancy dance on ARM. Shaves a fair number
of cycles off the syscall overhead.

Since all COMPAT_LINUX platforms now support __HAVE_SYSCALL_INTERN,
garbage-collect the LINUX_SYSCALL_FUNCTION stuff.
 1.15 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 21-Dec-2002  manu Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
 1.13 16-Nov-2002  uebayasi Fix compilation errors introduced by recent trace_enter()/ktrsyscall() changes.

Provided by FUKAUMI Naoki <naoki at fukaumi dot org> in kern/19070.
 1.12 05-Oct-2002  bjh21 Correct some gratuitously-wrong indentation.
 1.11 05-Oct-2002  bjh21 Minimal changes to allow a kernel with "options MULTIPROCESSOR" to compile
and boot multi-user on a single-processor machine. Many of these changes
are wildly inappropriate for actual multi-processor operation, and correcting
this will be my next task.
 1.10 17-Jun-2002  christos MD systrace gluons.
 1.9 24-Mar-2002  bjh21 branches: 1.9.2; 1.9.4;
arm26->acorn26 transition.
 1.8 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.7 09-Mar-2002  bjh21 Move arm700bugcount into stuct cpu_info, and attach it in
identify_master_cpu().
 1.6 20-Jan-2002  thorpej branches: 1.6.2; 1.6.4;
XXX Local prototype for syscall().
 1.5 17-Jan-2002  bjh21 Separate out syscall() out into three parts:
swi_handler() does stuff that all SWIs will need, then calls
curproc->p_emul->e_syscall.
syscall() handles native NetBSD system calls.
linux_syscall() handles Linux system calls.
 1.4 14-Jan-2002  bjh21 Crude first cut at ARMLinux binary compatibility. Successfully runs
"/emul/linux/bin/echo hello, world", dynamically linked.
 1.3 13-Jan-2002  bjh21 Use symbolic names for SWI number blocks (from <arm/swi.h>).
 1.2 13-Jan-2002  bjh21 Make this actually compile on acorn32.
 1.1 12-Jan-2002  bjh21 Combined syscall handler for all ARM ports. This is basically the arm32
version, made readable and compatible with arm26. In addition, this adds
support for NetBSD/arm's newly allocated SWI range.
 1.6.4.9 29-Dec-2002  thorpej Sync with HEAD.
 1.6.4.8 11-Dec-2002  thorpej Sync with HEAD.
 1.6.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.6.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.6.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.6.4.4 11-Apr-2002  thorpej Make these compile again.
 1.6.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.4.1 20-Jan-2002  nathanw file syscall.c was added on branch nathanw_sa on 2002-02-28 04:07:19 +0000
 1.6.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.1 20-Jan-2002  jdolecek file syscall.c was added on branch kqueue on 2002-02-11 20:07:17 +0000
 1.9.4.1 15-Mar-2004  jmc Pullup revs 1.21-1.22 (requested by skrll in ticket #1552)
Fix up some unitialised variables to avoid a possible crash.
 1.9.2.1 14-Jul-2002  gehenna catch up with -current.
 1.18.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.6 02-Nov-2004  skrll Sync with HEAD.
 1.18.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.3 25-Aug-2004  skrll Sync with HEAD.
 1.18.2.2 03-Aug-2004  skrll Sync with HEAD
 1.18.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.27.2.6 11-Feb-2008  yamt sync with head.
 1.27.2.5 21-Jan-2008  yamt sync with head
 1.27.2.4 03-Sep-2007  yamt sync with head.
 1.27.2.3 26-Feb-2007  yamt sync with head.
 1.27.2.2 30-Dec-2006  yamt sync with head.
 1.27.2.1 21-Jun-2006  yamt sync with head.
 1.29.6.1 22-Apr-2006  simonb Sync with head.
 1.29.4.1 09-Sep-2006  rpaulo sync with head
 1.30.2.3 11-Aug-2006  yamt sync with head
 1.30.2.2 13-Mar-2006  yamt sync with head.
 1.30.2.1 05-Mar-2006  yamt file syscall.c was added on branch yamt-pdpolicy on 2006-03-13 09:06:52 +0000
 1.33.2.2 07-Mar-2006  thorpej Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.33.2.1 07-Mar-2006  thorpej file syscall.c was added on branch elad-kernelauth on 2006-03-07 07:21:51 +0000
 1.34.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.35.22.4 09-Feb-2008  chris Sync to HEAD.
 1.35.22.3 20-Jan-2008  chris Sync to HEAD.
 1.35.22.2 01-Jan-2008  chris Sync with HEAD.
 1.35.22.1 18-Aug-2007  chris Sync with HEAD
 1.35.20.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.35.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.35.18.1 02-Oct-2007  rjs Sync with HEAD.
 1.35.16.1 03-Sep-2007  skrll Sync with HEAD.
 1.35.12.1 03-Oct-2007  garbled Sync with HEAD
 1.35.4.1 20-Aug-2007  ad Sync with HEAD.
 1.36.2.3 23-Mar-2008  matt sync with HEAD
 1.36.2.2 09-Jan-2008  matt sync with HEAD
 1.36.2.1 28-Aug-2007  matt Add thumb support for syscalls > 255. If embedded syscall # is 0, take
syscall number from ip register.
 1.37.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.37.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.39.8.1 18-May-2008  yamt sync with head.
 1.39.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.39.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.40.2.3 11-Mar-2010  yamt sync with head
 1.40.2.2 04-May-2009  yamt sync with head.
 1.40.2.1 16-May-2008  yamt sync with head.
 1.42.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.42.6.1 19-Oct-2008  haad Sync with HEAD.
 1.42.2.1 14-Oct-2008  wrstuden Add a new vp-private flag, SAVP_FLAG_DELIVERING. This flag indicates
that the vp is in the process of delivering a new-thread upcall.
This is a BLOCKED or NEWPROC upcall. Do NOT generate any BLOCKED
upcalls while this is set. Set it at the end of sa_switchcall()
and clear it at syscall entry. Sadly, I have found no other
way to handle this. The old SA interface has no way for
userland to acknowledge that it got the upcall, so use syscall
entry as the indicator that libpthread got it.

This addresses the issue seen on current-users with firefox
dying with a blockedgen != unbockedgen error. The problem is we
deliver a BLOCKED upcall, but between the end of userret()
and when the CPU indicates that it's running in user mode, we take
a page fault. Said page fault blocks, blocking upcall delivery.
The original block, however, was short-lived, and the UNBLOCK
happens shortly. It happens before libpthread actually notices
the BLOCKED upcall. Boom!

Unfortunately a LOCKDEBUG/DIAGNOSTIC kernel still dies before
firefox opens. However this new issue is with uvm code calling
mtsleep when not holding a correct lock; sa_switch() is exploding
at KASSERT(lwp_locked(l, NULL)); before it's done _anything_.

Also, while here, add sa_system_disabled. This is an integer
that we examine when starting SA for a proc. If it's non-zero,
we error out. Once this is hooked into sysctl, you'll be able to
disable SA w/o recompiling.
 1.47.10.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.47.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.50.4.1 05-Mar-2011  rmind sync with head
 1.51.12.2 24-Feb-2012  mrg sync to -current.
 1.51.12.1 18-Feb-2012  mrg merge to -current.
 1.51.8.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.51.8.2 30-Oct-2012  yamt sync with head
 1.51.8.1 17-Apr-2012  yamt sync with head
 1.52.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.56.2.2 03-Dec-2017  jdolecek update from HEAD
 1.56.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.57.2.2 18-May-2014  rmind sync with head
 1.57.2.1 28-Aug-2013  rmind sync with head
 1.60.12.1 05-Jun-2018  bouyer Pull up following revision(s) (requested by martin in ticket #859):
sys/arch/arm/arm/syscall.c: revision 1.65
PR kern/53261: handle SYS_syscall indirection in MD code - the generic
version would misalign the argument array.
 1.60.2.1 28-Aug-2017  skrll Sync with HEAD
 1.64.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.65.2.1 10-Jun-2019  christos Sync with HEAD
 1.67.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.75 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.74 08-Jan-2022  skrll KNF
 1.73 08-Jan-2022  skrll Make VERBOSE_ARM32 compile again and reduce #ifdefs while I'm here
 1.72 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.71 30-Oct-2021  skrll Remove stale comment
 1.70 30-Oct-2021  skrll KNF and remove (some) unnecessary #includes
 1.69 30-Oct-2021  skrll Use designated initialisers for static handlers and reduce the kernel size
a little.
 1.68 26-Oct-2021  skrll G/C FAST_FPE
 1.67 21-Sep-2020  skrll Allow an undefined instruction to use lr (r14) as Rt. New gcc emits this
with TPIDRURO read.

Not sure why the exception handler cares if sp or pc are used as Rt
 1.66 01-Oct-2019  chs in many device attach paths, allocate memory with KM_SLEEP instead of KM_NOSLEEP
and remove code to handle failures that can no longer happen.
 1.65 06-Apr-2019  thorpej branches: 1.65.4;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.64 17-Mar-2019  skrll Fixup a comment
 1.63 16-Mar-2019  skrll Style and whitespace. NFC.
 1.62 28-May-2018  chs branches: 1.62.2;
merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
- dtrace FBT probes can now be placed in kernel modules.
- ZFS now supports mmap().
 1.61 24-Jan-2018  skrll branches: 1.61.2;
Remove port-acorn26

OK core@
 1.60 02-Jul-2017  skrll Consistency around the user trapframe for all LWPs and there's no need to
keep assigning it in kernel entry points.
 1.59 06-May-2017  skrll KNF
 1.58 27-Feb-2017  chs branches: 1.58.4;
apply changes equivalent to freebsd r256822, r267759 and r298171:
fix the dtrace "args" variable to return correct values.
simplify the invop handlers a bit by changing the second argument
from a pointer into the stack to a pointer to the trapframe.
 1.57 20-Feb-2017  skrll Trailing whitespace
 1.56 15-Apr-2015  matt branches: 1.56.2; 1.56.4;
Remove FAST_FPE code
 1.55 14-Oct-2014  skrll branches: 1.55.2;
Use KM_NOSLEEP in install_coproc_handler.
 1.54 28-Mar-2014  matt branches: 1.54.4;
Move undefined evcnt's to cpu_info.
 1.53 15-Mar-2014  ozaki-r Add a trap handler for DTrace FBT provider
 1.52 05-Mar-2014  matt frame -> tf
printf out the insn, faulting pc, lr, sp when we get an undefined insn
int the kernel.
 1.51 29-Jan-2014  matt Add read_insn and read_thumb_insn inlines to hide the endianness of
instructions and use them as appropriate.
 1.50 18-Aug-2013  matt Properly recognize Thumb2 instructions.
(a thumb2 FP programs correctly runs now).
 1.49 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.48 12-Nov-2012  skrll branches: 1.48.2;
C99 types
 1.47 16-Aug-2012  matt branches: 1.47.2;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.46 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.45 11-Aug-2012  matt Make sure to advance the PC after emulating an instruction.
 1.44 12-Jul-2012  matt Add event counters for undefined instruction and cp15 instruction emulation.
 1.43 16-Nov-2011  he branches: 1.43.8;
Semicolons are not optional :)
 1.42 15-Nov-2011  matt Make sure to advance past the instruction we just emulated.
 1.41 07-Apr-2011  matt branches: 1.41.4;
Add a cp15 trapper to emulate the mrc/mcr instructions for the thread id
registers.
 1.40 20-Dec-2010  matt branches: 1.40.2;
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.39 27-Nov-2009  rmind branches: 1.39.4;
- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.38 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.37 15-Mar-2009  cegger ansify function definitions
 1.36 17-Dec-2008  cegger branches: 1.36.2;
kill MALLOC and FREE macros.
 1.35 19-Nov-2008  matt Add some KASSERTS and tests for I32_bit to include F32_bit
 1.34 21-May-2008  ad branches: 1.34.4; 1.34.6; 1.34.12;
Remove unneeded playing about with kernel_lock.
 1.33 27-Apr-2008  matt branches: 1.33.2;
Merge kernel changes in matt-armv6 to HEAD.
 1.32 05-Nov-2007  ad branches: 1.32.16; 1.32.18; 1.32.20;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.31 17-Oct-2007  garbled 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.30 02-Oct-2007  ad branches: 1.30.2;
Make want_resched a member of cpu_info.
 1.29 18-Feb-2007  matt branches: 1.29.4; 1.29.12; 1.29.18; 1.29.20; 1.29.22; 1.29.24; 1.29.26;
Changes for newlock2.
 1.28 09-Feb-2007  ad branches: 1.28.2;
Merge newlock2 to head.
 1.27 19-Jul-2006  ad branches: 1.27.4;
- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.26 10-Nov-2005  scw branches: 1.26.6; 1.26.10;
Give THUMB_CODE its own 'struct undefined_handler' so we don't try to
install the same handler structure twice (for difference coprocs).

Spotted by dbj@ using QUEUEDEBUG.
 1.25 24-Oct-2004  skrll branches: 1.25.12;
Fix the argument to KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK.
 1.24 21-Aug-2004  rearnsha Convert the coprocessor defines into an enum to avoid excessive
preprocessor hackery. If supporting Thumb add an 18th undefined
handler for undefined instruction traps taken in Thumb state. Kill
MAX_COPROCS and use NUM_UNKNOWN_HANDLERS instead.

Add support for breakpoints set in Thumb code and hand them off to
GDB as required.
 1.23 07-Aug-2004  rearnsha Don't overload the unknown instruction handling for the core onto CP0.
Instead, add a seventeenth 'co-processor' specifically for the core.
Add support for ARMv5 unknown instructions in the 'NV' space.
 1.22 29-Nov-2003  bjh21 Use kdb_trap() rather than Debugger() to deal with unhandled undefined
instructions in the kernel, so that DDB gets a useful trapframe. Also
panic if this happens when DDB's not around.
 1.21 14-Nov-2003  scw Check alignment of the fault PC before de-referencing it.
Give the process a Illegal Instruction fault if the PC is misaligned.
 1.20 31-Oct-2003  cl Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
 1.19 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.18 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.17 28-Apr-2003  briggs branches: 1.17.2;
Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.16 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 02-May-2002  rjs branches: 1.15.6;
Make it compile when VERBOSE_ARM32 is defined.
 1.14 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.13 24-Mar-2002  bjh21 arm26->acorn26 transition.
 1.12 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.11 23-Nov-2001  thorpej Use <arm/undefined.h> instead of <machine/undefined.h>.
 1.10 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.9 18-Oct-2001  bjh21 branches: 1.9.4;
Recognize GDB's default breakpoint instruction (as of GDB 5.0), in addition to
the instruction we used with GDB 4.x. The new instruction has the advantage
of fitting the pattern that ARM recommend using for instructions that need to
stay undefined.
 1.8 17-Mar-2001  bjh21 branches: 1.8.2; 1.8.4;
Create an ARM2-specific undefined-instruction handler which deals with the
undef/SWI bug and handles emulating SWP.

Untested bacuse my ARM2 machine isn't currently set up.
 1.7 13-Mar-2001  bjh21 Change the value of tf_pc in undefined-instruction handlers on arm32. It now
always points to the undefined instruction in question. It's up to the
handler to advance it to the next instruction if it wants execution to
continue there. This is how things have always worked on arm26.
 1.6 13-Mar-2001  bjh21 Separate out the SIGTRAP (gdb breakpoint) generator from undefinedinstruction()
so it's no longer a special case.
 1.5 11-Mar-2001  bjh21 branches: 1.5.2;
Change undefined instruction handler to use a linked list for each
co-processor. This is necessary so we can have several handlers for
CP0 (used as a catch-all for non-CP instructions).

Handlers are now removed using remove_coproc_handler(), rather than by calling
install_coproc_handler() with a NULL handler.

Because install_coproc_handler() can now allocate memory, there's a version
for use at boot time that doesn't.
 1.4 08-Mar-2001  bjh21 Use the same undefined-instuction handler on both arm26 and arm32. The handler
is derived mostly from the arm32 version, but with a check for an obscure ARM2
bug thrown in.

arm26 fpu and cpu drivers use the new interface for catching undefined
instructions.
 1.3 05-Mar-2001  bjh21 General prettification (mostly comments).
 1.2 05-Mar-2001  bjh21 ANSIfy.
 1.1 05-Mar-2001  bjh21 Move undefined.c from sys/arch/{arm32/arm32,hpcarm/hpcarm} to sys/arch/arm/arm
in preparation for making it usable on arm26 as well.
 1.5.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.5.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 11-Mar-2001  bouyer file undefined.c was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.8.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.8.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.9.4.12 07-Jan-2003  thorpej In the SA universe, the switch-to-this-LWP decision is made at a
different level than where preempt() calls are made, which renders
the "newlwp" argument useless. Replace it with a "more work to do"
boolean argument. Returning to userspace preempt() calls pass 0.
"Voluntary" preemptions in e.g. uiomove() pass 1. This will be used
to indicate to the SA subsystem that the LWP is not yet finished in
the kernel.

Collapse the SA vs. non-SA cases of preempt() together, making the
conditional code block much smaller, and don't call sa_preempt() if
more work is to come.

NOTE: THIS IS NOT A COMPLETE FIX TO THE preempt()-in-uiomove() PROBLEM
THAT CURRENTLY EXISTS FOR SA PROCESSES.
 1.9.4.11 26-Sep-2002  nathanw Change "if (l->l_flag & L_SA_UPCALL)" to "while (l->l_flag & L_SA_UPCALL)"
in userret() functions or equivalent, to permit delivery of multiple upcalls
in a single kernel entry.

XXX It's getting crowded in here. Collapsing posting signals, upcalls, and
XXX kernel-exit handling into one mechanism would be nice.
 1.9.4.10 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.9.4.9 03-Jul-2002  nathanw Do p->p_userret handling rather than the old P_WEXIT check in the
FAST_FPE case of undefinedinstruction().
 1.9.4.8 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.9.4.7 20-Jun-2002  nathanw Catch up to -current.
 1.9.4.6 17-Apr-2002  nathanw Catch up to -current.
 1.9.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.9.4.3 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.9.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.9.4.1 18-Oct-2001  thorpej file undefined.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.15.6.1 19-Oct-2002  bjh21 Lock the kernel when handling page faults and undefined instructions.
 1.17.2.7 11-Dec-2005  christos Sync with head.
 1.17.2.6 02-Nov-2004  skrll Sync with HEAD.
 1.17.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.3 25-Aug-2004  skrll Sync with HEAD.
 1.17.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.12.5 15-Nov-2007  yamt sync with head.
 1.25.12.4 27-Oct-2007  yamt sync with head.
 1.25.12.3 26-Feb-2007  yamt sync with head.
 1.25.12.2 30-Dec-2006  yamt sync with head.
 1.25.12.1 21-Jun-2006  yamt sync with head.
 1.26.10.1 11-Aug-2006  yamt sync with head
 1.26.6.1 09-Sep-2006  rpaulo sync with head
 1.27.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.28.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.29.26.1 06-Oct-2007  yamt sync with head.
 1.29.24.2 06-Nov-2007  matt sync with HEAD
 1.29.24.1 28-Aug-2007  matt Deal with new world order.
 1.29.22.1 01-Jan-2008  chris Sync with HEAD.
 1.29.20.2 06-Nov-2007  joerg Sync with HEAD.
 1.29.20.1 02-Oct-2007  joerg Sync with HEAD.
 1.29.18.2 26-Dec-2007  rjs Sync with HEAD.
 1.29.18.1 01-Nov-2007  rjs Sync with HEAD.
 1.29.12.1 03-Oct-2007  garbled Sync with HEAD
 1.29.4.2 03-Dec-2007  ad Sync with HEAD.
 1.29.4.1 09-Oct-2007  ad Sync with head.
 1.30.2.1 13-Nov-2007  bouyer Sync with HEAD
 1.32.20.3 11-Mar-2010  yamt sync with head
 1.32.20.2 04-May-2009  yamt sync with head.
 1.32.20.1 16-May-2008  yamt sync with head.
 1.32.18.2 04-Jun-2008  yamt sync with head
 1.32.18.1 18-May-2008  yamt sync with head.
 1.32.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.32.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.34.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.34.6.2 28-Apr-2009  skrll Sync with HEAD.
 1.34.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.34.4.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.36.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.39.4.2 21-Apr-2011  rmind sync with head
 1.39.4.1 05-Mar-2011  rmind sync with head
 1.40.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.41.4.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.41.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.41.4.2 30-Oct-2012  yamt sync with head
 1.41.4.1 17-Apr-2012  yamt sync with head
 1.43.8.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.47.2.3 03-Dec-2017  jdolecek update from HEAD
 1.47.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.47.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.48.2.2 18-May-2014  rmind sync with head
 1.48.2.1 28-Aug-2013  rmind sync with head
 1.54.4.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.55.2.2 28-Aug-2017  skrll Sync with HEAD
 1.55.2.1 06-Jun-2015  skrll Sync with HEAD
 1.56.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.56.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.58.4.1 11-May-2017  pgoyette Sync with HEAD
 1.61.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.62.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.62.2.1 10-Jun-2019  christos Sync with HEAD
 1.65.4.1 22-Sep-2020  martin Pull up following revision(s) (requested by skrll in ticket #1092):

sys/arch/arm/arm/undefined.c: revision 1.67

Allow an undefined instruction to use lr (r14) as Rt. New gcc emits this
with TPIDRURO read.

Not sure why the exception handler cares if sp or pc are used as Rt
 1.11 20-Oct-2022  skrll Trailing whitespace.
 1.10 06-Sep-2013  skrll Fix INTEGRATOR build.
 1.9 06-Sep-2013  skrll Improve the #ifdefs

"it's not worse." from matt@
 1.8 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.7 12-Jun-2013  matt branches: 1.7.2;
Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.6 12-Jun-2013  matt Deal with __ARM_FIQ_INDIRECT
 1.5 12-Jun-2013  matt If we are using the VBAR to access the system vectors, we can just branch
to the exception routines avoiding a load. VBAR only exists for those
processors which implement the Security extension.
 1.4 17-Aug-2002  thorpej branches: 1.4.134; 1.4.150; 1.4.160;
More local label fixups.
 1.3 03-Apr-2002  thorpej branches: 1.3.2;
Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.2 05-Feb-2002  thorpej Allow platforms to use an extra level of indirection for FIQs,
enabled by definining __ARM_FIQ_INDIRECT in <machine/types.h>.
This is needed for OpenFirmware systems (like the Shark), where
the OFW vector page is used, and kernel entries merely patched
into it.
 1.1 20-Dec-2001  thorpej branches: 1.1.2; 1.1.4;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 20-Dec-2001  thorpej file vectors.S was added on branch kqueue on 2002-01-10 19:37:47 +0000
 1.1.2.5 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.4 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 20-Dec-2001  nathanw file vectors.S was added on branch nathanw_sa on 2002-01-08 00:23:07 +0000
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.4.160.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.160.1 23-Jun-2013  tls resync from head
 1.4.150.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.4.134.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.7.2.2 18-May-2014  rmind sync with head
 1.7.2.1 28-Aug-2013  rmind sync with head
 1.12 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.11 30-Aug-2006  matt branches: 1.11.58; 1.11.62; 1.11.68; 1.11.70; 1.11.76;
Conditionalize cpu_coredump on COREDUMP
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 10-Jun-2005  matt branches: 1.9.2;
Rework the coredump code to have no explicit knownledge of how coredump
i/o is done. Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o. This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
 1.8 17-Sep-2004  skrll There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
 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 *

ixp425_com:
add some status flags
 1.5 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 27-Feb-2001  reinoud branches: 1.4.4; 1.4.10;
Rollback of patch ... there was a bug in the proc.h
 1.3 27-Feb-2001  bjh21 KNF
 1.2 27-Feb-2001  reinoud Due to changes in ../sys/proc.h ``cpu_wait(p)'' is now a function due to the
prototype defined it in ... added it to arm/vm_machdep.c since all ARM machines
are still single processor anyway
 1.1 13-Feb-2001  bjh21 Move cpu_coredump() from arm32/arm32/vm_machdep.c to arm/arm/vm_machdep_arm.c.
Also ANSIfy it and use it on arm26.
 1.4.10.1 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.4.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.4.4.1 27-Feb-2001  bouyer file vm_machdep_arm.c was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.7.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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 02-Jul-2003  wrstuden Check in lwp-ification changes needed to get the evbarm/IQ80321 kernel
to compile.

only question I have is over the:
l->l_proc->p_stats->p_ru.ru_msgsnd++;
command at line 245 of dev/kttcp.c. Should we be doing per-lwp or
per-proc accounting?
 1.9.2.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.76.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.11.70.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.68.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.11.62.1 04-May-2009  yamt sync with head.
 1.11.58.1 17-Jan-2009  mjf Sync with HEAD.
 1.1 28-Aug-2010  uebayasi branches: 1.1.2;
file xmd_machdep.c was initially added on branch uebayasi-xip.
 1.1.2.2 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.1.2.1 28-Aug-2010  uebayasi xmd(4) glue for arm.
 1.1 10-Nov-2007  matt branches: 1.1.2;
file arm1136_pmc.c was initially added on branch matt-nb4-arm.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.8 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.7 20-Jun-2020  skrll Trailing whitespace
 1.6 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.5 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.4 01-Dec-2013  joerg branches: 1.4.28; 1.4.30;
Mark unused inline functions as such.
 1.3 03-Jul-2008  matt branches: 1.3.14; 1.3.30; 1.3.40; 1.3.46;
Fix a typo in the delay loop time delta calculation.

From Irme Desk <imre.deak@teleca.com>.
 1.2 27-Apr-2008  matt branches: 1.2.2; 1.2.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 25-Sep-2007  matt branches: 1.1.2; 1.1.18; 1.1.20; 1.1.22;
file arm11_pmc.c was initially added on branch matt-armv6.
 1.1.22.2 04-May-2009  yamt sync with head.
 1.1.22.1 16-May-2008  yamt sync with head.
 1.1.20.1 18-May-2008  yamt sync with head.
 1.1.18.2 28-Sep-2008  mjf Sync with HEAD.
 1.1.18.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 29-Oct-2007  matt Fix typo.
 1.1.2.1 25-Sep-2007  matt Add PMC counter (really cycle counter) support for ARM11.
 1.2.4.1 03-Jul-2008  simonb Sync with head.
 1.2.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.46.1 18-May-2014  rmind sync with head
 1.3.40.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.30.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.14.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.30.1 10-Jun-2019  christos Sync with HEAD
 1.4.28.1 28-Jul-2018  pgoyette Sync with HEAD
 1.45 22-Dec-2022  ryo Explicitly disable overflow interrupts before enabling the cycle counter.
 1.44 31-Oct-2021  skrll branches: 1.44.4;
Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.43 03-Jun-2021  skrll Mirror changes to passing pages to UVM into aarch64_machdep.c

Two fixes for loading free pages into UVM

- Only consider a boot_physmem (inner loop) range that has its end
(bp_end) after the bootconfig.dram (outer loop) range start (start).
This was harmless as a later condition correctly checks there is only
something to do if start < bp_end.

- Stop processing boot_physmem ranges if all the bootconfig.dram range has
been passed to UVM. This fixes a boot problem for simon@

Copy a comment over and do the VPRINTF before the uvm_page_physload in
the same way as aarch64_machdep.c as well.
 1.42 01-Jun-2021  skrll branches: 1.42.2;
G/C
 1.41 01-Dec-2020  rin branches: 1.41.4;
Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.40 11-Sep-2020  skrll branches: 1.40.2;
Wrap a long comment
 1.39 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.38 06-Jun-2020  skrll KNF
 1.37 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.36 08-Jan-2020  jmcneill cpu_hatch is too late to report AP topology, do it at attach time instead
 1.35 20-Dec-2019  ad branches: 1.35.2;
Some more CPU topology stuff:

- Use cegger@'s ACPI SRAT parsing code to figure out NUMA node ID for each
CPU as it is attached.

- For scheduler experiments with SMT, flag CPUs with the lowest numbered SMT
IDs as "primaries", link back to the primaries from secondaries, and build
a circular list of CPUs in each package with identical SMT IDs.

- No need for package/core/smt/numa IDs to be anything other than a u_int.
 1.34 02-Dec-2019  ad Take the basic CPU topology information we already collect, and use it
to make circular lists of CPU siblings in the same core, and in the
same package. Nothing fancy, just enough to have a bit of fun in the
scheduler trying out different tactics.
 1.33 16-Mar-2019  skrll branches: 1.33.4;
Flush the BP cache just before starting APs so that cache coherency starts
with a correct view.
 1.32 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.31 25-Jan-2019  skrll Make sure ci_{smt,core,package}_id are all filled in appropriately.

Previously the BP was missed and __SHIFTOUT wasn't used.
 1.30 03-Jan-2019  skrll Simplify
 1.29 03-Jan-2019  jmcneill Read mpidr and cpuid from the secondary processor itself instead of the
boot processor. While here, add Cortex-A15 r4p0 to supported list.
 1.28 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.27 31-Oct-2018  skrll Tidyup VERBOSE_INIT_ARM output
 1.26 28-Oct-2018  skrll Fix a commit
 1.25 18-Oct-2018  skrll Fix VPRINTF
 1.24 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.23 14-Oct-2018  skrll Use __nothing
 1.22 16-Sep-2018  skrll G/C
 1.21 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.20 31-Jul-2018  skrll Define and use VPRINTF
 1.19 02-Jul-2017  skrll branches: 1.19.4; 1.19.6;
Consistency around the user trapframe for all LWPs and there's no need to
keep assigning it in kernel entry points.
 1.18 22-Dec-2016  cherry switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.17 08-Mar-2016  skrll branches: 1.17.2;
#if 0 a KASSERT for now as it doesn't apply to Raspberry Pi 3
 1.16 17-May-2015  matt KASSERT in cpu_hatch that AUXCTL.SMP is set for Cortex CPUs.
 1.15 04-May-2015  matt Deal with 4GB overflow in arm32_kvminit.c
 1.14 04-May-2015  matt Fix 4GB wraparound math.
 1.13 04-May-2015  matt If not using LPAE, if memory ends at 4GB ignore the last page so physical_end
doesn't wrap to 0.
 1.12 12-Jan-2015  jakllsch use IPL_NONE for CPU attach message serialization mutex
 1.11 13-Dec-2014  jmcneill serialize printing of secondary cpu info
 1.10 04-Nov-2014  matt branches: 1.10.2;
Fix the stacks used by the other CPU to not overlap with the boot cpu's stacks.
 1.9 29-Oct-2014  skrll Sprinkle #include "opt_multiprocessor.h"
 1.8 14-Sep-2014  ryo add memory access barrier
 1.7 28-Mar-2014  matt branches: 1.7.4;
Various MP changes.
 1.6 03-Mar-2014  matt Further cpu_info inits in cpu_hatch
 1.5 18-Aug-2013  matt branches: 1.5.2;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.4 12-Jun-2013  matt branches: 1.4.2;
Add printfs around initializing the vector_page.
 1.3 11-May-2013  skrll Include opt_{ddb,kgdb} and fix KGDB build
 1.2 17-Oct-2012  matt branches: 1.2.2; 1.2.4;
Change the semantics of the boot_physmem array to select a freelist to use
with uvm_page_physload. Reduces duplication of work.
 1.1 31-Aug-2012  matt branches: 1.1.2;
Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.1.2.4 03-Dec-2017  jdolecek update from HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.4.1 17-Oct-2012  matt file arm32_boot.c was added on branch matt-nb6-plus on 2012-11-28 22:40:16 +0000
 1.2.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.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 17-Oct-2012  yamt file arm32_boot.c was added on branch yamt-pagecache on 2012-10-30 17:18:56 +0000
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 28-Aug-2013  rmind sync with head
 1.5.2.3 24-Mar-2014  matt Need to deal with proc0paddr.
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 18-Aug-2013  matt file arm32_boot.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.7.4.3 12-Jan-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #412):
sys/arch/arm/arm32/arm32_boot.c: revision 1.12
use IPL_NONE for CPU attach message serialization mutex
 1.7.4.2 13-Dec-2014  martin Pull up following revision(s) (requested by jmcneill in ticket #319):
sys/arch/arm/arm32/arm32_boot.c: revision 1.11
serialize printing of secondary cpu info
 1.7.4.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.10.2.5 28-Aug-2017  skrll Sync with HEAD
 1.10.2.4 05-Feb-2017  skrll Sync with HEAD
 1.10.2.3 19-Mar-2016  skrll Sync with HEAD
 1.10.2.2 06-Jun-2015  skrll Sync with HEAD
 1.10.2.1 06-Apr-2015  skrll Sync with HEAD
 1.17.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.19.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.6.1 10-Jun-2019  christos Sync with HEAD
 1.19.4.6 26-Jan-2019  pgoyette Sync with HEAD
 1.19.4.5 18-Jan-2019  pgoyette Synch with HEAD
 1.19.4.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.19.4.3 20-Oct-2018  pgoyette Sync with head
 1.19.4.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.19.4.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.33.4.1 05-Jun-2021  martin Pull up following revision(s) (requested by skrll in ticket #1279):

sys/arch/arm/arm32/arm32_boot.c: revision 1.42
sys/arch/arm/arm32/arm32_boot.c: revision 1.43

G/C

-

Mirror the changes around passing pages to UVM in aarch64_machdep.c:

Two fixes for loading free pages into UVM

- Only consider a boot_physmem (inner loop) range that has its end
(bp_end) after the bootconfig.dram (outer loop) range start (start).
This was harmless as a later condition correctly checks there is only
something to do if start < bp_end.

- Stop processing boot_physmem ranges if all the bootconfig.dram range has
been passed to UVM. This fixes a boot problem for simon@

Copy a comment over and do the VPRINTF before the uvm_page_physload in
the same way as aarch64_machdep.c as well.
 1.35.2.2 29-Feb-2020  ad Sync with head.
 1.35.2.1 17-Jan-2020  ad Sync with head.
 1.40.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.41.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.42.2.1 06-Jun-2021  cjep sync with head
 1.44.4.1 23-Dec-2022  martin Pull up following revision(s) (requested by ryo in ticket #20):

sys/arch/arm/arm/cpufunc.c: revision 1.185
sys/dev/tprof/tprof.c: revision 1.22
sys/arch/arm/arm32/arm32_boot.c: revision 1.45
sys/dev/tprof/tprof_armv8.c: revision 1.19
sys/dev/tprof/tprof_armv7.c: revision 1.12
sys/arch/aarch64/aarch64/cpu.c: revision 1.71
sys/arch/aarch64/aarch64/cpu.c: revision 1.72

tprof_lock is not a spin mutex. use mutex_{enter,exit}(). oops

Explicitly disable overflow interrupts before enabling the cycle counter.

PMCR_EL0.LC should be set. ARM deprecates use of PMCR_EL0.LC=0

Even if an overflow interrupt is occured for a counter outside tprof management,
the bit of onverflow status register must be cleared to prevent an interrupt storm.
 1.69 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.68 21-Mar-2021  skrll -DKERNEL_BASE_VOFFSET= has annoyed me for the last time...

Introduce KERNEL_VOFFSET_RUNTIME which prevents the addition of
-DKERNEL_BASE_VOFFSET= to the command line and use it on the
__HAVE_GENERIC_START kernels which do runtime calculation of the
offset.
 1.67 12-Dec-2020  skrll branches: 1.67.2;
Move evbarm/fdt/fdt_memory.[ch] to sys/dev/fdt and simplify the api and
some operations. This allows other architectures to use it.
 1.66 30-Oct-2020  skrll branches: 1.66.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.65 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.64 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.63 03-Jul-2020  skrll Style and share a debug string
 1.62 03-Jul-2020  skrll Use howmany()
 1.61 03-Jul-2020  skrll Whitespace
 1.60 26-Jun-2020  skrll Avoid unbounded stack usage warning
 1.59 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.58 04-Feb-2020  skrll KNF
 1.57 04-Feb-2020  skrll grammar in a comment
 1.56 02-Feb-2020  skrll G/C L1_TABLE_SIZE_REAL
 1.55 08-May-2019  skrll branches: 1.55.4;
Really go back to pre-whitespace change (1.52) arm32_kernel_vm_init
 1.54 23-Apr-2019  skrll Revert the part of the previous Whitespace commit which clearly was
functional.

This will probably come back with other changes and a proper commit
message.
 1.53 17-Mar-2019  skrll Whitespace
 1.52 06-Feb-2019  skrll Make sure the start stacks are covered by the new translation tables.
They *might* get placed after ARM_BOOTSTRAP_LxPT by the linker.

AP startup uses VA sp in cpu_init_secondary_processor
 1.51 06-Feb-2019  skrll Misc style
 1.50 06-Feb-2019  skrll Slight update to comment and KNF it while I'm here
 1.49 04-Feb-2019  skrll Fix typo in VPRINTF
 1.48 13-Nov-2018  skrll On second/third thoughts we can use the pages before the kernel
everywhere.
 1.47 20-Oct-2018  skrll Clean up around cpu_ttb and fix a bunch of builds
 1.46 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.45 14-Oct-2018  skrll Use __nothing
 1.44 03-Aug-2018  skrll Provide and use kern_vtopdiff in KERN_{VTOPHYS,PHYSTOV}. A step towards
generic arm.
 1.43 31-Jul-2018  martin #ifdef VERBOSE_INIT_ARM some format strings only used in that case.
 1.42 31-Jul-2018  skrll Define and use VPRINTF
 1.41 10-Dec-2017  skrll branches: 1.41.2; 1.41.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.40 06-Jul-2017  skrll Now that we can... mark kernel text as non-writable on MMUs that support
it.
 1.39 01-Jul-2017  skrll Report an error if compiled with MULTIPROCESSOR support but without
__HAVE_CPU_UAREA_ALLOC_IDLELWP
 1.38 24-Dec-2016  skrll Fix VERBOSE_INIT_ARM build
 1.37 25-Nov-2015  skrll branches: 1.37.2;
In the ARM_MMU_EXTENDED case make sure the kernel mappings are marked with
XN (eXecute Never) appropriately.

The XN logic is inconsistent and could do with changing to XN always set
and cleared for VM_PROT_EXECUTE (or the inverse) everywhere.
 1.36 25-Nov-2015  skrll Trailing whitespace.
 1.35 01-Jun-2015  matt pmap_directbase is a failed experiment, nuke it.
 1.34 30-May-2015  matt Support directmapped systems with >1GB that start memory at 0x80000000.
 1.33 04-May-2015  matt Deal with 2GB of ram or memory ending at or above 4GB.
 1.32 29-Oct-2014  skrll branches: 1.32.2;
Sprinkle #include "opt_multiprocessor.h"
 1.31 24-Oct-2014  skrll Remove unnecessary #include
 1.30 23-May-2014  kiyohara branches: 1.30.2;
Fix build failed with GUMSTIX(pxa2x0). build test only now.
 1.29 13-Apr-2014  matt When figuring out the physical size for direct-mapped systems, round up
to L1_SS_SIZE.
 1.28 11-Apr-2014  matt Add a kernel for the CUBIETRUCK (CUBIEBOARD3). Allow direct mapping of all
memory (but for now allow the memory mapped above KERNEL_BASE to used for
poolpages).
 1.27 05-Apr-2014  matt If using arm32_kvminit, don't bother mapping msgbuf since it's already mapped.
 1.26 01-Apr-2014  skrll branches: 1.26.2;
Remove unnecessary { } around code block. No functional change.
 1.25 28-Mar-2014  matt ARM_MMU_EXTENDED support.
 1.24 05-Mar-2014  matt rearrange some printfs.
when using the extended mmu, make sure to disable ttbr0 until there is an
activated pmap.
 1.23 03-Mar-2014  matt If we are going to map all of physical memory, we don't need to allocate
l2 page tables for the kernel.
 1.22 29-Aug-2013  riz branches: 1.22.2;
Fix typo: VERBOSE_INIT_ARM, not VERBOSE_ARM_INIT. From
Dennis Ferguson in PR#48163.
 1.21 22-Jun-2013  matt branches: 1.21.2;
Fix inverted logic for mapping exception vector.
 1.20 12-Jun-2013  matt Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.19 12-Jun-2013  matt Add support for the VBAR (vector base address register) to remap the vectors
into the kernel text segment. This register is available on arm1176 and
all cortex processors since they all have the arm security (trustzone)
extension. We avoid having to specially map either vector page (0x00000000
or 0xffff0000) and use VBAR to both to page0rel in the text segment. These
vector group differs from the normal page0, that since it's in the kernel,
it can branch directly to the exception routine, instead of loading the
address into the PC. This should result in a tiny improvement in speed since
we eliminate a TLB mapping the vector page and a load on every exception.

XXX Add __HAVE_ARM_TRUSTZONE cpp define and use that to eliminate all code
have to do with manipulating the vector page.
 1.18 27-Feb-2013  matt Actually use zero_p now that we pass it in.
 1.17 27-Feb-2013  matt Add a zero flag to valloc_pages so that we can *not* zero the msgbuf so it
will be preserved across boots.
 1.16 31-Dec-2012  matt Correct one of the kernel_size calculations.
 1.15 10-Dec-2012  matt if __HAVE_MM_MD_DIRECT_MAPPED_PHYS is defined, make sure mapallmem_p is true.
 1.14 24-Oct-2012  skrll branches: 1.14.2; 1.14.4;
Compare pointer against NULL not 0.
 1.13 21-Oct-2012  matt Make sure when mapping all the kernel, start at KERNEL_BASE, not kernel_base.
 1.12 19-Oct-2012  skrll Make sure that start.S and machdep.c don't disagree wrt L1 page table
location during bootstrap.
 1.11 19-Oct-2012  skrll slop wasn't sloppy enough in the kernel_size calculation. Add in the L2
page tables required as well.

Should fix the dockstar boot problem reported by Andy Ruhl on port-arm.

http://mail-index.netbsd.org/port-arm/2012/09/20/msg001471.html
 1.10 19-Oct-2012  skrll Comments.
 1.9 19-Oct-2012  skrll Print the message buffer VAs and number of pages. Other minor cosmetics.
 1.8 17-Oct-2012  skrll Fix two off-by-one loops. Saves a whole two pages.
 1.7 15-Oct-2012  skrll More VERBOSE_INIT_ARM output tweaks.
 1.6 15-Oct-2012  skrll Typo in comment.
 1.5 15-Oct-2012  skrll Print the system vectors in order so I don't get confused.
 1.4 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.3 06-Sep-2012  matt branches: 1.3.2;
Before setting the new TTB wbinv the caches.
 1.2 05-Sep-2012  matt Print TTBR/TTBR1/TTBCR registers
 1.1 31-Aug-2012  matt Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.3.2.5 03-Dec-2017  jdolecek update from HEAD
 1.3.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.3 23-Jun-2013  tls resync from head
 1.3.2.2 25-Feb-2013  tls resync with head
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.14.4.1 24-Oct-2012  matt file arm32_kvminit.c was added on branch matt-nb6-plus on 2012-11-28 22:40:16 +0000
 1.14.2.5 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.14.2.4 23-Jan-2013  yamt sync with head
 1.14.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.14.2.2 30-Oct-2012  yamt sync with head
 1.14.2.1 24-Oct-2012  yamt file arm32_kvminit.c was added on branch yamt-pagecache on 2012-10-30 17:18:56 +0000
 1.21.2.1 18-May-2014  rmind sync with head
 1.22.2.4 13-Aug-2015  matt Make sure the amount of direct mapped memory doesn't cross over into the
mappable KVA range.
 1.22.2.3 24-Mar-2014  matt Make sure kernel starts on a page boundary.
 1.22.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.22.2.1 29-Aug-2013  matt file arm32_kvminit.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.26.2.1 10-Aug-2014  tls Rebase.
 1.30.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.32.2.4 28-Aug-2017  skrll Sync with HEAD
 1.32.2.3 05-Feb-2017  skrll Sync with HEAD
 1.32.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.32.2.1 06-Jun-2015  skrll Sync with HEAD
 1.37.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.41.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.41.4.1 10-Jun-2019  christos Sync with HEAD
 1.41.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.41.2.2 20-Oct-2018  pgoyette Sync with head
 1.41.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.55.4.1 29-Feb-2020  ad Sync with head.
 1.66.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.66.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.67.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.148 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.147 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.146 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.145 19-Jan-2023  mlelstv Support remaining common boot options.
 1.144 28-Jul-2022  riastradh arm32: Refactor splhigh and restore in dosoftints.

No functional change intended. splhigh always returns ci->ci_cpl,
which should not be changing at this point. Makes the bracketing by
splhigh/splx clearer.
 1.143 12-Mar-2022  skrll No need to call arm_fdt_platform twice.
 1.142 13-Nov-2021  jmcneill Support 'boot -1' on arm
 1.141 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.140 21-Oct-2021  skrll Whitespace in a comment
 1.139 01-Dec-2020  rin Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.138 30-Oct-2020  skrll branches: 1.138.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.137 28-Aug-2020  skrll Use C rather than assembly
 1.136 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.135 21-Jun-2020  jmcneill Add support for installing modules that were loaded by the bootloader.
 1.134 20-Jun-2020  skrll KNF
 1.133 18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.132 15-Feb-2020  skrll branches: 1.132.4;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.131 02-Feb-2020  skrll KNF. One #include <sys/atomic.h> is enough
 1.130 27-Dec-2019  msaitoh branches: 1.130.2;
s/sucess/success/ in comment.
 1.129 18-Dec-2019  riastradh New function cpu_startup_hook on arm.

Called at end of cpu_startup. Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup. Defined as a weak alias to a
function that does nothing, so optional.

ok jmcneill
 1.128 10-May-2019  skrll branches: 1.128.2;
Fix a printf
 1.127 04-Feb-2019  skrll Report hatched value after the atomic_or so the VERBOSE_INIT_ARM output
doesn't get mangled.

We start a cpu and wait for it before progressing now.
 1.126 21-Jan-2019  skrll Wrong long lined comment
 1.125 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.124 19-Oct-2018  skrll Fix build for non-generic start kernels
 1.123 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.122 14-Oct-2018  skrll Use __nothing
 1.121 12-Oct-2018  jmcneill Add optional ap_startup callback to struct arm_platform. This allows for
late (post-UVM init) initialization of platform specific stuff.
 1.120 22-Aug-2018  skrll Use banner
 1.119 15-Aug-2018  skrll G/C
 1.118 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.117 05-Aug-2018  skrll Refactor code to split aarch{32,64} kernel page tables and VM setup. This
will help re-build the kernel page tables on aarch64 with correct section
mappings.
 1.116 31-Jul-2018  skrll Define and use VPRINTF
 1.115 31-Oct-2017  martin branches: 1.115.2; 1.115.4;
Allow architectures to define a macro PROC_MACHINE_ARCH(P) and
PROC_MACHINE_ARCH32(P) to override the value for sysctl hw.machine_arch
(native and netbsd32 commpat resp.).

Use these for arm and mips instead of the (not working, noisy, in case
of arm) sysctl override and #ifdef __mips__ in architecture neutral
code.
 1.114 02-Jul-2017  skrll Consistency around the user trapframe for all LWPs and there's no need to
keep assigning it in kernel entry points.
 1.113 02-Jul-2017  skrll Trailing whitespace
 1.112 16-Jul-2016  mrg apply some #if (ARM_MMU_V6 + ARM_MMU_V7) != 0.
now this builds on pre v6-only.
 1.111 15-Jul-2016  skrll Provide a mm_md_page_color and fix some kernel builds
 1.110 30-Apr-2016  ryo branches: 1.110.2;
* fix checking physical address range. on some arm devices, physical memory doesn't start from 0x00000000.
* allow /dev/mem to read/write memory mapped I/O area depending on kauth.
 1.109 11-Apr-2015  bouyer Handle boot option -x (alias 'debug') and set AB_DEBUG in boothowto.
 1.108 19-Nov-2014  martin branches: 1.108.2;
Add a machdep.unaligned_sigbus sysctl (just like alpha does), but on
arm it is readonly (depends on architecture version).
 1.107 29-Oct-2014  skrll Sprinkle #include "opt_multiprocessor.h"
 1.106 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.105 19-May-2014  rmind branches: 1.105.2;
Implement MI IPI interface with cross-call support.
 1.104 11-Apr-2014  matt Add a kernel for the CUBIETRUCK (CUBIEBOARD3). Allow direct mapping of all
memory (but for now allow the memory mapped above KERNEL_BASE to used for
poolpages).
 1.103 05-Apr-2014  matt If using arm32_kvminit, don't bother mapping msgbuf since it's already mapped.
 1.102 28-Mar-2014  matt branches: 1.102.2;
Various MP changes.
 1.101 03-Mar-2014  matt Add most of the cpu_* variables to <arm/locore.h>
Add and initialize cpu_synchprim_present
 1.100 25-Feb-2014  pooka Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
 1.99 11-Jan-2014  matt Add hw.printfataltraps sysctl. Always print fatal traps for init. For all
other processes, only do so if cpu_printfataltraps is true.
 1.98 10-Sep-2013  matt Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.
 1.97 07-Sep-2013  matt Add a machdep.hwdiv_present sysctl (cortex A7 and A15 have hwdiv instructions)
 1.96 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.95 15-Aug-2013  matt Fix tpyo.
 1.94 12-Jun-2013  matt branches: 1.94.2;
Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.93 12-Jun-2013  matt Add support for the VBAR (vector base address register) to remap the vectors
into the kernel text segment. This register is available on arm1176 and
all cortex processors since they all have the arm security (trustzone)
extension. We avoid having to specially map either vector page (0x00000000
or 0xffff0000) and use VBAR to both to page0rel in the text segment. These
vector group differs from the normal page0, that since it's in the kernel,
it can branch directly to the exception routine, instead of loading the
address into the PC. This should result in a tiny improvement in speed since
we eliminate a TLB mapping the vector page and a load on every exception.

XXX Add __HAVE_ARM_TRUSTZONE cpp define and use that to eliminate all code
have to do with manipulating the vector page.
 1.92 03-Feb-2013  matt Add a machdep.cpu_arch sysctl
 1.91 31-Jan-2013  matt Add simple sysctls for cpu_id, fpu_id, neon_present, simd_present,
simdex_present.
Add struct sysctls to return the isar, mmfr, pfr, and mvfr sets.
 1.90 28-Jan-2013  matt Add a machdep.fpu_present sysctl for ld.elf_so to use in ld.so.conf to load
libc_vfp.so.
 1.89 19-Jan-2013  skrll Add -d as a synonym for getting into DDB to match other ports.
 1.88 31-Dec-2012  jmcneill reset todr clock on shutdown
 1.87 10-Dec-2012  matt add mm_md_direct_mapped_phys
 1.86 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.85 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.84 16-Sep-2012  rmind Rename kcpuset_copybits() to kcpuset_export_u32() and thus be more specific
about the interface.
 1.83 31-Aug-2012  matt branches: 1.83.2;
Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.82 16-Aug-2012  matt Move the standard definitions of the {UND,IRQ,FIQ,ABT}_STACK_SIZE to
<arm32/machdep.h>
Move the extern for cpu_reset_address to the same file.
Add cpu_reset_address_paddr.
Kill cpu_reset_v4_MMU_disable.
if cpu_reset_address is NULL, then the MMU will be disabled.
 1.81 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.80 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.79 29-Jul-2012  matt Fix more -fno-common fallout.
Move more variables to common locations.
 1.78 16-Jul-2012  skrll Make the result from SOFTIPLMASK match the comment.

"Wouldn't hurt" from matt@
 1.77 16-Jul-2012  skrll Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"
 1.76 30-Jun-2011  wiz branches: 1.76.2; 1.76.8;
dependant -> dependent
 1.75 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.74 28-Nov-2010  hannken branches: 1.74.6;
As md(4) no longer has "needs-count" there is no "md.h" anymore.
Remove the inclusion of this file.

Acorn32 now always builds load_memory_disc_from_floppy(). This should
not be a problem as all configs have md(4).

Observed by: Masao Uebayashi <uebayasi@netbsd.org>
 1.73 08-Feb-2010  joerg branches: 1.73.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.72 18-Jan-2010  jmmv branches: 1.72.2;
Define an empty module_init_md function so that kernels with 'options
MODULAR' can be built (at least in shark). Still not working due to
some relocations resolving to too far away symbols though.
 1.71 29-Nov-2009  rmind Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork().
 1.70 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.69 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.68 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.67 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.66 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.65 15-Mar-2009  cegger ansify function definitions
 1.64 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.63 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.62 17-Jan-2009  bjh21 branches: 1.62.2;
Remove the implementation of cpu_intr_p() from here now that it's in
arm/arm_machdep.h. Should fix builds on arm32 platforms. Thanks to
Matt Fleming for reporting the problem.
 1.61 16-Jan-2009  bjh21 cpu_info_store, machine, and machine_arch can all be shared by acorn26 and
arm32, so share them.
 1.60 16-Jan-2009  bjh21 acorn26 and arm32 have identical versions of cpu_need_resched(). Unify them.
Similarly, with a small tweak acorn26 can use the same cpu_intr_p() as arm32,
so those can be unified too.
 1.59 19-Nov-2008  matt Fix __HAVE_FAST_SOFTINTS (boolean dyslexia strikes again).
Add some KASSERTS to make sure assumptions are valid.
 1.58 07-Aug-2008  matt branches: 1.58.2; 1.58.8;
Commit missing part of __HAVE_FAST_SOFTINTS support.
 1.57 02-Jul-2008  ad branches: 1.57.2;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.
 1.56 27-Apr-2008  matt branches: 1.56.2; 1.56.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.55 19-Jan-2008  chris branches: 1.55.6; 1.55.8; 1.55.10;
With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.54 19-Jan-2008  chris Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.53 16-Dec-2007  mrg move the arm32 cpu_intr_p() function into arm32_machdep.c
from arm_machdep.c. this lets acorn26 link again.
 1.52 17-Oct-2007  garbled branches: 1.52.2; 1.52.4; 1.52.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.51 02-Oct-2007  ad Make want_resched a member of cpu_info.
 1.50 15-Sep-2007  scw branches: 1.50.2;
ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.49 17-May-2007  yamt branches: 1.49.6; 1.49.8; 1.49.10; 1.49.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.48 04-Mar-2007  christos branches: 1.48.2; 1.48.4; 1.48.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.47 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.46 11-Dec-2005  christos branches: 1.46.26;
merge ktrace-lwp.
 1.45 25-Apr-2005  lukem branches: 1.45.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
 1.44 24-Mar-2004  atatat branches: 1.44.8;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.43 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.42 30-Dec-2003  pk Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
 1.41 13-Dec-2003  rearnsha The machdep.debug sysctl variable uses code CPU_DEBUG
(not CPU_CONSDEV).
 1.40 12-Dec-2003  atatat The machdep.debug node is an int, not a struct
 1.39 04-Dec-2003  atatat Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
 1.38 21-Sep-2003  matt Change some type-punning detected by gcc 3.3.1 to (void *).
 1.37 15-Jul-2003  lukem __KERNEL_RCSID()
 1.36 29-Jun-2003  fvdl branches: 1.36.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.35 29-Jun-2003  ichiro struct proc * -> struct lwp *

ixp425_com:
add some status flags
 1.34 04-Jun-2003  simonb Remove prototype for strtoul() that was in the wrong place.
 1.33 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.32 18-Apr-2003  thorpej Add a comment indicating that the current method of enabling high vectors
requires that the CPU control vector be properly readable. I believe that
all CPUs that have high vector support have a readable CPU control register,
but if we ever encounter one that does not, then we'll have to adjust this
code.
 1.31 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.30 18-Apr-2003  scw In arm32_vector_init(), if the vector page is ARM_VECTORS_HIGH, make
sure the CPU_CONTROL_VECRELOC bit is set in the cpu control register
before returning.
 1.29 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.28 23-Feb-2003  thorpej Change pcb32_pagedir to a paddr_t (after all, it's used as a paddr_t
everywhere in the code).
 1.27 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.26 25-Aug-2002  thorpej Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
 1.25 16-Aug-2002  thorpej * Add a new machdep.powersave sysctl, which controls the use of
the CPU's "sleep" function in the idle loop.
* Default all CPUs to not use powersave, except for the PDA processors
(SA11x0 and PXA2x0).

This significantly reduces inteterrupt latency in high-performance
applications (and was good to squeeze another ~10% out of an XScale
IOP on a Gig-E benchmark).
 1.24 05-May-2002  jdolecek branches: 1.24.2;
Update to md(4) changes: memory_disk_size is now md_root_size, and
type is size_t
 1.23 10-Apr-2002  thorpej Remove the Control register handling from arm32_vector_init(). Apparently,
the ARM6 and ARM7 do completely the wrong thing if you read this register,
so we have to handle this a different way.
 1.22 03-Apr-2002  thorpej Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.21 02-Apr-2002  lukem Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
 1.20 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.19 23-Mar-2002  thorpej Garbage-collect the "pagehook" stuff.
 1.18 23-Mar-2002  thorpej * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.17 10-Mar-2002  lukem * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
 1.16 21-Feb-2002  thorpej map_chunk() -> pmap_map_chunk(), and move it to pmap.c
 1.15 20-Feb-2002  thorpej map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c
 1.14 20-Feb-2002  thorpej Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
 1.13 20-Feb-2002  thorpej Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
 1.12 10-Feb-2002  reinoud Add some extra comments for the `booted_kernel' variable.
 1.11 20-Jan-2002  thorpej Some prototype cleanup.
 1.10 12-Jan-2002  chris Make GENERIC cats kernel boot again. By allocating a 2nd second level page table for the kernel and stack space we can now have to 8MB of kernel and stacks (if the kernel ever gets really bloated might need to add a 3rd!)
Also update the funcs in arm32_machdep.c that create the entries so that on cats they expect the 2 pagetables to be contiguous, note this means that for now cats is special cased in lots of funcs. I'll tidy this up to something a bit more sane soon, to avoid the multitude of #ifndef cats that I had to sprinkle in.
 1.9 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.8 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.7 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.6 27-Oct-2001  rearnsha branches: 1.6.2;
When creating section maps, use pte_cache_mode for setting the
page attributes of cacheable pages.
 1.5 10-Sep-2001  chris branches: 1.5.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.4 09-Sep-2001  toshii Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.3 11-Aug-2001  chris branches: 1.3.2;
Make use of pmap_kenter instead of pmap_enter for kernel buffers.
 1.2 28-Jul-2001  chris branches: 1.2.2;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.1 28-Jul-2001  chris Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.2.2.9 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.8 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.7 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.6 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.5 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.4 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.3 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.2.2.2 03-Aug-2001  lukem update to -current
 1.2.2.1 28-Jul-2001  lukem file arm32_machdep.c was added on branch kqueue on 2001-08-03 04:10:57 +0000
 1.3.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.6.2.10 27-Aug-2002  thorpej Sync with -current.
 1.6.2.9 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.6.2.8 20-Jun-2002  nathanw Catch up to -current.
 1.6.2.7 17-Apr-2002  nathanw Catch up to -current.
 1.6.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.6.2.4 11-Jan-2002  nathanw More catchup.
 1.6.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.6.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.6.2.1 27-Oct-2001  thorpej file arm32_machdep.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.24.2.1 30-Aug-2002  gehenna catch up with -current.
 1.36.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.36.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.2 03-Aug-2004  skrll Sync with HEAD
 1.36.2.1 02-Jul-2003  wrstuden Check in lwp-ification changes needed to get the evbarm/IQ80321 kernel
to compile.

only question I have is over the:
l->l_proc->p_stats->p_ru.ru_msgsnd++;
command at line 245 of dev/kttcp.c. Should we be doing per-lwp or
per-proc accounting?
 1.44.8.1 29-Apr-2005  kent sync with -current
 1.45.2.4 21-Jan-2008  yamt sync with head
 1.45.2.3 27-Oct-2007  yamt sync with head.
 1.45.2.2 03-Sep-2007  yamt sync with head.
 1.45.2.1 26-Feb-2007  yamt sync with head.
 1.46.26.3 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.46.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.46.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.48.10.2 03-Oct-2007  garbled Sync with HEAD
 1.48.10.1 22-May-2007  matt Update to HEAD.
 1.48.4.1 11-Jul-2007  mjf Sync with head.
 1.48.2.2 09-Oct-2007  ad Sync with head.
 1.48.2.1 27-May-2007  ad Sync with head.
 1.49.12.7 23-Mar-2008  matt Restore $NetBSD$
 1.49.12.6 23-Mar-2008  matt fix typo.
 1.49.12.5 23-Mar-2008  matt sync with HEAD
 1.49.12.4 09-Jan-2008  matt sync with HEAD
 1.49.12.3 06-Nov-2007  matt sync with HEAD
 1.49.12.2 29-Aug-2007  matt Initial cpu_info_store.ci_lwp to &lwp0
 1.49.12.1 28-Aug-2007  matt Deal with want_resched move to cpu_info
 1.49.10.2 20-Jan-2008  chris Sync to HEAD.
 1.49.10.1 01-Jan-2008  chris Sync with HEAD.
 1.49.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.49.6.4 28-Feb-2008  rjs Sync with HEAD.
 1.49.6.3 26-Dec-2007  rjs Sync with HEAD.
 1.49.6.2 01-Nov-2007  rjs Sync with HEAD.
 1.49.6.1 06-Oct-2007  rjs Sync with HEAD.
 1.50.2.1 06-Oct-2007  yamt sync with head.
 1.52.8.2 20-Jan-2008  bouyer Sync with HEAD
 1.52.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.52.4.1 26-Dec-2007  ad Sync with head.
 1.52.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.55.10.4 11-Mar-2010  yamt sync with head
 1.55.10.3 19-Aug-2009  yamt sync with head.
 1.55.10.2 04-May-2009  yamt sync with head.
 1.55.10.1 16-May-2008  yamt sync with head.
 1.55.8.1 18-May-2008  yamt sync with head.
 1.55.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.55.6.3 28-Sep-2008  mjf Sync with HEAD.
 1.55.6.2 02-Jul-2008  mjf Sync with HEAD.
 1.55.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.56.4.1 03-Jul-2008  simonb Sync with head.
 1.56.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.57.2.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.57.2.1 19-Oct-2008  haad Sync with HEAD.
 1.58.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.58.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.58.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.62.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.72.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.73.2.3 05-Mar-2011  rmind sync with head
 1.73.2.2 25-Apr-2010  rmind A round of compile and other fixes to previous.
 1.73.2.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.74.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.76.8.1 09-Aug-2012  jdc branches: 1.76.8.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.76.8.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.76.2.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.76.2.3 23-Jan-2013  yamt sync with head
 1.76.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.76.2.1 30-Oct-2012  yamt sync with head
 1.83.2.5 03-Dec-2017  jdolecek update from HEAD
 1.83.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.83.2.3 23-Jun-2013  tls resync from head
 1.83.2.2 25-Feb-2013  tls resync with head
 1.83.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.94.2.2 18-May-2014  rmind sync with head
 1.94.2.1 28-Aug-2013  rmind sync with head
 1.102.2.1 10-Aug-2014  tls Rebase.
 1.105.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.108.2.4 28-Aug-2017  skrll Sync with HEAD
 1.108.2.3 05-Oct-2016  skrll Sync with HEAD
 1.108.2.2 29-May-2016  skrll Sync with HEAD
 1.108.2.1 06-Jun-2015  skrll Sync with HEAD
 1.110.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.115.4.3 21-Apr-2020  martin Sync with HEAD
 1.115.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.115.4.1 10-Jun-2019  christos Sync with HEAD
 1.115.2.4 26-Jan-2019  pgoyette Sync with HEAD
 1.115.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.115.2.2 20-Oct-2018  pgoyette Sync with head
 1.115.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.128.2.2 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
(all via patch)

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.128.2.1 12-Feb-2020  martin Pull up following revision(s) (requested by riastradh in ticket #705):

sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.35
sys/stand/efiboot/efifdt.c: revision 1.20
sys/stand/efiboot/efifdt.h: revision 1.7
sys/arch/aarch64/include/machdep.h: revision 1.9
sys/stand/efiboot/efiboot.h: revision 1.11
sys/arch/arm/arm32/arm32_machdep.c: revision 1.129
sys/arch/arm/include/arm32/machdep.h: revision 1.30
sys/stand/efiboot/exec.c: revision 1.12
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.65
sys/stand/efiboot/version: revision 1.14
sys/stand/efiboot/boot.c: revision 1.19

New function cpu_startup_hook on arm.

Called at end of cpu_startup. Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup. Defined as a weak alias to a
function that does nothing, so optional.
ok jmcneill

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.
Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill
 1.130.2.1 29-Feb-2020  ad Sync with head.
 1.132.4.1 20-Apr-2020  bouyer Sync with HEAD
 1.138.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.13 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.12 20-Jun-2020  skrll Trailing whitespace
 1.11 31-May-2018  mrg docpureset() doesn't return anything, so mark it void.
(probably could also be __dead.)
 1.10 11-Nov-2015  jmcneill branches: 1.10.16;
fix RB_POWERDOWN test
 1.9 11-Nov-2015  jmcneill add support for optional RB_POWERDOWN handler
 1.8 05-Jan-2015  joerg Mark end of cpu_reboot as unreachable.
 1.7 02-Jan-2015  christos - print a warning about powerdown not supported like other ports do
- merge duplicated code
- if halt is requested and there is no console, keep looping instead of
rebooting.
 1.6 18-Aug-2013  matt branches: 1.6.2; 1.6.6; 1.6.8;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 11-May-2013  skrll branches: 1.5.2;
Move pmf_system_shutdown earlier and ensure interrupts are enabled.
 1.4 05-May-2013  skrll Sprinkle cnpollc for correct (usb) keyboard handling.
 1.3 19-Jan-2013  skrll Avoid warning from cngetc byt doing the proper cnpollc dance
 1.2 05-Sep-2012  skrll branches: 1.2.2; 1.2.4; 1.2.6;
Call pmf_system_shutdown in cpu_reboot. OK matt
 1.1 31-Aug-2012  matt Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.2.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.1 05-Sep-2012  matt file arm32_reboot.c was added on branch matt-nb6-plus on 2012-11-28 22:40:17 +0000
 1.2.4.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.4.3 23-Jan-2013  yamt sync with head
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 05-Sep-2012  yamt file arm32_reboot.c was added on branch yamt-pagecache on 2012-10-30 17:18:56 +0000
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 25-Feb-2013  tls resync with head
 1.5.2.1 28-Aug-2013  rmind sync with head
 1.6.8.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.8.1 06-Apr-2015  skrll Sync with HEAD
 1.6.6.1 17-Jul-2015  snj Pull up following revision(s) (requested by christos in ticket #876):
sys/arch/arm/arm32/arm32_reboot.c: revisions 1.7, 1.8
- print a warning about powerdown not supported like other ports do
- merge duplicated code
- if halt is requested and there is no console, keep looping instead of
rebooting.
--
Mark end of cpu_reboot as unreachable.
 1.6.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.2.1 18-Aug-2013  matt file arm32_reboot.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.10.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.15 02-Oct-2021  skrll Pass the pmap in tlb_set_asid for the benefit of aarch64.
 1.14 30-Oct-2020  skrll Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.13 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.12 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.11 24-Aug-2017  jmcneill branches: 1.11.2; 1.11.4;
Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.10 11-Jul-2016  matt Adapt to common pmap changes.
 1.9 26-Mar-2015  hsuenaga don't use armreg_tlbiasidis_write() and armreg_icialluis_write()
on single processor platforms.
 1.8 07-Feb-2015  jmcneill fix CPU_CORTEXA5 && !MULTIPROCESSOR build
 1.7 30-Oct-2014  skrll branches: 1.7.2;
Part of break-before-make is to dsb after the TLB invalidation. Do it in
tlb_invalidate_addr
 1.6 30-Oct-2014  skrll s/0/KERNEL_PID/

isb after setting TTBCR_S_PD0 as per Example B3-5 Disable non-global
mappings when changing ASID in the ARM ARM.
 1.5 29-Oct-2014  skrll Sprinkle #include "opt_multiprocessor.h"
 1.4 14-Oct-2014  matt armreg_tlbiasid_write -> armreg_tlbiasidis_write
 1.3 14-Oct-2014  matt Use tlb is variants for MULTIPROCESSOR
 1.2 11-Apr-2014  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Deal with ASID tagged VIVT icaches (not that we have any cpus with them but...)
 1.1 28-Mar-2014  matt branches: 1.1.2;
Add tlb routines for pmap_tlb.c
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.8.3 03-Dec-2017  jdolecek update from HEAD
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 11-Apr-2014  tls file arm32_tlb.c was added on branch tls-maxphys on 2014-08-20 00:02:45 +0000
 1.2.6.2 10-Nov-2014  martin Revision 1.7 got somehow lost in the merge from -current
 1.2.6.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 11-Apr-2014  yamt file arm32_tlb.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 11-Apr-2014  rmind file arm32_tlb.c was added on branch rmind-smpnet on 2014-05-18 17:44:56 +0000
 1.7.2.3 28-Aug-2017  skrll Sync with HEAD
 1.7.2.2 05-Oct-2016  skrll Sync with HEAD
 1.7.2.1 06-Apr-2015  skrll Sync with HEAD
 1.11.4.1 10-Jun-2019  christos Sync with HEAD
 1.11.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.1 28-May-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.12;
Add a generic armv7 bus dma tag.
 1.1.12.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 28-May-2017  jdolecek file armv7_generic_dma.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-May-2017  skrll file armv7_generic_dma.c was added on branch nick-nhusb on 2017-08-28 17:51:29 +0000
 1.13 30-Oct-2020  skrll Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.12 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.11 05-Feb-2020  skrll Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.

armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO

bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.

XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.10 19-Nov-2018  jmcneill branches: 1.10.4; 1.10.6;
On second thought, get rid of "bs_base" from struct bus_space and use a
custom bs_map for acpipchb instead.
 1.9 18-Nov-2018  jmcneill Add a "bs_base" field to struct bus_space. If present, use it to translate
mappings by appending the value to the pa passed to bus_space_map.
 1.8 01-Apr-2018  ryo branches: 1.8.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.7 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.6 22-Jan-2018  skrll branches: 1.6.2;
Pass PMAP_WRITE_COMBINE as appropriate in armv7_generic_bs_map, i.e.
same fix as bcm283x_bs_map just got.
 1.5 22-Jan-2018  skrll Trailing whitespace
 1.4 27-Nov-2017  skrll branches: 1.4.2;
KNF
 1.3 01-Aug-2016  jakllsch Add pointer to bus_space_set_region_4 implemenation in armv7_generic_bs_tag.
 1.2 18-Oct-2015  jmcneill branches: 1.2.2;
mark a4x read region / write region as not implemented
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
Shared armv7 bus space implementation.
 1.1.2.4 05-Oct-2016  skrll Sync with HEAD
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file armv7_generic_space.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.2.2.1 06-Aug-2016  pgoyette Sync with HEAD
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 27-Nov-2017  jdolecek file armv7_generic_space.c was added on branch tls-maxphys on 2017-12-03 11:35:51 +0000
 1.6.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.6.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.6.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.8.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.2.1 10-Jun-2019  christos Sync with HEAD
 1.10.6.1 29-Feb-2020  ad Sync with head.
 1.10.4.1 27-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #742):

sys/arch/arm/arm32/pmap.c: revision 1.388
sys/arch/arm/arm32/armv7_generic_space.c: revision 1.11
sys/arch/arm/arm/cpufunc.c: revision 1.176
sys/arch/arm/conf/Makefile.arm: revision 1.54 (via patch)
sys/arch/arm/include/arm32/pmap.h: revision 1.161

Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.
armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO
bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.
XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.5 21-Dec-2001  bjh21 Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
 1.4 29-Nov-2001  thorpej Remove some overly-paranoid debug code that grovels too much
platform-specific internals.
 1.3 26-Nov-2001  thorpej Don't include <machine/psl.h> directly.
 1.2 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.1 06-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Move arm32/arm32/ast.c to arm/arm32/ast.c
 1.1.12.5 28-Feb-2002  nathanw Catch up to -current.
 1.1.12.4 17-Dec-2001  nathanw cpu_upcall() -> sa_upcall_userret().
 1.1.12.3 17-Nov-2001  thorpej Adapt to latest MI changes. Update copyright in arm_machdep.c
 1.1.12.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.1.12.1 06-Mar-2001  thorpej file ast.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 06-Mar-2001  bouyer file ast.c was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.6 17-Aug-2013  matt Nuke atomic.S since we have MI defined atomic ops
 1.5 07-Jul-2010  chs branches: 1.5.8; 1.5.18; 1.5.22;
implement ucas_* for arm.
 1.4 19-Nov-2008  matt branches: 1.4.6; 1.4.8;
Use IF32_bits instead of I32_bit
 1.3 27-Apr-2008  matt branches: 1.3.6; 1.3.8; 1.3.14;
Merge kernel changes in matt-armv6 to HEAD.
 1.2 13-Jan-2008  chris branches: 1.2.6; 1.2.8; 1.2.10;
When manipulating the interrupt status for atomic ops use cpsr_c rather
than cpsr_all, this avoids updating unnecessary fields in the cpsr.

As a side effect, the inline versions no longer clobber the condition
codes.
 1.1 19-Oct-2002  bsh branches: 1.1.2; 1.1.4; 1.1.26; 1.1.74; 1.1.84; 1.1.88; 1.1.90; 1.1.96; 1.1.104;
non-inline version of atomic_{set,clear}_bit(), defined when
ATOMIC_SET_BIT_NONINLINE_REQUIRED is defined.
(extracted from arm/arm32/locore.S)
 1.1.104.1 19-Jan-2008  bouyer Sync with HEAD
 1.1.96.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.90.3 23-Mar-2008  matt sync with HEAD
 1.1.90.2 28-Jan-2008  matt Comment out armv6 atomic stubs for now.
 1.1.90.1 11-Sep-2007  matt Add atomic_*_32* stubs for now (until thorpej-atomic gets merged).
 1.1.88.1 20-Jan-2008  chris Sync to HEAD.
 1.1.84.1 28-Feb-2008  rjs Sync with HEAD.
 1.1.74.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.1.26.1 21-Jan-2008  yamt sync with head
 1.1.4.2 11-Nov-2002  nathanw Catch up to -current
 1.1.4.1 19-Oct-2002  nathanw file atomic.S was added on branch nathanw_sa on 2002-11-11 21:56:32 +0000
 1.1.2.2 24-Oct-2002  bjh21 Sync with trunk.
 1.1.2.1 19-Oct-2002  bjh21 file atomic.S was added on branch bjh21-hydra on 2002-10-24 22:33:45 +0000
 1.2.10.3 11-Aug-2010  yamt sync with head.
 1.2.10.2 04-May-2009  yamt sync with head.
 1.2.10.1 16-May-2008  yamt sync with head.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.8.1 05-Mar-2011  rmind sync with head
 1.4.6.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.22.1 28-Aug-2013  rmind sync with head
 1.5.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.8.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.10 17-Dec-2013  joerg Write out register pairs for strd.
 1.9 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.8 11-Dec-2005  christos branches: 1.8.98; 1.8.114; 1.8.124; 1.8.130;
merge ktrace-lwp.
 1.7 13-Oct-2003  scw Xscale-optimised b{copy,zero}_page().

Contributed by Wasabi Systems.
 1.6 08-Apr-2003  thorpej branches: 1.6.2;
Use PAGE_SIZE rather than NBPG.
 1.5 17-Aug-2002  thorpej More local label fixups.
 1.4 15-Aug-2002  briggs * Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.3 07-Aug-2002  thorpej Speed up bcopy_page() on the XScale slightly by using the "pld"
insn (prefetch) to look-ahead to the next chunk while we copy the
current chunk.

This could probably use a bit more tuning.
 1.2 11-Aug-2001  chris branches: 1.2.6; 1.2.14;
Patch in Richard E's changes to bcopy page, the loop doesn't need unrolling as much as it currently is due to the overhead of the load/stores taking most of the time. (profiling shows minimal time difference)
 1.1 04-Mar-2001  matt branches: 1.1.4; 1.1.6;
Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file bcopy_page.S was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.2.14.1 30-Aug-2002  gehenna catch up with -current.
 1.2.6.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.6.2 13-Aug-2002  nathanw Catch up to -current.
 1.2.6.1 11-Aug-2001  nathanw file bcopy_page.S was added on branch nathanw_sa on 2002-08-13 02:17:49 +0000
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.130.2 18-May-2014  rmind sync with head
 1.8.130.1 28-Aug-2013  rmind sync with head
 1.8.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.114.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.8.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6 11-Aug-2002  bjh21 New, improved version of copyin(), copyout(), and kcopy() by Allen Briggs.
This version works on both 26-bit and 32-bit machines. For large copies,
it's up to three times as fast as the old arm32 version and five times as
fast as the old arm26 version. For small copies it seems to be even faster
(getrusage() is apparently over ten times faster on an ARM610).

Hooray for Allen!
 1.5 23-Mar-2002  thorpej branches: 1.5.2; 1.5.4;
* Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.4 03-Mar-2002  chris Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.3 20-Nov-2001  chris Correct comment to avoid confusion, it really means 32 bits not 32 bites.
 1.2 28-Sep-2001  chris branches: 1.2.4;
Note the alignment state of the stack. This is part of the work to get the stack 8byte aligned for ELF
 1.1 04-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.6;
Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.1.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file bcopyinout.S was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.1.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 28-Sep-2001  nathanw file bcopyinout.S was added on branch nathanw_sa on 2002-01-08 00:23:07 +0000
 1.5.4.1 18-Nov-2002  he Pull up file removal (requested by bjh21 in ticket #689):
New and much improved version of copyin(), copyout(), and
kcopy() which works on both 26-bit and 32-bit machines.
 1.5.2.1 30-Aug-2002  gehenna catch up with -current.
 1.150 26-Sep-2025  skrll arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.

PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.

These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:

op old new
 1.149 08-Mar-2025  jmcneill branches: 1.149.2;
arm: Support BUS_DMA_NOCACHE
 1.148 10-Dec-2024  msaitoh arm/bus_dma: Sprinkle error check with __predict_{true,false}.

Sprinkle error check in bus_dmamap_load*() and bus_dmamap_sync() with
__predict_{true,false} to improve performance.
 1.147 20-Oct-2024  skrll Revert previous - I misread the code.
 1.146 20-Oct-2024  skrll G/C an unused event counter.
 1.145 20-Oct-2024  skrll Sync with the RISC-V version. Mostly

Use PRI{u,x}{BUSSIZE,VADDR,PADDR}
 1.144 28-Jul-2023  rin branches: 1.144.6;
arm/bus_dma: Fix misleading comment:

- * For a virtually-indexed write-back cache, we need
- * to do the following things:
+ * For a write-back cache, we need to do the following things:

This comment was written long ago when we supported only virtually-
indexed caches for arm. But subsequent comments are valid also for
physically-indexed cache.
 1.143 03-Apr-2023  skrll Use PRI{u,x}{BUSSIZE,VADDR,PADDR} etc
 1.142 03-Apr-2023  skrll More KNF
 1.141 03-Apr-2023  skrll Some KNF
 1.140 03-Apr-2023  skrll spaces -> TAB
 1.139 25-Feb-2023  skrll Don't refer to physical_{start,end} here and just pass minimum (0UL)
address and maximum (~0UL) physical address. The values are passed
through to uvm_pglistalloc which knows about the RAM ranges.
 1.138 11-Oct-2022  andvar branches: 1.138.2;
fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and
s/bus_dmamem_load/bus_dmamap_load/.
Inspired by recent similar fixes in OpenBSD.
 1.137 26-Jul-2022  andvar s/functin/function/ in copy pasted comment.
 1.136 24-May-2022  andvar s/entrace/entrance/ in copy pasted comment.
 1.135 06-Feb-2022  mrg if we have to bounce a buffer, clear our anything already setup in
the map before trying again.

riastradh@ noticed that a map had two types of mbuf types, and this
seems to avoid it as seen on eqos(4) on quartz64.

add a couple more event counts for bus dma events.

ok @skrll @raistradh @jmcneill


XXX: pullup-8 and pullup-9 probably.
 1.134 20-Dec-2021  skrll _bus_dmatag_subregion is always EOPNOTSUPP for !_ARM32_NEED_BUS_DMA_BOUNCE
No need to check {min,max}_addr. Compiler did the right thing, but...
 1.133 30-Aug-2021  jmcneill Add storage for an iommu cookie in bus_dmamap_t and store untranslated CPU
address in bus_dma_segment_t.
 1.132 07-Feb-2021  skrll Check for programming errors in _bus_dmamap_load_buffer
 1.131 07-Feb-2021  skrll pretty print
 1.130 07-Feb-2021  skrll Consistently use %#x, etc
 1.129 22-Dec-2020  skrll Count bus_dmamap_sync events for coherent ranges and non-coherent ranges
 1.128 20-Dec-2020  jmcneill style fix
 1.127 19-Dec-2020  jmcneill No need to allocate bounce buffers if we have a single range that covers
all of physical memory.
 1.126 04-Dec-2020  skrll Use __func__ in panic calls (and misc style changes)
 1.125 04-Dec-2020  skrll Update stats in the coherent case. Reported by jmcneill.
 1.124 24-Oct-2020  skrll branches: 1.124.2;
Fix the logic around "parent is a subset and can be re-used" in
bus_dmatag_subregion. Thanks to mrg@ for spotting the problem.
 1.123 08-Sep-2020  skrll A few bus_dmatag_subregion fixes

- return EOPNOTSUPP if min_addr isn't less than max_addr
- fix the subset check to ensure that all the ranges in the parent tag are
within the {min,max}_addr range. If so we can just continue to use the
parent tag.
- when building the new ranges read the parent tag range rather than un-
initialised memory.
- remove the max_addr != 0xffffffff check - the overflow should be handled
by the unsigned arithmetic for arm32.
- add a KASSERT
- add comments
 1.122 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.121 14-Mar-2020  ad - Hide the details of SPCF_SHOULDYIELD and related behind a couple of small
functions: preempt_point() and preempt_needed().

- preempt(): if the LWP has exceeded its timeslice in kernel, strip it of
any priority boost gained earlier from blocking.
 1.120 22-Feb-2020  skrll Fix previous for _ARM32_NEED_BUS_DMA_BOUNCE
 1.119 21-Feb-2020  maya Make sure to convey a failure to the calling function

Likely fix for PR kern/54999, but that was a one-off panic.
 1.118 05-Nov-2019  jmcneill branches: 1.118.2;
Do not try to use direct map for prefetchable mappings
 1.117 05-Nov-2019  jmcneill bus_dmamem_map: honour BUS_DMA_PREFETCHABLE hint
 1.116 24-Aug-2019  jmcneill bus_dmamap_load_raw: support coherent mappings
bus_dmamap_sync: support syncing "raw" buffer types
 1.115 14-Jun-2019  skrll branches: 1.115.2;
Simplify the _ARM32_NEED_BUS_DMA_BOUNCE #ifdefs and rely on compiler
optimisation of the bouncing = false case.

Drain the write buf (aka DSB) in more cases

Catch all CPUs that support speculation. (thunderx isn't CPU_CORTEX)
 1.114 08-Jun-2019  skrll Fix comment
 1.113 14-Sep-2018  skrll Fix BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE for aarch64.

The readonly mbuf optimisation is for the old arm pmap.
 1.112 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.111 17-Jul-2018  christos use unintmax_t instead of u_quad_t.
 1.110 17-Jul-2018  martin Revert previous and cast to u_quad_t instead (t is for ptrdiff_t and off_t
does not match that on all arm)
 1.109 16-Jul-2018  christos fix incorrect printf format (off_t needs t)
 1.108 27-Apr-2018  maxv branches: 1.108.2;
M_CLUSTER -> M_EXT_CLUSTER
 1.107 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.106 04-Mar-2018  skrll branches: 1.106.2;
Less ifdefs -> more readable.

NFC intended
 1.105 03-Mar-2018  skrll Style
 1.104 03-Mar-2018  skrll Rely on the cache operations to perform the necessary barriers.
 1.103 03-Mar-2018  skrll Wrap some long lines
 1.102 03-Mar-2018  skrll Remove unnecessary includes
 1.101 29-Dec-2017  skrll More KNF
 1.100 29-Dec-2017  skrll KNF
cvS: ----------------------------------------------------------------------
 1.99 03-Nov-2017  skrll Fix a comment
 1.98 05-Jan-2017  msaitoh branches: 1.98.8;
Update the dmamp argument only when the allocation succeeded.
 1.97 23-Dec-2016  cherry "Make NetBSD great again!"

Introduce uvm_hotplug(9) to the kernel.

Many thanks, in no particular order to:

TNF, for funding the project.

Chuck Silvers - for multiple API reviews and feedback.
Nick Hudson - for testing on multiple architectures and bugfix patches.
Everyone who helped with boot testing.

KeK (http://www.kek.org.in) for hosting the primary developers.
 1.96 05-Nov-2016  skrll Also return early from _bus_dmamap_sync if we're not bouncing and there
are no {pre,post} ops

Now the KASSERT doesn't fire on cats
 1.95 18-Jun-2016  skrll branches: 1.95.2;
Trailing whitespace.
 1.94 18-Oct-2015  jmcneill implement _bus_dmamap_load_raw, ok skrll@
 1.93 24-Aug-2015  matt Fix mbuf dmasyncing for extended MMU kernels.
 1.92 21-Aug-2015  matt Assert we aren't trying to sync a read-only mbuf as PREREAD.
 1.91 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.90 12-Feb-2015  joerg Kill redundant semicolons.
 1.89 09-Nov-2014  skrll branches: 1.89.2;
Post a dmb before invalidating the cache in the post-{read,write}
operations to ensure that any/all cachelines brought in via speculation
are really flushed.
 1.88 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.87 08-Sep-2014  matt With PMAP_NEED_ALLOC_POOLPAGE, before using pmap_map_poolpage make sure
the page comes from the same freelist that pmap_map_poolpage uses.
 1.86 10-Apr-2014  matt branches: 1.86.2;
Deal with non-4KB pages properly.
 1.85 06-Apr-2014  skrll Remove a comment that became largely redundant with the PMAP_NOCACHE
change.
 1.84 02-Apr-2014  matt branches: 1.84.2;
Deal with bus_dmamem_unmap of direct mapped KVA.
 1.83 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.82 26-Feb-2014  skrll Fix off by one in _bus_dma_{paddr_inrange,_to_paddr} when checking the
dma range.
 1.81 26-Feb-2014  matt Use kmem instead of malloc.
Fix various corner cases with bounce buffers.
Use PMAP_NOCACHE instead of manipulating PTEs directly.
 1.80 18-Feb-2013  matt branches: 1.80.2;
Disable when using extended MMU support.
 1.79 16-Feb-2013  matt Use KASSERT* in preference to #ifdef DIAGNOSTIC / panic
 1.78 15-Feb-2013  matt Actually use the calculated uboundary.
 1.77 14-Feb-2013  matt Make sync counters only count when caches ops are performed.
 1.76 14-Feb-2013  matt Rework counters.
Get rid of a badly done goto.
Properly deal with boundary in bus_dmamem_alloc_range.
 1.75 14-Feb-2013  matt fix writebuf draining fix.
 1.74 13-Feb-2013  matt bounce buffer fixes + convert some kassert -> kassertmsg
 1.73 04-Feb-2013  macallan support BUS_DMA_PREFETCHABLE in bus_dmamem_mmap()
 1.72 28-Jan-2013  skrll Move and tweak an #if 0 printf
 1.71 27-Jan-2013  matt Get rid of _BUS_DMAMAP_MEM_XLATE
 1.70 27-Jan-2013  matt Add a _BUS_DMAMAP_NOALLOC which tells bus_dmamem_alloc to skip that
dmarange when allocating memory.
Add a second dmarange to bcm23xx obio to allow it to map coherently mapped
memory.
 1.69 27-Jan-2013  matt Make _BUS_DMAMAP_MEM_XLATE supplied by the caller.
 1.68 27-Jan-2013  matt Add a flag to make bus_dmamem_map use the bus/sys transation table when
mapping bus addresses. Make bcm2835 obio use it.
 1.67 16-Jan-2013  matt On Cortex, speculative loads can cache lines to be populated after then they've
been invalidated for a DMA read. So after the DMA read we have to reinvalidate
them again. We have to both invalidates since the former prevents dirty lines
overwriting just DMAed data.
 1.66 23-Oct-2012  skrll Correct inverted boolean logic for the coherent flag introduced in r1.61

Fixes slow nfs seen by msaitoh@
 1.65 22-Oct-2012  matt Only call cpu_{,s}dcache_inv_range if len > 0
 1.64 21-Oct-2012  matt Use right flag name for bus_dmamem_map (fixes usb on BCM53xx).
 1.63 19-Oct-2012  matt Make IS_BOUNCING a map flag and use it to simplify code and to avoid calling
the sync routines if (COHERENT|IS_BOUNCING) == COHERENT. (this eeks out a
little bit more performance).
 1.62 19-Oct-2012  matt Make bus_dmamem_map aware of coherent dma regions. Also, take advantage
of the use/existance of PMAP_MAP_POOLPAGE to avoid redundant mappings.
 1.61 17-Oct-2012  matt Add per-segment and per-ragne flag (to store _BUS_DMAMAP_COHERENT).
Use the per-range flag to set the per-segment flag.
This allows bus_dma to skip flushing for known coherent memory regions.
 1.60 06-Oct-2012  matt Fix a cut&paste error with supersections.
 1.59 22-Sep-2012  matt Add busaddr to paddr routine and use it.
cleanup the PREREAD sync case.
 1.58 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.57 11-Sep-2012  matt branches: 1.57.2;
Rework dmasync routines so that secondary caches can be flushed as well
as the primary caches.
 1.56 02-Sep-2012  matt Supersections are on armv6 too.
 1.55 02-Sep-2012  matt Make bus_dma understand supersections.
 1.54 01-Jul-2011  dyoung branches: 1.54.2; 1.54.10;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.53 06-Nov-2010  uebayasi Machine dependent code is considered as part of UVM. Include
internal API header.
 1.52 04-Jun-2008  ad branches: 1.52.16; 1.52.18; 1.52.20;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.51 28-Apr-2008  martin branches: 1.51.2;
Remove clause 3 and 4 from TNF licenses
 1.50 04-Mar-2007  christos branches: 1.50.42; 1.50.44; 1.50.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.49 10-Apr-2006  simonb branches: 1.49.14;
Unwrap a not-too-long-line.
 1.48 01-Mar-2006  yamt branches: 1.48.2; 1.48.4; 1.48.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.47 24-Dec-2005  perry branches: 1.47.2; 1.47.4; 1.47.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.46 11-Dec-2005  christos merge ktrace-lwp.
 1.45 24-Nov-2005  yamt 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.44 01-Apr-2005  yamt branches: 1.44.2; 1.44.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.43 09-Mar-2005  matt Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.42 02-Jan-2005  chris branches: 1.42.2; 1.42.4;
Remove direct references to TAILQ internal structures.

No functional change, just tidying up code.
 1.41 28-Nov-2004  thorpej Sync with i386 bus_dma.
 1.40 06-Oct-2004  scw Apply patch provided by Hiroki Nakano in PR kern/27159 to fix
compilation with DEBUG_DMA defined.
 1.39 19-Jun-2004  thorpej Merge x86/bus_dma.c 1.11 by yamt:

Simplify bus_dma internal "load" functions by eliminating the "first"
variable, using seg == -1 instead.
 1.38 30-Oct-2003  scw In bus_dmamap_sync(), we can no longer rely on the data cache being
flushed on every context switch as an indicator that a mapping is
not resident in the cache.

Instead, used the per-pmap flag maintained by the cpu_switch/pmap code.
 1.37 29-Oct-2003  mycroft If something goes wrong, we want to return ENOMEM, not 0!
 1.36 26-Oct-2003  chris Fix up some unitialised variables.
 1.35 06-Sep-2003  rearnsha Make sure _ARM32_BUS_DMA_PRIVATE is defined before we pull in any
include files to avoid problems with the rats nest of dependencies.
 1.34 24-Jul-2003  briggs Clear ARM32_DMAMAP_COHERENT in _bus_dmamap_load_buffer for userspace mappings.
 1.33 15-Jul-2003  lukem __KERNEL_RCSID()
 1.32 29-Jun-2003  fvdl branches: 1.32.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.31 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.30 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.29 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.28 09-Apr-2003  thorpej Use cached physical addresses for mbufs and clusters to save having
to extract the physical address from the virtual.

On the ARM, also use the "read-only at MMU" indication to avoid a
redundant cache clean operation.

Other platforms should use these two as examples of how to use these
new pool/mbuf features to improve network performance. Note this requires
a platform to provide a working POOL_VTOPHYS().

Part 3 in a series of simple patches contributed by Wasabi Systems
to improve network performance.
 1.27 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.26 27-Mar-2003  mycroft Remove references to variables that aren't used here.
 1.25 03-Feb-2003  chris bus dma memory is allocated as M_DMAMAP so free it as M_DMAMAP, not DEVBUF.
 1.24 02-Feb-2003  wiz guarantee, not guarentee. Idea from miod@openbsd.
 1.23 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.22 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.21 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.20 17-Aug-2002  briggs Do not trim 'offset' from 'len' in _bus_dmamap_sync_linear().
 1.19 17-Aug-2002  briggs Inline bus_dma_inrange() and bus_dmamap_sync_*().
 1.18 14-Aug-2002  thorpej When doing PREREAD sync operations, if the start and end addresses
of the range are aligned to a cacheline boundary, when do a dcache-inv
operation, rather than a dcache-wbinv operation.

XXX It could be a little smarter (align using wbinv, inv, then finish
up using wbinv), but even this simple change is good for a nearly 40%
improvement in my test case on XScale.
 1.17 14-Aug-2002  thorpej * Add an ARM32_DMAMAP_COHERENT flag to indicate that a loaded DMA
map contains "coherent" (non-cached in ARM-land) mappings.
* Set ARM32_DMAMAP_COHERENT in the map at the start of a load operation,
and clear it in _bus_dmamap_load_buffer() if we encounter any cacheable
mappings.
* In _bus_dmamap_sync(), if the map is marked COHERENT, skip any cache
flushing.
 1.16 14-Aug-2002  thorpej Whe making a mapping "coherent", clear *ALL* the cache bits, not
just L2_B and L2_C.
 1.15 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.14 28-Jul-2002  thorpej Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that. This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
 1.13 28-Jun-2002  briggs Remove complaint: bus_dmamap_destroy() called for map with valid
mappings bus_dma(9) states: "In the event that the DMA handle contains
a valid mapping, the mapping will be unloaded via the same mechanism
used by bus_dmamap_unload()." And some drivers do mean to skip the
unload step.
 1.12 02-Jun-2002  drochner move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
 1.11 10-Apr-2002  thorpej branches: 1.11.2; 1.11.4;
vm_offset_t -> vaddr_t,paddr_t
 1.10 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.9 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.8 25-Jan-2002  thorpej Overhaul bus_dmamap_sync for the ARM:
* Track which process (XXX really, vmspace) owns the mapping. When
we sync the map, if the mapping doesn't belong to the kernel or to
the current process (XXX really, vmspace), then no cache fobbing
is necessary, since the cache is Wb-Inv'd on context switch (XXX need
to revisit this when we support FCSE).
* Be smarter about which cache operation we do when sync'ing the map:
- PREREAD -- Invalidate D$ (XXX right now, we actually do Wb-Inv)
- PREWRITE -- Write-back D$ (note, we do NOT invalidate here)
- PREREAD|PREWRITE -- Wb-Inv D$

More work is needed here. In particular, a version for CPUs
with write-through caches should be provided, to eliminate
the write-back steps (which are noops on such CPUs, but skipping
two branches would be nice).
 1.7 25-Jan-2002  thorpej ANSI'ify function decls.
 1.6 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.5 26-Nov-2001  thorpej Don't include <machine/psl.h> directly.
 1.4 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.3 12-Sep-2001  rearnsha branches: 1.3.4;
Fix warning errors for printing size_t types when compiling with
DEBUG_DMA (uses casts due to a.out and ELF having different base
types for size_t).
 1.2 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.4;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.8 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.7 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file bus_dma.c was added on branch kqueue on 2001-08-03 04:10:57 +0000
 1.3.4.12 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.11 27-Aug-2002  thorpej Sync with -current.
 1.3.4.10 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.4.9 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.8 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.3.4.7 20-Jun-2002  nathanw Catch up to -current.
 1.3.4.6 17-Apr-2002  nathanw Catch up to -current.
 1.3.4.5 11-Apr-2002  thorpej Make this compile again.
XXX Need to re-think this.
 1.3.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 12-Sep-2001  nathanw file bus_dma.c was added on branch nathanw_sa on 2002-01-08 00:23:07 +0000
 1.11.4.2 07-Dec-2002  he Pull up revision 1.16 (requested by thorpej in ticket #678):
When making a mapping ``coherent'', clear *all* the cacche
bits, not just L2_B and L2_C.
 1.11.4.1 07-Dec-2002  he Pull up revisions 1.13-1.14 (requested by thorpej in ticket #568):
Remove warning from bus_dmamap_destroy().
Change the way DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a
pointer to the original buffer/buftype used to load the
DMA map, and use that. Shrinks bus_dma_segment_t from 12
to 8 bytes, and the cache flushing is also more efficient.
 1.11.2.3 30-Aug-2002  gehenna catch up with -current.
 1.11.2.2 16-Jul-2002  gehenna catch up with -current.
 1.11.2.1 14-Jul-2002  gehenna catch up with -current.
 1.32.2.10 11-Dec-2005  christos Sync with head.
 1.32.2.9 01-Apr-2005  skrll Sync with HEAD.
 1.32.2.8 19-Feb-2005  skrll Don't deref a NULL struct lwp *. This shouldn't happen, but...
 1.32.2.7 17-Jan-2005  skrll Sync with HEAD.
 1.32.2.6 18-Dec-2004  skrll Sync with HEAD.
 1.32.2.5 19-Oct-2004  skrll Sync with HEAD
 1.32.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.32.2.2 03-Aug-2004  skrll Sync with HEAD
 1.32.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.42.4.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.42.4.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.42.2.1 29-Apr-2005  kent sync with -current
 1.44.8.1 29-Nov-2005  yamt sync with head.
 1.44.2.2 03-Sep-2007  yamt sync with head.
 1.44.2.1 21-Jun-2006  yamt sync with head.
 1.47.6.1 22-Apr-2006  simonb Sync with head.
 1.47.4.1 09-Sep-2006  rpaulo sync with head
 1.47.2.2 18-Feb-2006  yamt keep vmspace rather than proc in bus_dmamap_t.
 1.47.2.1 18-Feb-2006  yamt adapt bus_dma implementations.
 1.48.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.48.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.48.2.1 11-Apr-2006  yamt sync with head
 1.49.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.50.46.2 04-May-2009  yamt sync with head.
 1.50.46.1 16-May-2008  yamt sync with head.
 1.50.44.2 17-Jun-2008  yamt sync with head.
 1.50.44.1 18-May-2008  yamt sync with head.
 1.50.42.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.50.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.51.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.52.20.1 05-Mar-2011  rmind sync with head
 1.52.18.1 08-Jul-2010  uebayasi Fix build.
 1.52.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.54.10.6 15-Feb-2013  matt Actually use the calculated uboundary
 1.54.10.5 14-Feb-2013  matt Sync with HEAD.
 1.54.10.4 14-Feb-2013  matt Sync with HEAD
 1.54.10.3 14-Feb-2013  matt sync with HEAD
 1.54.10.2 16-Jan-2013  matt Pullup from HEAD:
On Cortex, speculative loads can cache lines to be populated after then they've
been invalidated for a DMA read. So after the DMA read we have to reinvalidate
them again. We have to both invalidates since the former prevents dirty lines
overwriting just DMAed data.
 1.54.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.54.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.54.2.2 23-Jan-2013  yamt sync with head
 1.54.2.1 30-Oct-2012  yamt sync with head
 1.57.2.4 03-Dec-2017  jdolecek update from HEAD
 1.57.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.57.2.2 25-Feb-2013  tls resync with head
 1.57.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.80.2.1 18-May-2014  rmind sync with head
 1.84.2.1 10-Aug-2014  tls Rebase.
 1.86.2.3 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.86.2.2 14-Nov-2014  martin Pull up the following revisions, requested by skrll in ticket #222:
src/sys/arch/arm/arm32/locore.S 1.37
src/sys/arch/arm/arm32/bus_dma.c 1.87

Make the initial svcstack is doubleword aligned if EABI.

With PMAP_NEED_ALLOC_POOLPAGE, before using pmap_map_poolpage make sure
the page comes from the same freelist that pmap_map_poolpage uses.
 1.86.2.1 10-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #209):
sys/arch/arm/pic/pic.c: revision 1.25
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.312
sys/arch/arm/arm32/bus_dma.c: revision 1.89
sys/arch/arm/arm32/pmap.c: revision 1.313
sys/arch/arm/arm32/pmap.c: revision 1.314
sys/arch/arm/arm32/pmap.c: revision 1.315
sys/arch/arm/arm32/pmap.c: revision 1.316
Include opt_multiprocessor.h
When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
Post a dmb before invalidating the cache in the post-{read,write}
operations to ensure that any/all cachelines brought in via speculation
are really flushed.
Ensure all memory operations are complete by before wfi. For example, the
cpu could have just been in uvm_pageidlezero.
In pmap_fault_fixup re-instate the TLB flush for the shared L1 case that
occurs for non-ARM_MMU_EXTENDED kernels.
This fixes rump/rumpkern/t_sp:stress_killer on rpi which is currently
non-ARM_MMU_EXTENDED
Remove an unnecessary flush that sneaked in as part of break-before-make
change.
Remove an XXXNH comment.
Update PTE_SYNC_CURRENT to add a dsb for armv7 - part of the
break-before-make fix.
 1.89.2.5 05-Feb-2017  skrll Sync with HEAD
 1.89.2.4 05-Dec-2016  skrll Sync with HEAD
 1.89.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.89.2.2 22-Sep-2015  skrll Sync with HEAD
 1.89.2.1 06-Apr-2015  skrll Sync with HEAD
 1.95.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.98.8.1 25-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #1510):

sys/arch/arm/arm32/bus_dma.c: revision 1.119
sys/arch/arm/arm32/bus_dma.c: revision 1.120

Make sure to convey a failure to the calling function
Likely fix for PR kern/54999, but that was a one-off panic.
-
Fix previous for non-_ARM32_NEED_BUS_DMA_BOUNCE builds
 1.106.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.106.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.106.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.106.2.2 02-May-2018  pgoyette Synch with HEAD
 1.106.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.108.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.108.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.108.2.1 10-Jun-2019  christos Sync with HEAD
 1.115.2.3 25-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #721):

sys/arch/arm/arm32/bus_dma.c: revision 1.119
sys/arch/arm/arm32/bus_dma.c: revision 1.120

Make sure to convey a failure to the calling function
Likely fix for PR kern/54999, but that was a one-off panic.
-
Fix previous for non-_ARM32_NEED_BUS_DMA_BOUNCE builds
 1.115.2.2 06-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #399):

sys/arch/arm/arm32/bus_dma.c: revision 1.117
sys/arch/arm/arm32/bus_dma.c: revision 1.118
sys/external/bsd/drm2/drm/drm_gem_cma_helper.c: revision 1.8

bus_dmamem_map: honour BUS_DMA_PREFETCHABLE hint

Map buffer objects with BUS_DMA_PREFETCHABLE.

Do not try to use direct map for prefetchable mappings
 1.115.2.1 24-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #236):

sys/arch/arm/arm32/bus_dma.c: revision 1.116

bus_dmamap_load_raw: support coherent mappings
bus_dmamap_sync: support syncing "raw" buffer types
 1.118.2.1 29-Feb-2020  ad Sync with head.
 1.124.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.124.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.124.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.138.2.1 01-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #1166):

sys/arch/arm/arm32/bus_dma.c: revision 1.142
sys/arch/arm/include/cpufunc.h: revision 1.92
sys/arch/arm/arm32/bus_dma.c: revision 1.150

More KNF


arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.
PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.

These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:
op old new
 1.144.6.1 02-Aug-2025  perseant Sync with HEAD
 1.149.2.1 01-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #40):

sys/arch/arm/include/cpufunc.h: revision 1.92
sys/arch/arm/arm32/bus_dma.c: revision 1.150

arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.
PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.
These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:
op old new
 1.2 04-Mar-2001  bjh21 Make compat_13_sys_sigreturn() work on arm26, and move it from
arch/arm/arm32/compat_13_machdep.c to arch/arm/arm/compat_13_machdep.c.
 1.1 04-Mar-2001  matt Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.20 26-Oct-2002  jdolecek now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
 1.19 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.18 02-Aug-2002  thorpej Add dmoverio.
 1.17 29-Jul-2002  thorpej Add sysmon at cdev 101.
 1.16 22-Jul-2002  ichiro cdev_tty_init(NIXPCOM,ixpcom) move to end of cdevsw array
 1.15 20-Jul-2002  simonb Add an "#ifndef NIXPCOM" check so that this builds on non-evbarm.
 1.14 19-Jul-2002  thorpej Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device. While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
 1.13 16-Jul-2002  ichiro add ixpcom to cdevsw
 1.12 30-Jun-2002  thorpej Add kttcp device.
 1.11 17-Jun-2002  christos MD systrace gluons.
 1.10 19-Apr-2002  wiz branches: 1.10.2;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.9 18-Mar-2002  briggs Fix typo: ISDNCTL -> NISDNCTL.
 1.8 16-Mar-2002  martin Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
 1.7 05-Jan-2002  chris Update with radio, cir and irframe. also add block device for ld. Update other tables in file as appropriate.
 1.6 11-Dec-2001  chris Add clockctl device.
Note that someone needs to tidy this up, we've got 92 block devices, which just ain't true. Also appears we're actually missing some, eg the ld block device.
 1.5 27-Oct-2001  rearnsha branches: 1.5.2;
Add the IFPGA console device.
 1.4 16-Sep-2001  matt branches: 1.4.2;
Add missing devices (IOP,MLX,MLY,LD), PCI, stub AGP, ...
 1.3 09-Sep-2001  toshii branches: 1.3.2;
Readd sacom to cdevsw.
 1.2 04-Sep-2001  wiz branches: 1.2.2;
Fix typos (CONS instead of CONF, and specifc instead of specific).
 1.1 03-Sep-2001  matt Switch netwinder to use a common conf.c for the arm ports.
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.2.1 09-Sep-2001  thorpej file conf.c was added on branch kqueue on 2001-09-13 01:13:06 +0000
 1.4.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.5.2.10 11-Nov-2002  nathanw Catch up to -current
 1.5.2.9 17-Sep-2002  nathanw Catch up to -current.
 1.5.2.8 13-Aug-2002  nathanw Catch up to -current.
 1.5.2.7 01-Aug-2002  nathanw Catch up to -current.
 1.5.2.6 20-Jun-2002  nathanw Catch up to -current.
 1.5.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.5.2.3 11-Jan-2002  nathanw More catchup.
 1.5.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.2.1 27-Oct-2001  nathanw file conf.c was added on branch nathanw_sa on 2002-01-08 00:23:07 +0000
 1.10.2.5 30-Aug-2002  gehenna catch up with -current.
 1.10.2.4 21-Jul-2002  gehenna catch up with -current.
 1.10.2.3 16-Jul-2002  gehenna catch up with -current.
 1.10.2.2 14-Jul-2002  gehenna catch up with -current.
 1.10.2.1 16-May-2002  gehenna Bye block/character device swicth tables.
 1.6 11-Aug-2002  bjh21 Move the arm32 copystr.S from arch/arm/arm32 to arch/arm/arm and add support
for 26-bit modes (basically saving R14 when we might get a page fault).
Use it on all ARM architectures now.
 1.5 09-Aug-2002  thorpej Reduce stalls on StrongARM and XScale by waiting one insn before using
the result of a load.
 1.4 09-Aug-2002  thorpej Use ldrbt/strbt. Some other random cleanup.
 1.3 03-Mar-2002  chris branches: 1.3.6; 1.3.8;
Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.2 28-Sep-2001  chris branches: 1.2.4;
Note the alignment state of the stack. This is part of the work to get the stack 8byte aligned for ELF
 1.1 04-Mar-2001  matt branches: 1.1.2; 1.1.4; 1.1.6;
Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.1.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file copystr.S was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.1.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.4.3 13-Aug-2002  nathanw Catch up to -current.
 1.2.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.1 28-Sep-2001  nathanw file copystr.S was added on branch nathanw_sa on 2002-04-01 07:39:07 +0000
 1.3.8.1 16-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #658):
Use ldrbt/strbt, and some other cleanups.
 1.3.6.1 30-Aug-2002  gehenna catch up with -current.
 1.8 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.7 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.6 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.5 04-Dec-2017  skrll branches: 1.5.2; 1.5.4;
KNF
 1.4 13-Aug-2015  knakahara fix: Cortex delay() shorten rarely.
 1.3 08-Feb-2015  skrll RCSid police
 1.2 29-Aug-2012  matt branches: 1.2.2; 1.2.12; 1.2.16; 1.2.18;
Since the PMC cycle counter is started in cpufunc no reason to do so here.
Use curcpu()->ci_data.cpu_cc_freq and new armreg* inlines.
 1.1 19-Jun-2010  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.14; 1.1.22;
Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.1.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.14.1 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.6.1 19-Jun-2010  uebayasi file cortex_pmc.c was added on branch uebayasi-xip on 2010-08-17 06:44:01 +0000
 1.1.4.2 11-Aug-2010  yamt sync with head.
 1.1.4.1 19-Jun-2010  yamt file cortex_pmc.c was added on branch yamt-nfs-mp on 2010-08-11 22:51:39 +0000
 1.1.2.2 03-Jul-2010  rmind sync with head
 1.1.2.1 19-Jun-2010  rmind file cortex_pmc.c was added on branch rmind-uvmplock on 2010-07-03 01:19:13 +0000
 1.2.18.2 22-Sep-2015  skrll Sync with HEAD
 1.2.18.1 06-Apr-2015  skrll Sync with HEAD
 1.2.16.1 04-Sep-2015  martin Pull up following revision(s) (requested by skrll in ticket #953):
sys/arch/arm/arm32/cortex_pmc.c: revision 1.4
fix: Cortex delay() shorten rarely.
 1.2.12.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.12.1 29-Aug-2012  matt file cortex_pmc.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2.2.1 03-Dec-2017  jdolecek update from HEAD
 1.5.4.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 19-Jun-2010  matt This was renamed to cortex_pmc.c
 1.1 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.155 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.154 09-May-2024  pho kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.
 1.153 03-Mar-2022  riastradh arm: Use device_set_private for cpuN.

For cpu at fdt, nix the fdt softc -- this was leaked and never used
for anything. The device's private storage is the cpu_info.
 1.152 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.151 11-Oct-2021  rin For some classic CPUs, info->[id]cache_sets are not initialized.
Calculate and print numbers of sets in this case.
 1.150 11-Oct-2021  rin pN steppings are used for ARM926EJ-S, although only r0 seems to be available.
 1.149 23-Sep-2021  skrll Print the cache information in similar formats and arm and aarch64, e.g.

arm before
[ 1.0000000] cpu0: 32KB/64B 2-way L1 PIPT Instruction cache
[ 1.0000000] cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
[ 1.0000000] cpu0: 2304KB/64B 16-way write-through L2 PIPT Unified cache

arm after
[ 1.0000000] cpu0: L1 32KB/64B 2-way (256 set) PIPT Instruction cache
[ 1.0000000] cpu0: L1 32KB/64B 2-way (256 set) write-back-locking-C PIPT Data cache
[ 1.0000000] cpu0: L2 2304KB/64B 16-way (2304 set) write-through PIPT Unified cache

aarch64 before
[ 1.0000030] cpu1: L1 48KB/64B*256L*3W PIPT Instruction cache
[ 1.0000030] cpu1: L1 32KB/64B*256L*2W PIPT Data cache
[ 1.0000030] cpu1: L2 2048KB/64B*2048L*16W PIPT Unified cache

aarch64 after
[ 1.0000030] cpu1: L1 48KB/64B 3-way (256 set) PIPT Instruction cache
[ 1.0000030] cpu1: L1 32KB/64B 2-way (256 set) PIPT Data cache
[ 1.0000030] cpu1: L2 2048KB/64B 16-way (2048 set) PIPT Unified cache
 1.148 06-Jul-2021  skrll Assume all ARM11[37]6 r0 variants are missing ISAR and friends. This is
certainly the case for r0 variants I could find TRMs for.

PR/50596 CPU_ID_ARM1136JS r0p4 does not support feature registers
 1.147 02-Jul-2020  martin branches: 1.147.6;
Initialize ci_kfpu_spl earlier for secondary CPUs. From riastradh
 1.146 29-Jun-2020  riastradh Implement fpu_kern_enter/leave for arm32.
 1.145 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.144 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.143 22-Jan-2020  skrll #ifdef whack-a-mole for the pmap_maxproc_set functionality
 1.142 20-Jan-2020  skrll s/_ARM_ARCH_6/ARM_MMU_EXTENDED/ in the #ifdef for the recent 4k pages
change
 1.141 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.140 15-Jan-2020  mrg port the arm64 cpu topology setup for big.little to arm.

rename arm64 cpu_do_topology() to arm_cpu_do_topology() and
call it from both arm cpu_attach().

replace both aarch64_set_topology() inline code in arm
cpu_attach() with new arm_cpu_do_topology(), which is called
by the arm64 locore as well (possibly not needed, which would
allow it to become static.)

not yet tested on a real big.little armv7 system. tested
on rockpro64 and pinebook pro.
 1.139 09-Jan-2020  ad - Many small tweaks to the SMT awareness in the scheduler. It does a much
better job now at keeping all physical CPUs busy, while using the extra
threads to help out. In particular, during preempt() if we're using SMT,
try to find a better CPU to run on and teleport curlwp there.

- Change the CPU topology stuff so it can work on asymmetric systems. This
mainly entails rearranging one of the CPU lists so it makes sense in all
configurations.

- Add a parameter to cpu_topology_set() to note that a CPU is "slow", for
where there are fast CPUs and slow CPUs, like with the Rockwell RK3399.
Extend the SMT awareness to try and handle that situation too (keep fast
CPUs busy, use slow CPUs as helpers).
 1.138 09-Jan-2020  martin When attaching the first fdtbus, use the root "comptabile" (or failing that:
"model") property to set the cpu model (in userland aka sysctl hw.model).
When attaching the first cpu, do not overwrite a cpu model if it already
had been set.
 1.137 08-Jan-2020  jmcneill cpu_hatch is too late to report AP topology, do it at attach time instead
 1.136 20-Dec-2019  ad branches: 1.136.2;
Some more CPU topology stuff:

- Use cegger@'s ACPI SRAT parsing code to figure out NUMA node ID for each
CPU as it is attached.

- For scheduler experiments with SMT, flag CPUs with the lowest numbered SMT
IDs as "primaries", link back to the primaries from secondaries, and build
a circular list of CPUs in each package with identical SMT IDs.

- No need for package/core/smt/numa IDs to be anything other than a u_int.
 1.135 02-Dec-2019  ad Take the basic CPU topology information we already collect, and use it
to make circular lists of CPU siblings in the same core, and in the
same package. Nothing fancy, just enough to have a bit of fun in the
scheduler trying out different tactics.
 1.134 20-Oct-2019  jmcneill cpu_hatched_p only for MULTIPROCESSOR
 1.133 19-Oct-2019  jmcneill Increase aarch64 MAXCPUS to 256.
 1.132 29-Sep-2019  skrll aprint_debug_dev output alignment
 1.131 08-Sep-2019  tnn report A12 as A17 to the user. A12 is retcon'ed by ARM.
 1.130 07-Sep-2019  tnn Cortex A12 is marketed as A17 but has a distinct part number

observed on Rockchip RK3288
 1.129 17-Mar-2019  skrll branches: 1.129.4;
Wrap arm_cpu_marker if #ifdef MPDEBUG.

One day a9_mpsubr.S will die
 1.128 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.127 25-Jan-2019  skrll Make sure ci_{smt,core,package}_id are all filled in appropriately.

Previously the BP was missed and __SHIFTOUT wasn't used.
 1.126 03-Jan-2019  jmcneill Read mpidr and cpuid from the secondary processor itself instead of the
boot processor. While here, add Cortex-A15 r4p0 to supported list.
 1.125 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.124 02-Jan-2019  skrll Don't overwrite the setting of cpu_core_id from mpidr
 1.123 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.122 08-Oct-2018  skrll Trialing whitespace
 1.121 06-Oct-2018  skrll Use __BIT. NFC.
 1.120 15-Aug-2018  skrll KNF
 1.119 15-Aug-2018  skrll Fix includes (sys/cdefs.h then sys/param.h)
 1.118 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.117 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.116 16-Sep-2017  matt branches: 1.116.2; 1.116.4;
Add Cortex-A35 CPU ID.
 1.115 01-Jun-2017  chs branches: 1.115.6;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.114 11-Jul-2016  kiyohara Add Cortex-A9 r1.
 1.113 03-Mar-2016  skrll Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
 1.112 23-Jan-2016  christos Rename the cpu_id() define to cpu_idnum() so that it does not conflict with
dtrace and friends.
 1.111 12-Nov-2015  jmcneill change some register dumps from aprint_verbose to aprint_debug
 1.110 08-Jul-2015  skrll aprint_verbose [sa]ctlr
 1.109 05-Jun-2015  skrll Print the Revision ID regster (verbose)
 1.108 17-May-2015  matt Print out mpidr on MP systems (verbose print)
 1.107 03-Mar-2015  jmcneill cache type 12 is "write-back", from matt
 1.106 27-Nov-2014  matt branches: 1.106.2;
Add entry for Cortex-A17 r1
 1.105 01-Sep-2014  reinoud Increase the `freqbuf' buffer that holds the result of humanize_number(). Now
it prints 1600 Mhz instead of 1 Ghz.
Pitty enough humanize_number(9) doesn't do 1.6 Ghz type output.
 1.104 28-Mar-2014  matt branches: 1.104.4;
Various MP changes.
 1.103 24-Mar-2014  christos use cpu_{g,s}etmodel
 1.102 20-Mar-2014  matt Define cache type 13
 1.101 03-Mar-2014  matt Add most of the cpu_* variables to <arm/locore.h>
Add and initialize cpu_synchprim_present
 1.100 20-Feb-2014  matt Keep track of what each cache is (VIVT/VIPT/PIPT).

cpu0: 32KB/32B 2-way L1 VIPT Instruction cache
cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu0: 256KB/64B 8-way write-through L2 PIPT Unified cache
 1.99 07-Sep-2013  matt Add a machdep.hwdiv_present sysctl (cortex A7 and A15 have hwdiv instructions)
 1.98 07-Sep-2013  matt Add CPU_ID_CORTEXA7R0 entry
 1.97 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.96 12-Jun-2013  matt branches: 1.96.2;
Nuke cpu_pfr, just use the armreg_pfr?_read inlines
 1.95 12-Jun-2013  matt Use the armreg_pfr?_read inlines.
 1.94 19-May-2013  rkujawa Plug support for PJ4B into our ARM CPU infrastructure.

Obtained from Marvell, Semihalf.
 1.93 03-Feb-2013  matt Add a machdep.cpu_arch sysctl
 1.92 31-Jan-2013  matt Add simple sysctls for cpu_id, fpu_id, neon_present, simd_present,
simdex_present.
Add struct sysctls to return the isar, mmfr, pfr, and mvfr sets.
 1.91 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.90 30-Nov-2012  msaitoh Use snprintf() instead of sprintf().
 1.89 30-Nov-2012  msaitoh s/,/;/
 1.88 12-Nov-2012  skrll C99 types
 1.87 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.86 07-Sep-2012  matt branches: 1.86.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.85 29-Aug-2012  matt Use new armv7 CP15 register to print out cache types.
If the cpu_cc_freq is set, report it.
Add macros to make inlines for reading/writing co-processor registers.
 1.84 14-Aug-2012  matt Use device_t
 1.83 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.82 14-Jul-2012  matt Refresh cortex cpus
 1.81 20-May-2012  skrll Remove the ARM1156T2 bloat - it only has an MPU. Prompted by matt@
 1.80 20-May-2012  skrll Add the ARM1156T2-S
 1.79 20-May-2012  skrll Add the 'Z' to the 1176 cpu product name.

ok matt@
 1.78 10-Mar-2011  bsh branches: 1.78.4; 1.78.8; 1.78.10;
add MPCore to CPU-ID table
add branch predict bit to arm11_options
 1.77 02-Oct-2010  kiyohara branches: 1.77.2;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.76 19-Jun-2010  matt Fix cache probing on Cortex. Add missing CORTEX dependency in cpu.c
 1.75 19-Jun-2010  matt Fix c&p error.
 1.74 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.73 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.72 23-Jan-2010  mrg branches: 1.72.2; 1.72.4;
rename a local cpu_name structure member to avoid potential conflict
with <sys/cpu.h>'s.
 1.71 25-Oct-2008  matt branches: 1.71.4; 1.71.12;
Fix some missing things for CPU_ID_FA526.
 1.70 24-Oct-2008  matt Add entry for FA526.
 1.69 21-Oct-2008  matt Add Cortex cpus
 1.68 27-Apr-2008  matt branches: 1.68.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.67 15-Mar-2008  rearnsha branches: 1.67.2; 1.67.4;
VFP support.
 1.66 17-Oct-2007  garbled branches: 1.66.12; 1.66.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.65 17-May-2007  yamt branches: 1.65.10; 1.65.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.64 06-Jan-2007  christos branches: 1.64.2; 1.64.6; 1.64.8; 1.64.14;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.63 06-Jan-2007  christos From Scott Alan in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html
identify_arm_cpu() prints out a helpful message when it detects that you're
trying to run on a CPU that you didn't configure for. Unfortunately, the
check for class_option being NULL is backward, so it either won't print the
class_option, or it will try to dereference a NULL. The patch just flips the
!= NULL to be == NULL.
 1.62 15-Mar-2006  drochner branches: 1.62.10; 1.62.14;
use km_alloc to get wired kernel memory for kernel stacks
of idle processes for secondary CPUs
(affects the MULTIPROCESSOR case only - does this exist?)
(untested)
 1.61 11-Dec-2005  christos branches: 1.61.4; 1.61.6; 1.61.8; 1.61.10;
merge ktrace-lwp.
 1.60 20-Jul-2005  nonaka Added i80219.
 1.59 04-Jul-2005  bsh branches: 1.59.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.58 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.57 10-May-2005  rearnsha Add support for arm1026ej-s.
 1.56 14-Apr-2004  bsh distinguish PXA255/26x from PXA2[15]0 in CPU attach message
 1.55 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.54 26-Oct-2003  chris Fix up some unitialised variables.
 1.53 06-Sep-2003  rearnsha Support for ARM10E class devices.
 1.52 03-Sep-2003  mycroft Recognize some TI processors -- not that you'd want to use them.
 1.51 23-Jun-2003  martin branches: 1.51.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.50 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.49 29-Apr-2003  thorpej Use aprint*().
 1.48 14-Feb-2003  rjs Add CPU IDs for PXA B2 and C0 steppings.
 1.47 06-Jan-2003  wiz specified, not specifed.
 1.46 17-Nov-2002  chs change uvm_uarea_alloc() to indicate whether the returned uarea is already
backed by physical pages (ie. because it reused a previously-freed one),
so that we can skip a bunch of useless work in that case.
this fixes the underlying problem behind PR 18543, and also speeds up fork()
quite a bit (eg. 7% on my pc, 1% on my ultra2) when we get a cache hit.
 1.45 13-Oct-2002  chris branches: 1.45.2;
Fix arm kernel build breaks for non multiprocessor systems.
 1.44 13-Oct-2002  bjh21 It appears that MI code requires ci_cpuid to be the CPU number of the CPU
in question, whereas the ARM code was using it to hold the model
identification. To fix this, rename:

ci_cpuid -> ci_arm_cpuid
ci_cputype -> ci_arm_cputype (for consistency)
ci_cpurev -> ci_arm_cpurev (ditto)
ci_cpunum -> ci_cpuid

This makes top(1) give correct CPU numbers in its "STATE" column (all 0 for
now).
 1.43 12-Oct-2002  bjh21 Remember the location of each CPU's idle PCB in struct cpu_info.
Move allocation of the idle PCB from hydra.c to cpu.c and add some
extra initialisation from cpu_fork().
 1.42 01-Oct-2002  bjh21 constify various string tables.
 1.41 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.40 22-Jul-2002  briggs Handle i80200 step D0 and i80321 step B0
 1.39 10-Jul-2002  ichiro add cpu id for "PXA250/210 3rd version CPUcore".

for using many PDA/xscale-core.
 1.38 07-Jun-2002  thorpej Add the CPU ID for the 600MHz i80321 part.
 1.37 12-May-2002  ichiro branches: 1.37.2; 1.37.4;
change ICP12x0 steppings.
define CPU_IXP12X0
 1.36 10-May-2002  thorpej Add IXP1200 steppings.
 1.35 03-May-2002  thorpej Add support for the Intel PXA210 and PXA250. From Hiroyuki Bessho, PR 16617.
 1.34 02-May-2002  rjs Enable CPU_CLASS_SA1 for SA1100 and SA1110.
 1.33 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.32 27-Mar-2002  thorpej The 80321 manual lies; it does have a CPU ID distinct from the 80200.
Add that CPU ID, and add a case for it.
 1.31 26-Mar-2002  thorpej Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.30 24-Mar-2002  thorpej Cache the cpu type and cpu revision in cpu_info.
 1.29 16-Mar-2002  bjh21 Only put the CPU type into cpu_model, not the state of the control register.
Instead, print the control register state on the next line at startup.
 1.28 16-Mar-2002  bjh21 Add CPU ID for the ARM1022ES.
Also add a CPU class for ARM10E processors in general.
 1.27 11-Mar-2002  reinoud When ARMFPE wasn't enabled the `usearmfpe' flag was statically initialised
but not used resulting in a compiler error. By splitting the declaration
and the initialisation this is solved.

Better would be to not even declare the flag when ARMFPE isnt enabled but
that would just add to the #ifdef jungle.
 1.26 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.25 10-Mar-2002  bjh21 Re-work the way that FPAs are handled. If ARMFPE isn't configured, don't
even bother probing for an FPA. If ARMFPE is configured, always use it,
even if there's an FPA (since it provides the FPA support code). Move all
printfs about FPAs into armfpe_init.c.

This means I can delete the last two elements from struct _cpu, so that the
structure, and the whole of <arm/cpus.h> is redundant and can be deleted.
 1.24 10-Mar-2002  bjh21 Remove fpu_model from struct _cpu. Instead, have initialise_arm_fpe()
printf() the FPE version number itself.
 1.23 10-Mar-2002  bjh21 Add a ci_dev element to struct cpu_info, pointing to the device that
corresponds to the CPU.
 1.22 10-Mar-2002  bjh21 Kill the fpu_flags element from struct _cpu. It was only ever set to 0
anyway.
 1.21 10-Mar-2002  bjh21 Clean up inline assembler. Rather than saving R0, copying FPSR to R0,
copying it to the output register and then restoring R0, just copy the
FPSR straight to the output.
 1.20 09-Mar-2002  bjh21 Remove the cpu_model member from struct _cpu, and just use the cpu_model
variable directly. While we're at it, make cpu_model rather larger.
 1.19 09-Mar-2002  bjh21 Remove the cpu_class element from struct _cpu, and make it a local variable
in identify_arm_cpu(), since it's almost unused elsewhere.

Change the detection of bugged StrongARMs to use the cpu ID rather than the
class. This turns "almost" into "entirely".
 1.18 09-Mar-2002  bjh21 Replace cpu_id and cpu_ctrl in struct _cpu with ci_cpuid and ci_ctrl in
struct cpu_info. Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
 1.17 09-Mar-2002  bjh21 Move arm700bugcount into stuct cpu_info, and attach it in
identify_master_cpu().
 1.16 17-Feb-2002  bjh21 Our assembler handles FPA instructions fine, so don't use .word for them.
 1.15 17-Feb-2002  bjh21 ANSIfy, and othe KNF cleanup.
 1.14 27-Jan-2002  bjh21 Add revision->stepping maps for the SA-110, SA-1100 and SA-1110.
Those for the SA-1100 and SA-1110 are from Intel's documentation.
The mapping for the SA-110 is from various sources on the net, since Intel
don't seem to document it.

Also, change the layout of the maps to have four steppings per line,
so they aren't quite so unwieldy.
 1.13 24-Jan-2002  thorpej Use a table to look up stepping names. Add a generic stepping
table ("rev 0", "rev 1", etc.) and an i80200 stepping table that
has the stepping names that appear in the i80200 manuals/errata..
 1.12 29-Nov-2001  thorpej Fetch cache info from the Cache Type register on ARM7TDMI and "greater"
processors. Report this when the processor is attached.
 1.11 24-Nov-2001  thorpej Move the ARM, Ltd. floating point emulator to arch/arm.
 1.10 23-Nov-2001  thorpej Use <arm/undefined.h> instead of <machine/undefined.h>.
 1.9 06-Nov-2001  thorpej branches: 1.9.2;
Const poisoning of cpu/class names.
 1.8 06-Nov-2001  thorpej "i80200", not "80200".
 1.7 06-Nov-2001  thorpej "XScale", not "Xscale".
 1.6 18-Oct-2001  rearnsha branches: 1.6.2;
Support for ARM9.
 1.5 28-Sep-2001  chris Add extra arg to fpa_test as it should have 4 args. Also add prototypes for fpa_test and fpa_handler.
 1.4 05-Sep-2001  matt branches: 1.4.2;
Flesh XSCALE support.
 1.3 03-Jun-2001  chris branches: 1.3.2; 1.3.4;
Add support for ARM7TDMI, as provided in a patch from John Fremlin to port-arm32.

Shouldn't effect any currently in tree ports.
 1.2 13-May-2001  bjh21 Use get_bootconf_option() to find boot options, rather than home-grown
strstr()-based hacks.
 1.1 20-Apr-2001  matt branches: 1.1.2;
Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.1.2.2 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.1 20-Apr-2001  bouyer file cpu.c was added on branch thorpej_scsipi on 2001-04-23 09:41:33 +0000
 1.3.4.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.4.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.6.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.9.2.11 07-Jan-2003  thorpej Sync with HEAD.
 1.9.2.10 11-Dec-2002  thorpej Sync with HEAD.
 1.9.2.9 18-Oct-2002  nathanw Catch up to -current.
 1.9.2.8 17-Sep-2002  nathanw Catch up to -current.
 1.9.2.7 01-Aug-2002  nathanw Catch up to -current.
 1.9.2.6 20-Jun-2002  nathanw Catch up to -current.
 1.9.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.9.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.9.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.9.2.1 06-Nov-2001  nathanw file cpu.c was added on branch nathanw_sa on 2002-01-08 00:23:08 +0000
 1.37.4.2 29-Jul-2002  lukem Pull up revision 1.40 (requested by thorpej in ticket #549):
Handle i80200 step D0 and i80321 step B0
 1.37.4.1 07-Jun-2002  thorpej pullup-1-6 ticket #208:

syssrc/sys/arch/arm/arm/cpufunc.c 1.46
syssrc/sys/arch/arm/arm32/cpu.c 1.38
syssrc/sys/arch/arm/include/armreg.h 1.19

Original log message:

Add the CPU ID for the 600MHz i80321 part.
 1.37.2.4 30-Aug-2002  gehenna catch up with -current.
 1.37.2.3 16-Jul-2002  gehenna catch up with -current.
 1.37.2.2 14-Jul-2002  gehenna catch up with -current.
 1.37.2.1 19-May-2002  gehenna Remove unnecessary #include
 1.45.2.1 19-Oct-2002  bjh21 In cpu_attach(), allocate an idle PCB if the CPU doesn't already have one
(which the boot CPU won't).
 1.51.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.51.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.51.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.51.2.1 03-Aug-2004  skrll Sync with HEAD
 1.59.2.4 17-Mar-2008  yamt sync with head.
 1.59.2.3 03-Sep-2007  yamt sync with head.
 1.59.2.2 26-Feb-2007  yamt sync with head.
 1.59.2.1 21-Jun-2006  yamt sync with head.
 1.61.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.61.8.1 01-Apr-2006  yamt sync with head.
 1.61.6.1 22-Apr-2006  simonb Sync with head.
 1.61.4.1 09-Sep-2006  rpaulo sync with head
 1.62.14.2 21-Feb-2007  snj branches: 1.62.14.2.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.62.14.1 21-Feb-2007  snj Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/arm32/cpu.c: revision 1.63
From Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html
identify_arm_cpu() prints out a helpful message when it detects that
you're trying to run on a CPU that you didn't configure for.
Unfortunately, the check for class_option being NULL is backward, so it
either won't print the class_option, or it will try to dereference a
NULL. The patch just flips the != NULL to be == NULL.
 1.62.14.2.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.62.10.1 12-Jan-2007  ad Sync with head.
 1.64.14.1 22-May-2007  matt Update to HEAD.
 1.64.8.1 11-Jul-2007  mjf Sync with head.
 1.64.6.1 27-May-2007  ad Sync with head.
 1.64.2.1 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.65.12.2 23-Mar-2008  matt sync with HEAD
 1.65.12.1 28-Aug-2007  matt Add 1176 and print arm11 rev as rVpR (r0p6, r1p0).
 1.65.10.2 21-Mar-2008  chris Sync with head.
 1.65.10.1 01-Jan-2008  chris Sync with HEAD.
 1.66.16.3 17-Jan-2009  mjf Sync with HEAD.
 1.66.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.66.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.66.12.1 24-Mar-2008  keiichi sync with head.
 1.67.4.5 09-Oct-2010  yamt sync with head
 1.67.4.4 11-Aug-2010  yamt sync with head.
 1.67.4.3 11-Mar-2010  yamt sync with head
 1.67.4.2 04-May-2009  yamt sync with head.
 1.67.4.1 16-May-2008  yamt sync with head.
 1.67.2.1 18-May-2008  yamt sync with head.
 1.68.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.71.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.71.4.1 20-Jan-2013  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1841):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/
 1.72.4.3 21-Apr-2011  rmind sync with head
 1.72.4.2 05-Mar-2011  rmind sync with head
 1.72.4.1 03-Jul-2010  rmind sync with head
 1.72.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.72.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.77.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.78.10.2 08-Feb-2013  riz Pull up following revision(s) (requested by msaitoh in ticket #788):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/
 1.78.10.1 09-Aug-2012  jdc branches: 1.78.10.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.78.10.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.78.8.1 02-Jun-2012  mrg sync to latest -current.
 1.78.4.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.78.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.78.4.2 30-Oct-2012  yamt sync with head
 1.78.4.1 23-May-2012  yamt sync with head.
 1.86.2.5 03-Dec-2017  jdolecek update from HEAD
 1.86.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.86.2.3 23-Jun-2013  tls resync from head
 1.86.2.2 25-Feb-2013  tls resync with head
 1.86.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.96.2.2 18-May-2014  rmind sync with head
 1.96.2.1 28-Aug-2013  rmind sync with head
 1.104.4.2 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.104.4.1 06-Apr-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #663):
sys/arch/arm/arm32/cpu.c: revision 1.105
Increase the `freqbuf' buffer that holds the result of humanize_number(). Now
it prints 1600 Mhz instead of 1 Ghz.
Pitty enough humanize_number(9) doesn't do 1.6 Ghz type output.
 1.106.2.7 28-Aug-2017  skrll Sync with HEAD
 1.106.2.6 05-Oct-2016  skrll Sync with HEAD
 1.106.2.5 19-Mar-2016  skrll Sync with HEAD
 1.106.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.106.2.3 22-Sep-2015  skrll Sync with HEAD
 1.106.2.2 06-Jun-2015  skrll Sync with HEAD
 1.106.2.1 06-Apr-2015  skrll Sync with HEAD
 1.115.6.1 13-Dec-2017  matt Add Cortex A35
 1.116.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.116.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.116.4.1 10-Jun-2019  christos Sync with HEAD
 1.116.2.4 26-Jan-2019  pgoyette Sync with HEAD
 1.116.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.116.2.2 20-Oct-2018  pgoyette Sync with head
 1.116.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.129.4.2 09-Jan-2020  snj Pull up following revision(s) (requested by martin in ticket #614):

sys/arch/aarch64/aarch64/cpu.c: 1.32
sys/arch/arm/arm32/cpu.c: 1.138
sys/dev/fdt/fdtbus.c: 1.31

When attaching the first fdtbus, use the root "comptabile" (or failing that:
"model") property to set the cpu model (in userland aka sysctl hw.model).
When attaching the first cpu, do not overwrite a cpu model if it already
had been set.
 1.129.4.1 23-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #359):

sys/arch/aarch64/aarch64/locore.S: revision 1.42
sys/arch/aarch64/aarch64/locore.S: revision 1.43
sys/arch/aarch64/aarch64/locore.S: revision 1.44
sys/arch/arm/fdt/cpu_fdt.c: revision 1.28
sys/arch/aarch64/include/cpu.h: revision 1.14
sys/arch/aarch64/include/param.h: revision 1.12
sys/arch/arm/arm32/cpu.c: revision 1.133
sys/arch/arm/arm32/cpu.c: revision 1.134
sys/arch/arm/include/cpu.h: revision 1.101
sys/arch/arm/acpi/cpu_acpi.c: revision 1.7
sys/arch/aarch64/aarch64/cpu.c: revision 1.23
sys/arch/aarch64/aarch64/cpu.c: revision 1.24
sys/arch/aarch64/aarch64/cpu.c: revision 1.25

Increase aarch64 MAXCPUS to 256.

-

Invalidate dcache before polling AP hatched status

-

Avoid overlap between BP and last AP stack. AP stacks are now in order of
increasing address order.

Spotted by and idea from mlelstv.

-

Use separate cacheline aligned arrays for mbox and hatched as before.

-

cpu_hatched_p only for MULTIPROCESSOR
 1.136.2.3 29-Feb-2020  ad Sync with head.
 1.136.2.2 25-Jan-2020  ad Sync with head.
 1.136.2.1 17-Jan-2020  ad Sync with head.
 1.147.6.1 01-Aug-2021  thorpej Sync with HEAD.
 1.108 07-Oct-2025  skrll Retire the locore.h assembly versions of IRQ{enable,disable} in favour of
the "experimental" cpuswitch.S versions, but rename them

IRQ_{DISABLE,ENABLE}

and have them take a temporary register which is only used for < armv6.
 1.107 01-Mar-2023  riastradh arm32: Optimization: Omit needless membar when triggering softint.

When we are triggering a softint, it can't already hold any mutexes.
So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is
always done with atomic r/m/w, and we need not issue any explicit
barrier between ci->ci_curlwp = softlwp and a potential load of
mtx->mtx_owner in mutex_exit.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10
 1.106 23-Feb-2023  riastradh arm32: Add missing barriers in cpu_switchto.

Details in comments.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10
 1.105 30-May-2021  dholland branches: 1.105.12;
typo in comment
 1.104 21-Nov-2020  skrll branches: 1.104.4; 1.104.6;
Ensure that r5 contains curlwp before DO_AST_AND_RESTORE_ALIGNMENT_FAULTS
in lwp_trampoline as required by the move to make ASTs operate per-LWP
rather than per-CPU.

Thanks to martin@ for bisecting the amap corruption he was seeing and
testing this fix.
 1.103 15-Aug-2020  skrll branches: 1.103.2;
#ifdef _ARM_ARCH_7 the dmbs
 1.102 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.101 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.100 06-Jul-2020  skrll Whitespace
 1.99 03-Jul-2020  skrll KNF (sort #includes)
 1.98 11-Feb-2020  skrll G/C
 1.97 08-Jan-2020  skrll oldlwp is always non-NULL in cpu_switchto so remove the test for NULL.
 1.96 08-Jan-2020  ad Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
calling cpu_switchto(). It's not safe to let other actors mess with the
LWP (in particular l->l_cpu) while it's still context switching. This
removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead. Everything
is in cache anyway so it wasn't buying much by trying to avoid saving old
state. This means cpu_switchto() will never be called with prevlwp ==
NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.
 1.95 29-Oct-2019  joerg branches: 1.95.2;
Explicitly annotate FPU requirements for LLVM MC.

When using GCC, this annotations change the global state, but there is
no push/pop functionality for .fpu to avoid this problem. The state is
local to each inline assembler block with LLVM MC.
 1.94 13-Sep-2019  skrll Typo in comment
 1.93 22-Nov-2018  skrll branches: 1.93.4;
Typo in comment
 1.92 01-Jul-2017  skrll branches: 1.92.4; 1.92.6;
Whitespace (align comments)
 1.91 01-Jul-2017  skrll Trailing whitespace
 1.90 08-Apr-2015  matt branches: 1.90.10;
Make TPIDRPRW_IS_CURLWP work for MULTIPROCESSOR.
get curcpu() from new lwp.
don't set lwp l_cpu (already done).
Remove support for __HAVE_UNNESTED_INTRS
don't set curlwp until after we are done saving the oldlwp.
disable interrupts when setting curlwp/kernel stack pointer.
Overall, these changes simplify cpu_switchto even more.
 1.89 24-Mar-2015  skrll There is no need to save/restore l_private in softint_switch now that
cpu_switchto is fixed
 1.88 24-Mar-2015  matt Rework register usage in cpu_switchto so curcpu() is preserved across
ras_lookup. Only set vfp & tpid registers and do ras lookups if new lwp
is not LW_SYSTEM. (tested on RPI and atf tests on BPI by skrll).
 1.87 22-Mar-2015  matt Fix register usage in softint_switch. load / restore l_private across
softint_dispatch
 1.86 22-Mar-2015  matt Make sure to save the user thread point in softint_switch in case it was
set just before we got an interrupt. Otherwise if the softint blocks, the
old value would be restored and change lost.
 1.85 18-Oct-2014  snj branches: 1.85.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.84 15-Jun-2014  ozaki-r branches: 1.84.2;
Fix wrong instruction; mcr => mrc
 1.83 28-Mar-2014  matt branches: 1.83.2;
ARM_MMU_EXTENDED support.
 1.82 26-Feb-2014  matt Move pmap_recent_user to ci->ci_pmap_lastuser and
pmap_previous_active_lwp to ci->ci_lastlwp. Fix some comments.
 1.81 26-Dec-2013  joerg Replicate mcr with equivalent vms instruction.
 1.80 01-Dec-2013  joerg For load/store double, name the second register explicitly.
 1.79 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.78 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.77 27-Feb-2013  matt branches: 1.77.6;
Don't include <machine/param.h> since we should be getting that stuff from
"assym.h"
 1.76 17-Dec-2012  matt Make sure to load the FPEXC context on context switch (if there a VFP) so
that the VFP state will be what the LWP expects. (This isn't needed on
PPC or MIPS since their FPU/VEC state is reflected in the PSL/CPO_STATUS
which is handled automatically.)
 1.75 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.74 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.73 08-Nov-2012  skrll Use ENTRY_NP for lwp_trampoline
 1.72 05-Sep-2012  matt branches: 1.72.2;
After calling lwp_startup, set fp to 0 to terminate call stack.
 1.71 01-Sep-2012  matt Need to do a GET_CURCPU(r4) before invoking DO_AST_AND_RESTORE_ALIGNMENT_FAULTS
 1.70 01-Sep-2012  matt blx reg is V5, not V4T
 1.69 31-Aug-2012  skrll DO_AST_AND_RESTORE_ALIGNMENT_FAULTS needs AST_ALIGNMENT_FAULT_LOCALS
 1.68 29-Aug-2012  matt Fix typo.
 1.67 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.66 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.65 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.64 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.63 07-Apr-2011  matt branches: 1.63.4; 1.63.12;
Fetch user read-only thread and process id from l->l_private, not the pcb.
(need to g/c the pcb field formerly used for this).
 1.62 01-Feb-2011  matt include "assym.h" instead of pte.h
 1.61 14-Jan-2011  rmind branches: 1.61.2; 1.61.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.60 10-Dec-2009  rmind branches: 1.60.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.59 19-Nov-2008  matt Use IF32_bits instead of I32_bit. Only disable/irq is __HAVE_UNNESTED_IRQS
is undefined.
 1.58 27-Apr-2008  matt branches: 1.58.6; 1.58.8; 1.58.14;
Merge kernel changes in matt-armv6 to HEAD.
 1.57 20-Apr-2008  scw branches: 1.57.2;
There's really no need to switch VM contexts within cpu_switchto() as
MI code always calls pmap_deactivate/pmap_activate on context switch.

Instead, just record the last active lwp (or NULL if it exited) and
defer switching VM context to pmap_activate(). This saves an additional
function call overhead in cpu_switchto().

While here, g/c unused cpuswitch.S local .Lblock_userspace_access.
 1.56 15-Mar-2008  rearnsha branches: 1.56.2;
VFP support.
 1.55 19-Jan-2008  chris branches: 1.55.2; 1.55.6;
Optimize cpu_switchto to store the new PCB address in r7, rather than
loading it from memory in 3 places.

Also adjust ordering of a few loads to try and avoid stalling.
 1.54 19-Jan-2008  chris With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.53 13-Jan-2008  chris Take a micro-optimization from FreeBSD/arm.

When switching from SVC32->UND32 to read/write R13_und we don't need to clear
the mode bits as:
PSR_SVC32_MODE | PSR_UND32_MODE = PSR_UND32_MODE

While reading the code I also noted that interrupts are enabled for most of
the function as pmap_switch returns with interrupts in the state they are on
entry. This appears to be different to what the code after pmap_switch
expects, in that the behaviour suggests they should be disabled.

Because of this I've made the writing of R13_und explicitly disable.
interupts as part of the mode switch.

This also means that the IRQenableALL call is now redundant as the
interrupts are already enabled.

XXX: it's not clear if arm_fpe_core_changecontext should be called with
interrupts disabled.

Remove unused items: IRQdisableALL, IRQenableALL & Lcpufuncs.

Tested on cats. lmbench shows no performance change.
 1.52 12-Jan-2008  skrll Add and fix a couple of comments.
 1.51 12-Jan-2008  skrll Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
 1.50 17-Oct-2007  garbled branches: 1.50.2; 1.50.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.49 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.48 25-May-2007  skrll branches: 1.48.6; 1.48.8; 1.48.10; 1.48.12;
No need to check if oldl == newl in cpu_switchto. All the callers ensure
this is never the case.

Fixup a few comments while I'm here.
 1.47 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.46 19-Feb-2007  briggs branches: 1.46.4; 1.46.6; 1.46.12;
Get DOMAIN_CLIENT directly from arm/arm32/pte.h instead of from genassym
to avoid redefinition when both assymh and pte.h are included (as in
INTEGRATOR's intmmu.S, which uses more macros from pte.h).
 1.45 09-Feb-2007  ad branches: 1.45.2;
Merge newlock2 to head.
 1.44 13-May-2006  skrll branches: 1.44.8; 1.44.12;
Fix some more comments.
 1.43 10-May-2006  skrll Fix some comments.
 1.42 11-Dec-2005  christos branches: 1.42.4; 1.42.6; 1.42.8; 1.42.10; 1.42.12;
merge ktrace-lwp.
 1.41 15-Nov-2003  scw branches: 1.41.16;
- Add LOCKDEBUG-protected calls to sched_lock_idle() to cpu_switchto and
the idle loop. They seem to have gone AWOL sometime in the past.
Fixes port-arm/23390.
- While here, tidy up the idle loop.
- Add a cheap DIAGNOSTIC check for run queue sanity.
 1.40 04-Nov-2003  scw Fix a braino introduced in r1.37. Thanks to Tom Spindler for spotting it.
 1.39 04-Nov-2003  dsl Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.38 23-Oct-2003  scw Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop
instead.

With this change, we no longer need to save the current interrupt level
in the switchframe. This is no great loss since both cpu_switch and
cpu_switchto are always called at splsched, so the process' spl is
effectively saved somewhere in the callstack.

This fixes an evbarm problem reported by Allen Briggs:

lwp gets into sa_switch -> mi_switch with newl != NULL
when it's the last element on the runqueue, so it
hits the second bit of:
if (newl == NULL) {
retval = cpu_switch(l, NULL);
} else {
remrunqueue(newl);
cpu_switchto(l, newl);
retval = 0;
}

mi_switch calls remrunqueue() and cpu_switchto()

cpu_switchto unlocks the sched lock
cpu_switchto drops CPU priority
softclock is received
schedcpu is called from softclock
schedcpu hits the first if () {} block here:
if (l->l_priority >= PUSER) {
if (l->l_stat == LSRUN &&
(l->l_flag & L_INMEM) &&
(l->l_priority / PPQ) != (l->l_usrpri / PPQ)) {
remrunqueue(l);
l->l_priority = l->l_usrpri;
setrunqueue(l);
} else
l->l_priority = l->l_usrpri;
}

Since mi_switch has already run remrunqueue, the LWP has been
removed, but it's not been put back on any queue, so the
remrunqueue panics.
 1.37 13-Oct-2003  scw A couple of Xscale tweaks:

- Use the "clz" instruction to pick a run-queue, instead of using the
ffs-by-table-lookup method.
- Use strd instead of stmia where possible.
- Use multiple ldr instructions instead of ldmia where possible.
 1.36 23-Jun-2003  martin branches: 1.36.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.35 23-Jun-2003  chris Fix for port-arm/21962. Rather than fixing the #ifndef spl0, I removed
the test as spl0 is actually a macro for splx(0). The code now calls
splx(0)

(note building with the #ifdef fixed, caused the build to fail on a
GENERIC acorn32 kernel.)
 1.34 31-May-2003  kristerw Fix LINTSTUB comments.
 1.33 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.32 26-Apr-2003  chris Remove a strh. I don't think it's available on archv3 and it doesn't work
on acorn32's with an SA110 in them as the bus doesn't support halfword
transfers.
 1.31 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.30 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.29 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.28 19-Oct-2002  bjh21 branches: 1.28.2;
Undo recent cpu_switch register usage changes in order to decrease nathanw_sa
merge pain.
 1.27 18-Oct-2002  bjh21 The grand cpu_switch register reshuffle!

In particular, use r8 to hold the old process, and r7 for medium-term
scratch, saving r0-r3 for things we don't need saved over function
calls. This gets rid of five register-to-register MOVs.
 1.26 18-Oct-2002  bjh21 In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.25 15-Oct-2002  bjh21 Switch to using the MI C versions of setrunqueue() and remrunqueue().
GCC produces almost exactly the same instructions as the hand-assembled
versions, albeit in a different order. It even found one place where it
could shave one off. Its insistence on creating a stack frame might slow
things down marginally, but not, I think, enough to matter.
 1.24 14-Oct-2002  bjh21 Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.23 13-Oct-2002  bjh21 Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.22 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.21 09-Oct-2002  bjh21 Use ADR rather than an explicit ADD from PC.
 1.20 08-Oct-2002  bjh21 Remove an outdated register assignment comment.
 1.19 05-Oct-2002  bjh21 Minimal changes to allow a kernel with "options MULTIPROCESSOR" to compile
and boot multi-user on a single-processor machine. Many of these changes
are wildly inappropriate for actual multi-processor operation, and correcting
this will be my next task.
 1.18 31-Aug-2002  thorpej Add machine-dependent bits of RAS for arm32.
 1.17 17-Aug-2002  thorpej More local label fixups.
 1.16 17-Aug-2002  thorpej Must ... micro ... optimize!

* Save an instruction in the transition from idle to have-process-to-
switch-to, and eliminate two instructions that cause datadep-stalls
on StrongARM And XScale (one in each idle block).
* Rearrange some other instructions to avoid datadep-stalls on StrongARM
and XScale.
* Since cpu_do_powersave == 0 is by far the common case, avoid a
pipeline flush by reordering the two idle blocks.
 1.15 16-Aug-2002  thorpej * Add a new machdep.powersave sysctl, which controls the use of
the CPU's "sleep" function in the idle loop.
* Default all CPUs to not use powersave, except for the PDA processors
(SA11x0 and PXA2x0).

This significantly reduces inteterrupt latency in high-performance
applications (and was good to squeeze another ~10% out of an XScale
IOP on a Gig-E benchmark).
 1.14 15-Aug-2002  briggs * Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.13 14-Aug-2002  thorpej We only need to modify the CPSR's control field, so use cpsr_c rather
than cpsr_all.
 1.12 14-Aug-2002  chris Tweak asm to avoid a couple of stalls.
 1.11 12-Aug-2002  thorpej Rearrange the beginning of cpu_switch() slightly to reduce data-dep
stalls on StrongARM and XScale.
 1.10 12-Aug-2002  thorpej Make a slight tweak to register usage to save an instruction.
 1.9 06-Aug-2002  thorpej Rearrange the exit path so that we don't do a idcache_wbinv_all *twice*
when a process exits.
 1.8 06-Aug-2002  thorpej * Pass proc0 to switch_exit(), to make this a little more like the
nathanw_sa branch.
* In switch_exit(), set the outgoing-proc register to NULL (rather than
proc0) so that we actually use the "exiting process" optimization in
cpu_switch().
 1.7 14-May-2002  chris branches: 1.7.2;
Implement scheduler lock protocol, this fixes PR arm/10863.

Also add correct locking when freeing pages in pmap_destroy (fix from potr)

This now means that arm32 kernels can be built with LOCKDEBUG enabled. (only tested on cats though)
 1.6 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.5 29-Nov-2001  thorpej Provide a way for platforms to move away from the old RiscPC-centric
interrupt code. Garbage-collect some unused stuff.
 1.4 19-Nov-2001  chris Give the idle loop a non-profiled entry, means it appears in profile info correctly (rather than all it's time being under remrunqueue)
switch_exit only needs to take 1 parameter, it loads the value of proc0 into R1 itself
Fixup some comments to reflect the real state of things.
Tweak a couple of bits of asm to avoid a load delay.
remove excess code for setting curpcb and curproc.
 1.3 11-Nov-2001  chris branches: 1.3.2;
Correct comments for ffs algoritm (it isn't using register r0)
 1.2 16-Sep-2001  matt branches: 1.2.2;
Fix .type which uses wrong symbol name.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.4;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file cpuswitch.S was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.2.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.28 07-Jan-2003  thorpej Shave a couple of cycles off the beginning of cpu_switch().
 1.3.2.27 03-Jan-2003  thorpej Merge switch_exit() and switch_lwp_exit(), and hand-schedule the
resulting function to avoid stalls on StrongARM and XScale.
 1.3.2.26 31-Dec-2002  thorpej Rename cpu_preempt() to cpu_switchto(), and make the caller remove the
new process from its run queue before calling cpu_switchto().

While here, make a few cpu_switch() and cpu_switchto() implementations
get the outgoing LWP from the args, rather than looking at the curlwp
variable.
 1.3.2.25 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.24 18-Sep-2002  thorpej Fix cpu_switch() after RAS integration from trunk.
 1.3.2.23 17-Sep-2002  nathanw Rearrange slightly and pass p, not l, to ras_lookup().
 1.3.2.22 17-Sep-2002  nathanw Catch up to -current.
 1.3.2.21 20-Aug-2002  thorpej Check to see if the incoming LWP has the same L1 table as the
outgoing LWP. If so, then we can skip the cache purge and TTB
reload. This results in a ~40% reduction in cache purges called
from cpu_switch() in my test using two threaded applications which
communicate with each other.
 1.3.2.20 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.2.19 12-Aug-2002  thorpej Rearrange the beginning of cpu_switch() slightly to reduce data-dep
stalls on StrongARM and XScale.
 1.3.2.18 12-Aug-2002  thorpej Add the requisite calls to sched_lock_idle() and sched_unlock_idle() if
LOCKDEBUG is defined, as is done on the trunk.
 1.3.2.17 12-Aug-2002  thorpej More register usage tweaks to reduce differences with trunk.
 1.3.2.16 12-Aug-2002  thorpej Tweak register usage in cpu_switch() slightly to reduce differences
with the trunk.
 1.3.2.15 12-Aug-2002  thorpej Tweak register usage in cpu_preempt() slightly.
 1.3.2.14 12-Aug-2002  thorpej Reduce some differences with the trunk.
 1.3.2.13 06-Aug-2002  thorpej Rearrange the exit path so that we don't do a idcache_wbinv_all *twice*
when a process or lwp exits.
 1.3.2.12 06-Aug-2002  thorpej * In switch_exit()/switch_lwp_exit(), set the outgoing-lwp register to
NULL (rather than lwp0) so that we actually use the "exiting process"
optimization in cpu_switch().
* Correct some comments.
 1.3.2.11 05-Aug-2002  thorpej Fix cpu_preempt() for the __NEWINTR case.
 1.3.2.10 05-Aug-2002  thorpej Back out the changes that implement the scheduler locking protocol.
The register usage in this file is very different than on the trunk,
and so the changes made to the trunk don't really apply here.

Fix up some comments while here.
 1.3.2.9 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.3.2.8 21-Jun-2002  nathanw switch_search -> Lswitch_search in switch_exit().
 1.3.2.7 20-Jun-2002  nathanw Catch up to -current.
 1.3.2.6 11-Apr-2002  thorpej Make this compile again.
 1.3.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.4 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.3 29-Nov-2001  thorpej l_stat is an int now instead of a u_char. Pointed out by pk in a
commit message.
 1.3.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.3.2.1 11-Nov-2001  thorpej file cpuswitch.S was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.7.2.2 31-Aug-2002  gehenna catch up with -current.
 1.7.2.1 30-Aug-2002  gehenna catch up with -current.
 1.28.2.7 24-Oct-2002  bjh21 Flush the cache before reading sched_whichqs. This is entirely the wrong
way to do this, but it should work (very slowly) until I work out the
right way.
 1.28.2.6 19-Oct-2002  bjh21 Switch to the idle PCB in the idle loop.
 1.28.2.5 19-Oct-2002  bjh21 In cpu_switch and cpu_exit, use curcpu to find curproc and curpcb, rather
than assuming CPU 0. Also fix a register-shuffling botch in cpu_exit.
 1.28.2.4 19-Oct-2002  bjh21 Reshuffle register usage in cpu_exit along the lines of cpu_switch to
reduce saving and restoring of registers.
 1.28.2.3 19-Oct-2002  bjh21 Redo the following revision:
syssrc/sys/arch/arm/arm32/cpuswitch.S 1.27

Original log message:

The grand cpu_switch register reshuffle!

In particular, use r8 to hold the old process, and r7 for medium-term
scratch, saving r0-r3 for things we don't need saved over function
calls. This gets rid of five register-to-register MOVs.
 1.28.2.2 19-Oct-2002  bjh21 Re-do the following revisions, this time on a branch where they won't
interfere with the nathanw_sa merge:

syssrc/sys/arch/arm/arm32/cpuswitch.S 1.26
syssrc/sys/arch/arm/arm32/genassym.cf 1.18
syssrc/sys/arch/arm/arm32/vm_machdep.c 1.21
syssrc/sys/arch/arm/include/pcb.h 1.5

Original commit message:

In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.28.2.1 19-Oct-2002  bjh21 file cpuswitch.S was added on branch bjh21-hydra on 2002-10-19 11:59:36 +0000
 1.36.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.36.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.36.2.1 03-Aug-2004  skrll Sync with HEAD
 1.41.16.6 17-Mar-2008  yamt sync with head.
 1.41.16.5 21-Jan-2008  yamt sync with head
 1.41.16.4 27-Oct-2007  yamt sync with head.
 1.41.16.3 03-Sep-2007  yamt sync with head.
 1.41.16.2 26-Feb-2007  yamt sync with head.
 1.41.16.1 21-Jun-2006  yamt sync with head.
 1.42.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.42.10.1 11-May-2006  elad sync with head
 1.42.8.1 24-May-2006  yamt sync with head.
 1.42.6.1 01-Jun-2006  kardel Sync with head.
 1.42.4.1 09-Sep-2006  rpaulo sync with head
 1.44.12.1 04-Mar-2007  bouyer branches: 1.44.12.1.4;
Pull up following revision(s) (requested by matt in ticket #470):
sys/arch/evbarm/iq80310/iq80310_timer.c: revision 1.20
sys/arch/evbarm/ifpga/pl030_rtc.c: revision 1.8
sys/arch/evbarm/include/types.h: revision 1.7
sys/arch/arm/arm32/genassym.cf: revision 1.30
sys/arch/arm/arm32/cpuswitch.S: revision 1.46
Get DOMAIN_CLIENT directly from arm/arm32/pte.h instead of from genassym
to avoid redefinition when both assymh and pte.h are included (as in
INTEGRATOR's intmmu.S, which uses more macros from pte.h).
Convert evbarm to __HAVE_GENERIC_TODR.
 1.44.12.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.44.8.1 30-Jan-2007  ad For now always call sched_unlock_idle/sched_lock_idle. They will be
removed by yamt's cpu_switchto() changes.
 1.45.2.3 08-Apr-2007  skrll Set curlwp in cpu_switchto and provide a cpu_did_resched.

Who is copying who now?
 1.45.2.2 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.45.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.46.12.3 03-Oct-2007  garbled Sync with HEAD
 1.46.12.2 26-Jun-2007  garbled Sync with HEAD.
 1.46.12.1 22-May-2007  matt Update to HEAD.
 1.46.6.1 11-Jul-2007  mjf Sync with head.
 1.46.4.2 09-Oct-2007  ad Sync with head.
 1.46.4.1 27-May-2007  ad Sync with head.
 1.48.12.6 23-Mar-2008  matt sync with HEAD
 1.48.12.5 28-Jan-2008  matt Add fast softint switch support.
 1.48.12.4 07-Nov-2007  matt Make sure instructions are aligned after .asciz
 1.48.12.3 06-Nov-2007  matt sync with HEAD
 1.48.12.2 11-Sep-2007  matt Add a diagnostic check for cpu_switchto(x, NULL);
 1.48.12.1 29-Aug-2007  matt Reworked cpuswitch for armv6 and new world order
 1.48.10.3 21-Mar-2008  chris Sync with head.
 1.48.10.2 20-Jan-2008  chris Sync to HEAD.
 1.48.10.1 01-Jan-2008  chris Sync with HEAD.
 1.48.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.48.6.2 28-Feb-2008  rjs Sync with HEAD.
 1.48.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.50.8.2 20-Jan-2008  bouyer Sync with HEAD
 1.50.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.50.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.55.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.55.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.55.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.55.2.1 24-Mar-2008  keiichi sync with head.
 1.56.2.1 18-May-2008  yamt sync with head.
 1.57.2.3 11-Mar-2010  yamt sync with head
 1.57.2.2 04-May-2009  yamt sync with head.
 1.57.2.1 16-May-2008  yamt sync with head.
 1.58.14.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.58.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.58.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.60.4.2 21-Apr-2011  rmind sync with head
 1.60.4.1 05-Mar-2011  rmind sync with head
 1.61.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.61.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.63.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.63.4.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.63.4.3 23-Jan-2013  yamt sync with head
 1.63.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.63.4.1 30-Oct-2012  yamt sync with head
 1.72.2.5 03-Dec-2017  jdolecek update from HEAD
 1.72.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.72.2.3 23-Jun-2013  tls resync from head
 1.72.2.2 25-Feb-2013  tls resync with head
 1.72.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.77.6.2 18-May-2014  rmind sync with head
 1.77.6.1 28-Aug-2013  rmind sync with head
 1.83.2.1 10-Aug-2014  tls Rebase.
 1.84.2.1 27-Mar-2015  martin Pull up following revision(s) (requested by skrll in ticket #646):
sys/arch/arm/arm32/genassym.cf: revision 1.70
sys/arch/arm/arm32/cpuswitch.S: revision 1.86-1.89

Only set vfp & tpid registers and do ras lookups if new
lwp is not LW_SYSTEM.
 1.85.2.3 28-Aug-2017  skrll Sync with HEAD
 1.85.2.2 06-Jun-2015  skrll Sync with HEAD
 1.85.2.1 06-Apr-2015  skrll Sync with HEAD
 1.90.10.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.92.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.92.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.92.6.1 10-Jun-2019  christos Sync with HEAD
 1.92.4.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.93.4.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1676):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.95.2.2 29-Feb-2020  ad Sync with head.
 1.95.2.1 17-Jan-2020  ad Sync with head.
 1.103.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.104.6.1 31-May-2021  cjep sync with head
 1.104.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.105.12.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #264):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/riscv/riscv/cpu_switch.S: revision 1.3
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

riscv: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.66 20-Sep-2025  mrg make sure ddb_regp doesn't point to some stack variable when kdb_trap() returns

found by GCC 14.
 1.65 02-Aug-2023  skrll KNF
 1.64 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.63 03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.62 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.61 20-Jun-2020  skrll branches: 1.61.2;
KNF
 1.60 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.59 21-Jul-2019  rin Fix hand-crafted trap instruction in cpu_Debugger() for big endian.
 1.58 28-May-2018  chs branches: 1.58.2;
merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
- dtrace FBT probes can now be placed in kernel modules.
- ZFS now supports mmap().
 1.57 17-Jan-2018  skrll branches: 1.57.2;
G/C ARM32_NEW_VM_LAYOUT
 1.56 30-Jun-2017  skrll KNF. Same code before and after.
 1.55 30-Jun-2017  skrll typo in comment
 1.54 29-Oct-2014  skrll branches: 1.54.2;
Sprinkle #include "opt_multiprocessor.h"
 1.53 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.52 30-Mar-2014  skrll branches: 1.52.4;
Provide a DDB_REGS in the same way to others. Makes crash buildable.
 1.51 28-Mar-2014  matt Make ddb_registers per-cpu. All switching of CPUs (xxx doesn't work yet).
 1.50 15-Dec-2013  skrll Trailing whitespace.
 1.49 16-Feb-2012  christos branches: 1.49.2; 1.49.4;
move stuff between the two files, so db_interface contains the functions it
needs for userland programs to link.
 1.48 16-Jun-2010  jmcneill branches: 1.48.8; 1.48.12; 1.48.16;
PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.47 14-Mar-2009  dsl branches: 1.47.2; 1.47.4;
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.46 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.45 26-Mar-2008  chris branches: 1.45.4; 1.45.12; 1.45.18; 1.45.22;
Add help text to arm machine specific ddb commands.

Part of fix for port-arm/38311.
 1.44 17-Oct-2007  garbled branches: 1.44.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.43 22-Sep-2007  martin Add a new option DDB_VERBOSE_HELP that adds online help to ddb.
From Adam Hamsik.
Minor modifications by me, all bugs are probably mine.
 1.42 22-Feb-2007  thorpej branches: 1.42.4; 1.42.12; 1.42.18; 1.42.20; 1.42.22; 1.42.24;
TRUE -> true, FALSE -> false
 1.41 06-Jan-2007  christos branches: 1.41.2;
Fix branch handling in ddb. From Bucky Katz.
 1.40 05-Apr-2006  uwe branches: 1.40.8;
Define ddb_regs in db_interface.c.
Change its definion in db_machdep.h into a declaration.
 1.39 24-Dec-2005  perry branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
bare asm -> __asm
 1.38 11-Dec-2005  christos merge ktrace-lwp.
 1.37 02-Jun-2005  uwe branches: 1.37.2;
Catch up with constification.
 1.36 02-Jun-2005  he Adapt to shadowing and qualifier-cast warnings.
 1.35 07-Aug-2004  rearnsha Don't overload the unknown instruction handling for the core onto CP0.
Instead, add a seventeenth 'co-processor' specifically for the core.
Add support for ARMv5 unknown instructions in the 'NV' space.
 1.34 26-Oct-2003  chris Fix up some unitialised variables.
 1.33 25-Aug-2003  mrg make it "static long nil;" as it's used as &nil in an array wanting long *'s.
makes GCC3 happy.
 1.32 15-Jul-2003  lukem __KERNEL_RCSID()
 1.31 09-Jul-2003  thorpej Make faulting in DDB continue back in the top-level command
loop properly.
 1.30 06-Jun-2003  scw branches: 1.30.2;
Modify db_{read,write}_bytes() to do a single 16- or 32-bit read/write if
'size' is 2 or 4 respectively.
This makes reading/writing hardware registers work as expected in all cases.
 1.29 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.28 21-May-2003  bsh fix warning when KGDB is defined and DDB is not defined.
 1.27 03-May-2003  thorpej In db_write_bytes(), use kernel_text rather than KERNEL_TEXT_BASE.
 1.26 03-May-2003  thorpej Remove the non-ELF case in db_machine_init().
 1.25 29-Apr-2003  scw KERNEL_TEXT_BASE is not defined for ARM32_NEW_VM_LAYOUT.
 1.24 28-Apr-2003  briggs Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.23 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.22 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.21 13-May-2002  matt branches: 1.21.2;
Nuke local extern label_t *db_recover; it's now in <ddb/db_extern.h>
 1.20 10-Apr-2002  thorpej vm_offset_t -> vaddr_t,paddr_t
 1.19 09-Apr-2002  thorpej Use abstract names for the protection and PTE type bits in
L1 and L2 descriptors. This will allow us to support different
PTE layouts that enable the use of extensions on different
processor models.
 1.18 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.17 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.16 17-Jan-2002  thorpej Add cpwait's after TLB operations.
 1.15 17-Jan-2002  thorpej Cleanup a little, and teach db_write_text() about section mappings.
 1.14 17-Jan-2002  thorpej * db_validate_address(): Use pmap_extract().
* db_read_bytes()/db_write_bytes(): Do comparisons against the
(unsigned) size_t correctly.
 1.13 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.12 28-Nov-2001  thorpej Don't grovel interrupt-related info here; if a platform wants to
do that, let it do that in a way it can control.
 1.11 23-Nov-2001  thorpej Use <arm/undefined.h> instead of <machine/undefined.h>.
 1.10 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.9 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.8 09-Nov-2001  thorpej branches: 1.8.2;
Add some rudimentary support for ELF symbols in DDB on the ARM ports.
On platforms which load the kernel sans symbols directly from firmware
(possibly in e.g. S-Record format), call ddb_init() with empty arguments,
so that it will search any compiled in SYMTAB_SPACE. On all other platforms,
if __ELF__, also call ddb_init() with empty arguments until ELF bootloaders
which pass symbol information are ready.
 1.7 28-Jul-2001  chris branches: 1.7.4;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.6 24-Jun-2001  chs branches: 1.6.2;
remove "machine vmstat" command, since "show uvmexp" does the same thing.
 1.5 02-May-2001  bjh21 In an ELF kernel, don't try to find an a.out symbol table.
 1.4 13-Mar-2001  bjh21 Change the value of tf_pc in undefined-instruction handlers on arm32. It now
always points to the undefined instruction in question. It's up to the
handler to advance it to the next instruction if it wants execution to
continue there. This is how things have always worked on arm26.
 1.3 11-Mar-2001  bjh21 branches: 1.3.2;
Change undefined instruction handler to use a linked list for each
co-processor. This is necessary so we can have several handlers for
CP0 (used as a catch-all for non-CP instructions).

Handlers are now removed using remove_coproc_handler(), rather than by calling
install_coproc_handler() with a NULL handler.

Because install_coproc_handler() can now allocate memory, there's a version
for use at boot time that doesn't.
 1.2 04-Mar-2001  matt branches: 1.2.2;
Remove OFW hooks. Allow ports to add there own hooks via
ARM_EXTRA_DB_COMMANDS.
 1.1 04-Mar-2001  matt Move these from arm32/arm32
 1.2.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 11-Mar-2001  bouyer file db_interface.c was added on branch thorpej_scsipi on 2001-03-12 13:27:19 +0000
 1.6.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.1 03-Aug-2001  lukem update to -current
 1.7.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.8.2.9 27-Aug-2002  thorpej Sync with -current.
 1.8.2.8 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.8.2.7 20-Jun-2002  nathanw Catch up to -current.
 1.8.2.6 17-Apr-2002  nathanw Catch up to -current.
 1.8.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.8.2.4 11-Jan-2002  nathanw More catchup.
 1.8.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.8.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.8.2.1 09-Nov-2001  thorpej file db_interface.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.21.2.1 30-Aug-2002  gehenna catch up with -current.
 1.30.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.30.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.30.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.30.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.30.2.1 03-Aug-2004  skrll Sync with HEAD
 1.37.2.3 27-Oct-2007  yamt sync with head.
 1.37.2.2 26-Feb-2007  yamt sync with head.
 1.37.2.1 21-Jun-2006  yamt sync with head.
 1.39.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.39.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.39.8.1 11-Apr-2006  yamt sync with head
 1.39.6.1 22-Apr-2006  simonb Sync with head.
 1.39.4.1 09-Sep-2006  rpaulo sync with head
 1.40.8.1 12-Jan-2007  ad Sync with head.
 1.41.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.42.24.1 06-Nov-2007  matt sync with HEAD
 1.42.22.1 01-Jan-2008  chris Sync with HEAD.
 1.42.20.1 02-Oct-2007  joerg Sync with HEAD.
 1.42.18.1 06-Oct-2007  rjs Sync with HEAD.
 1.42.12.1 03-Oct-2007  garbled Sync with HEAD
 1.42.4.1 09-Oct-2007  ad Sync with head.
 1.44.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.45.22.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.45.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.45.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.45.4.2 11-Aug-2010  yamt sync with head.
 1.45.4.1 04-May-2009  yamt sync with head.
 1.47.4.1 03-Jul-2010  rmind sync with head
 1.47.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.48.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.48.12.1 18-Feb-2012  mrg merge to -current.
 1.48.8.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.48.8.1 17-Apr-2012  yamt sync with head
 1.49.4.1 18-May-2014  rmind sync with head
 1.49.2.2 03-Dec-2017  jdolecek update from HEAD
 1.49.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.52.4.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.54.2.1 28-Aug-2017  skrll Sync with HEAD
 1.57.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.58.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.61.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.39 23-Feb-2021  mrg introduce DDB_END_CMD and replace more than 20 copies of the same
list of NULLs and 0. idea from rillig@.

all touched ports built, several booted.
 1.38 03-Dec-2020  rin tlb_print_*() are used only if _ARM_ARCH_7; caught by clang -Wunused-function.
 1.37 30-Oct-2020  skrll branches: 1.37.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.36 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.35 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.34 03-Jul-2020  jmcneill Move db_reset_cmd prototype to db_machdep.h (forgot to commit this file)
 1.33 03-Jul-2020  skrll Provide a db_reset_cmd prototype
 1.32 02-Jul-2020  jmcneill Add ddb "mach reset" command for Arm ports.
 1.31 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.30 14-Apr-2020  skrll Provide a "mach cpuinfo" which displays some struct cpuinfo fields for
a/all CPUs.
 1.29 14-Apr-2020  skrll Remove unused ARM32_DB_COMMANDS
 1.28 14-Apr-2020  skrll Sort db_commands.
 1.27 25-Mar-2020  skrll branches: 1.27.2;
Simplify #ifdefs
 1.26 25-Mar-2020  skrll Trailing whitespace
 1.25 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.24 25-Apr-2017  skrll branches: 1.24.10; 1.24.12;
Dump more of the trapframe
 1.23 25-Feb-2015  joerg branches: 1.23.2;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.22 12-Oct-2014  skrll branches: 1.22.2;
Typo. s/NC/NS/
 1.21 30-Mar-2014  skrll branches: 1.21.4;
Provide a DDB_REGS in the same way to others. Makes crash buildable.
 1.20 29-Mar-2014  skrll Sprinkle #ifdef _KERNEL{,_OPT}
 1.19 28-Mar-2014  matt Make ddb_registers per-cpu. All switching of CPUs (xxx doesn't work yet).
 1.18 01-Mar-2014  matt Add support for printing the tlb on cortex a5 and a7.
 1.17 15-Dec-2013  skrll Trailing whitespace
 1.16 05-Jan-2013  christos branches: 1.16.2;
remove show panic cmd
 1.15 21-Sep-2012  matt Add a 'mach fault' command to print DFAR/DFSR/IFAR/IFSR/TTBR
 1.14 31-Aug-2012  skrll branches: 1.14.2;
Don't advertise the abt/und/irq stack pointers as accessible to crash(8)
when they're not
 1.13 16-Feb-2012  christos move stuff between the two files, so db_interface contains the functions it
needs for userland programs to link.
 1.12 14-Mar-2009  dsl branches: 1.12.12; 1.12.16; 1.12.20;
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.11 22-Feb-2007  matt branches: 1.11.48; 1.11.56; 1.11.62; 1.11.66;
Fix lossage from boolean_t -> bool and updated x86 bus_dma.
 1.10 11-Dec-2005  christos branches: 1.10.26;
merge ktrace-lwp.
 1.9 02-Jun-2005  uwe branches: 1.9.2;
Catch up with constification.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 05-Jan-2002  chris branches: 1.7.18;
Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.6 28-Nov-2001  thorpej Don't grovel interrupt-related info here; if a platform wants to
do that, let it do that in a way it can control.
 1.5 05-Sep-2001  matt branches: 1.5.6;
Don't compile SPL/INTR stuff if NEWINTR is defined.
 1.4 05-Sep-2001  matt Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.3 24-Jun-2001  chs branches: 1.3.2;
remove "machine vmstat" command, since "show uvmexp" does the same thing.
 1.2 04-Mar-2001  matt branches: 1.2.4;
Remove OFW hooks. Allow ports to add there own hooks via
ARM_EXTRA_DB_COMMANDS.
 1.1 04-Mar-2001  matt Move these from arm32/arm32
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 04-Mar-2001  bouyer file db_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.5.6.3 11-Jan-2002  nathanw More catchup.
 1.5.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.6.1 05-Sep-2001  nathanw file db_machdep.c was added on branch nathanw_sa on 2002-01-08 00:23:08 +0000
 1.7.18.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.18.1 03-Aug-2004  skrll Sync with HEAD
 1.9.2.1 26-Feb-2007  yamt sync with head.
 1.10.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.66.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.11.62.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.56.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.48.1 04-May-2009  yamt sync with head.
 1.12.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.12.16.1 18-Feb-2012  mrg merge to -current.
 1.12.12.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.12.12.3 23-Jan-2013  yamt sync with head
 1.12.12.2 30-Oct-2012  yamt sync with head
 1.12.12.1 17-Apr-2012  yamt sync with head
 1.14.2.4 03-Dec-2017  jdolecek update from HEAD
 1.14.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.2.2 25-Feb-2013  tls resync with head
 1.14.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.2.1 18-May-2014  rmind sync with head
 1.21.4.2 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.21.4.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.22.2.2 28-Aug-2017  skrll Sync with HEAD
 1.22.2.1 06-Apr-2015  skrll Sync with HEAD
 1.23.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.24.12.3 21-Apr-2020  martin Sync with HEAD
 1.24.12.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.24.12.1 10-Jun-2019  christos Sync with HEAD
 1.24.10.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.27.2.1 20-Apr-2020  bouyer Sync with HEAD
 1.37.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.37.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 11-Aug-2002  bjh21 Remove a file which was accidentally resurrected.
 1.3 09-Sep-2001  toshii branches: 1.3.4; 1.3.12;
Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.2 05-Jun-2001  bjh21 branches: 1.2.2;
Replace arm/arm32/db_trace.c and arm26/arm26/db_trace.c with a unified version
in arm/arm. This version is based on the arm26 version, and includes dumping
the contents of stack frames, with automatic determination of the save code
pointer offset.
 1.1 04-Mar-2001  matt branches: 1.1.4;
Move these from arm32/arm32
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file db_trace.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.12.1 30-Aug-2002  gehenna catch up with -current.
 1.3.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.3.4.1 09-Sep-2001  thorpej file db_trace.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.26 21-Nov-2020  skrll Sprinkle some comments about ENABLE_ALIGNMENT_FAULTS leaving curcpu in r4
and curlwp in r5
 1.25 11-Aug-2019  skrll branches: 1.25.8;
Trailing whitespace
 1.24 07-Jul-2017  chs branches: 1.24.6;
split PUSHFRAMEINSVC into two pieces so that we can insert some additional
instructions in the middle in undefinedinstruction_bounce, namely to add
some additional space on the stack before the trapframe for undefineds from
SVC mode. this extra space allows dtrace to emulate a "push" instruction.
the initial version was from me and some improvements were from nick.
 1.23 21-Jun-2015  matt Remove duplicate ASEND(undefined_entry)
 1.22 13-Mar-2014  matt branches: 1.22.6;
Add clrex when we get an abort.
Simplify undefined_entry to use the undefined stack to do transfer to the
undefined handler.
 1.21 05-Mar-2014  matt push/pop unsaved registers before using printf.
 1.20 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.19 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.18 12-Sep-2012  matt branches: 1.18.2;
Make sure the handler addresses are 32-bit aligned.
 1.17 29-Aug-2012  matt branches: 1.17.2;
Don't use locations in .data to store exception temporaries, use decidicated
space in cpu_info instead. This also moves undefined_handler_address into
cpu_info as well.
Use the new armreg* inlines for getting TPIDRPRW register.
Add MULTIPROCESSOR version of CPU_INFO_FOREACH
 1.16 27-Apr-2008  matt branches: 1.16.18; 1.16.34; 1.16.42;
Merge kernel changes in matt-armv6 to HEAD.
 1.15 19-Jan-2008  chris branches: 1.15.6; 1.15.8; 1.15.10;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.14 11-Dec-2005  christos branches: 1.14.46; 1.14.50; 1.14.52; 1.14.58; 1.14.66;
merge ktrace-lwp.
 1.13 31-Oct-2003  scw branches: 1.13.16;
Overhaul arm32's abort handlers:

- Assume a permission fault is always the result of an attempted
write, so no need to disassemble the opcode.
(as discussed with Richard Earnshaw/Jason Thorpe a week or two ago)

- Split out non-MMU data aborts into separate functions, and deal
correctly with XScale imprecise aborts. Specifically, the old code
made no attempt to handle the double abort faults which can occur
as a result of two consecutive external (imprecise) aborts. This
was easy to provoke by read(2)ing from a /dev/mem offset which caused
an external abort. With the old code, this would bring the system
down instantly, with little clue as to why. (hint: tf_spsr held
PSR_ABT32_MODE...)

- Re-write badaddr_read() to use pcb_onfault instead of adding extra
overhead to data_abort_handler(). A side effect of this is that it
now benefits from the XScale double abort recovery.

- Invoke the cpu-specific prefetch/data abort fixup routines only if
the host cpu actually needs it. On other cpus, the code is optimised
away.

- Sprinkle __predict_{false,true} in all the right places.

- G/C some excess debugging baggage.
 1.12 30-Oct-2003  scw Move the alignment fault enable/disable code into macroes to avoid
needless duplication.

Additionally, merge AST handling into the same code.

exception.S and the generic irq_dispatch.S routines have been updated
to use the macroes.

XXX: I have patches for the non-generic IRQ dispatch routines, but they
need testing by someone with hardware.
 1.11 26-Oct-2003  scw Assume that if curpcb is NULL, we're already running with alignment
faults enabled.
 1.10 25-Oct-2003  scw Skip the alignment fault enabling code if we came from SVC mode. It's
already enabled in this case.
 1.9 25-Oct-2003  scw Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.8 06-Jan-2003  wiz branches: 1.8.2;
interrupt with two rs.
 1.7 13-Oct-2002  bjh21 Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.6 15-Aug-2002  briggs * Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.5 17-Jan-2002  bjh21 branches: 1.5.8;
Separate out syscall() out into three parts:
swi_handler() does stuff that all SWIs will need, then calls
curproc->p_emul->e_syscall.
syscall() handles native NetBSD system calls.
linux_syscall() handles Linux system calls.
 1.4 14-Jan-2002  bjh21 Simplify SWI entry: syscall() now extracts the SWI comment field itself.
 1.3 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.2 28-Nov-2001  thorpej - Garbage-collect some unused cruft.
- When processing ASTs, restore interrupts *after* clearing astpending.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.8;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.8.6 07-Jan-2003  thorpej Sync with HEAD.
 1.1.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.8.1 28-Jul-2001  nathanw file exception.S was added on branch nathanw_sa on 2002-01-08 00:23:08 +0000
 1.1.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file exception.S was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.5.8.1 30-Aug-2002  gehenna catch up with -current.
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.16.1 21-Jan-2008  yamt sync with head
 1.14.66.1 20-Jan-2008  bouyer Sync with HEAD
 1.14.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.52.2 23-Mar-2008  matt sync with HEAD
 1.14.52.1 28-Aug-2007  matt #include "assym.h" first!
 1.14.50.1 20-Jan-2008  chris Sync to HEAD.
 1.14.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.15.10.1 16-May-2008  yamt sync with head.
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.16.34.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.16.34.1 30-Oct-2012  yamt sync with head
 1.16.18.2 24-Mar-2014  matt Use the improved undefined method from HEAD
 1.16.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.17.2.3 03-Dec-2017  jdolecek update from HEAD
 1.17.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.2 18-May-2014  rmind sync with head
 1.18.2.1 28-Aug-2013  rmind sync with head
 1.22.6.2 28-Aug-2017  skrll Sync with HEAD
 1.22.6.1 22-Sep-2015  skrll Sync with HEAD
 1.24.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.119 02-Feb-2024  andvar fix various typos in comments.
 1.118 06-Oct-2023  martin Fix previous and restore setting of "user" flag from trapframe.
 1.117 05-Oct-2023  ad Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.116 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.115 29-Jan-2021  skrll the last_fault_code DEBUG variable is not MP safe, so don't compile it in.
 1.114 29-Jan-2021  skrll Typo in comment
 1.113 20-Jun-2020  skrll branches: 1.113.2;
KNF
 1.112 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.111 29-Mar-2020  skrll Support PMAP_FAULTINFO on arm
 1.110 24-Feb-2020  rin 0x%#x --> %#x for non-external codes.
Also, stop mixing up 0x%x and %#x in single files as far as possible.
 1.109 29-Nov-2019  ryo branches: 1.109.2;
if Thumb-32 bit instruction located on a page boundariy, also need to consider the pc + 2 address.

Fix PR/54720. more detail and PoC are descrived in the PR.
 1.108 06-Apr-2019  thorpej branches: 1.108.4;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.107 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.106 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.105 28-Oct-2017  pgoyette branches: 1.105.2; 1.105.4;
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3) format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
but it is possible that I've missed some of them. I would be glad to
update any stragglers that anyone identifies.
 1.104 02-Jul-2017  skrll Consistency around the user trapframe for all LWPs and there's no need to
keep assigning it in kernel entry points.
 1.103 02-Mar-2015  martin branches: 1.103.10;
Handle EINVAL in the fault path and send SIGBUS for mmap acces past EOF.
 1.102 25-Oct-2014  skrll branches: 1.102.2;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.101 13-Aug-2014  matt Add __NO_FIQ to prevent testing of the PSR FIQ bit
Use VALID_R15_PSR(pc, spsr) instead of testing explicitly
 1.100 12-Apr-2014  skrll Trailing whitespace
 1.99 01-Apr-2014  matt branches: 1.99.2;
In prefetch_abort, call uvm_fault with VM_PROT_EXEC
 1.98 05-Mar-2014  matt Now that maphist is statically initialized, remove initialize tests
 1.97 05-Mar-2014  matt Only do UVMHIST_LOG is maphist have its entry buffer initialized
 1.96 26-Feb-2014  skrll Re-enable FSR_WRITE for armv6.
 1.95 25-Feb-2014  matt Only use FSR_WRITE on armv7 for now.
 1.94 25-Feb-2014  matt ARMv6+ supplied a write bit in the FSR so use instead of reading the
instruction.
 1.93 29-Jan-2014  matt Add read_insn and read_thumb_insn inlines to hide the endianness of
instructions and use them as appropriate.
 1.92 11-Jan-2014  matt Add hw.printfataltraps sysctl. Always print fatal traps for init. For all
other processes, only do so if cpu_printfataltraps is true.
 1.91 06-Nov-2013  christos sprinkle diagused
 1.90 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.89 02-Jul-2013  matt Use __func__ in UVMHIST_FUNC
 1.88 18-Feb-2013  matt branches: 1.88.2;
Supply VM_PROT_EXECUTE to pmap_fault_fixup when trying to fixup prefetch
aborts.
 1.87 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.86 12-Nov-2012  skrll C99 types
 1.85 07-Sep-2012  matt branches: 1.85.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.84 29-Aug-2012  matt Use curcpu() instead of l->l_cpu
 1.83 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.82 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.81 30-Jul-2012  matt Recognize STREX* as store instructions
 1.80 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.79 09-Feb-2012  christos branches: 1.79.4;
Cosmetic:
- add %s: __func__, function names change [most of them were wrong]
- add a DIAGNOSTIC printf to help debug alignment fixups
 1.78 20-Dec-2010  matt branches: 1.78.8; 1.78.12;
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.77 07-Jul-2010  chs implement ucas_* for arm.
 1.76 21-Mar-2010  chs assert that pcb_onfault is NULL in places where it should be.
 1.75 03-Feb-2010  wiz branches: 1.75.2; 1.75.4;
Add missing parentheses. Found by cppcheck, reported by
Henning Petersen in PR 42728.
 1.74 05-Jan-2010  mbalmer One semicolon is enough.
 1.73 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.72 19-Nov-2008  matt Conditionalize the KERN_SA bits.
 1.71 17-Oct-2008  cegger branches: 1.71.2; 1.71.8;
build fix: <sys/savar.h> is needed to make dereferencing sadata_vp compile.
A fwd declaration is enough for defining a pointer, but you need the definition to access the structure
 1.70 15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.69 14-Aug-2008  is Fixed typo in message text noticed by Ilya Dogolazky. No functional change.
 1.68 21-May-2008  ad branches: 1.68.4;
Remove unneeded playing about with kernel_lock.
 1.67 27-Apr-2008  matt branches: 1.67.2;
Merge kernel changes in matt-armv6 to HEAD.
 1.66 29-Mar-2008  chris branches: 1.66.2; 1.66.4;
Add missing bracing for some THUMB_CODE.
 1.65 06-Jan-2008  matt branches: 1.65.6;
current_intr_depth is dead. Make sure we don't use it anymore.
 1.64 18-Feb-2007  matt branches: 1.64.18; 1.64.22; 1.64.24; 1.64.30; 1.64.36;
Changes for newlock2.
 1.63 09-Feb-2007  ad branches: 1.63.2;
Merge newlock2 to head.
 1.62 23-Jul-2006  ad branches: 1.62.4;
Use the LWP cached credentials where sane.
 1.61 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.60 15-May-2006  yamt include kauth.h for kauth_cred_geteuid.
 1.59 14-May-2006  elad integrate kauth.
 1.58 16-Mar-2006  drochner branches: 1.58.2;
adjust a diagnostic printf
 1.57 16-Mar-2006  he Transform to new signature for uvm_fault() by dropping the third arg.
Discussed with drochner.
 1.56 24-Dec-2005  perry branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.55 11-Dec-2005  christos merge ktrace-lwp.
 1.54 07-Jan-2005  skrll branches: 1.54.10;
KNF
 1.53 02-Jan-2005  joff set L_SA_PAGEFAULT for prefetch aborts, too. Fixes kern/28828
 1.52 24-Oct-2004  skrll Fix the argument to KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK.
 1.51 21-Aug-2004  rearnsha Add support for prefetch and data aborts in Thumb code.
 1.50 08-Aug-2004  rearnsha Add UVMHIST tracking for data and prefetch aborts.
 1.49 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.48 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.47 26-Jan-2004  scw Make it possible to call badaddr_read() from interrupt context, even
if curpcb is NULL, by borrowing lwp0's pcb if necessary (needed to
be able to set pcb_onfault).

Problem reported by Allen Briggs.
 1.46 21-Jan-2004  skrll Leave errno as zero when we SIGSEGV. This means my CATS now passes
regress/lib/libc/siginfo/sigsegv

OK'd by christos.
 1.45 20-Nov-2003  scw In data_abort_handler(), honour pcb_onfault even in the case where
current_intr_depth > 0.
 1.44 18-Nov-2003  scw On a fatal fault, dump the trapframe's contents to the console.
This is useful when DDB is not available, or practical.
 1.43 15-Nov-2003  scw Re-instate the behaviour of sending SIGKILL to a process if uvm_fault()
returns ENOMEM. SIGSEGV just doesn't cut it. The original code looks to
have been lost in revision 1.34.
 1.42 14-Nov-2003  briggs Make sure that L_SA_PAGEFAULT gets cleared from l_flag if pmap_fault_fixup
returns non-zero and we want to shortcut out. This avoids a bogus pagefault
condition being detected in sa_switch().
Many thanks to Christian Limpach for finding this, obviating my band-aid
patch to kern_sa.c (posted on tech-kern).
 1.41 14-Nov-2003  scw - In data_abort_handler(), move the fault pc alignment check to before
the call to data_abort_fixup() as the fixup routines also try to
de-reference the fault pc.

- If a fault came from kernel mode, and the fault address looks to be in
the kernel's address space, and pcb_onfault is *set*, check the
instruction which caused the fault. If it's LDR{B,}T or STR{B,}T
then one of the copy in/out routines is trying to read/write a
kernel address with the wrong privilege. If that address is actually
mapped, we could end up in an infinite loop because we failed to
notice that it's really a 'user mode' access. Yay for "crashme".
I suspect this also fixes PR port-arm/23052.

Note: This *could* be fixed by adding sanity checks to copyin et al,
but that would add extra overhead to the non-error path...

- Fix a couple of __predict_false cases.
 1.40 14-Nov-2003  scw Since data_abort_handler() may have to decode the instruction at tf->tf_pc
to determine if a fault is read or write, make sure tf->tf_pc is 32-bit
aligned before dereferencing it.

Otherwise, deliver an illegal instruction signal to the process. We don't
support execution of Thumb code at this time.
 1.39 31-Oct-2003  scw Overhaul arm32's abort handlers:

- Assume a permission fault is always the result of an attempted
write, so no need to disassemble the opcode.
(as discussed with Richard Earnshaw/Jason Thorpe a week or two ago)

- Split out non-MMU data aborts into separate functions, and deal
correctly with XScale imprecise aborts. Specifically, the old code
made no attempt to handle the double abort faults which can occur
as a result of two consecutive external (imprecise) aborts. This
was easy to provoke by read(2)ing from a /dev/mem offset which caused
an external abort. With the old code, this would bring the system
down instantly, with little clue as to why. (hint: tf_spsr held
PSR_ABT32_MODE...)

- Re-write badaddr_read() to use pcb_onfault instead of adding extra
overhead to data_abort_handler(). A side effect of this is that it
now benefits from the XScale double abort recovery.

- Invoke the cpu-specific prefetch/data abort fixup routines only if
the host cpu actually needs it. On other cpus, the code is optimised
away.

- Sprinkle __predict_{false,true} in all the right places.

- G/C some excess debugging baggage.
 1.38 25-Oct-2003  scw Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.37 15-Oct-2003  scw Remove the #ifdef __XSCALE__ around the strd test as the instruction
is available on any v5E processor.

Pointed out by Richard Earnshaw.
 1.36 13-Oct-2003  scw Tweak the read/write data abort check to recognise Xscale's strd/ldrd
instructions.

While the original code matched "strd" just fine, it also matched
the "ldrd" instruction ...
 1.35 08-Oct-2003  thorpej * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
result of a trap. Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap. Expands to 0 if the ksiginfo_t was
not the result of a trap. This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern. Reviewed and OK's by Christos.
 1.34 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.33 19-Sep-2003  agc If we're going to reference SA variables in this file, might as well
include the header file to define them. From Steve Woodford.
 1.32 18-Sep-2003  cl add MD part of SA/pthread pagefault handling on arm
 1.31 09-Jul-2003  thorpej Make faulting in DDB continue back in the top-level command
loop properly.
 1.30 21-May-2003  thorpej branches: 1.30.2;
Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.29 28-Apr-2003  scw Fix the bug reported by Richard Earnshaw in port-arm32/21349.

Make sure to check the access permissions before doing
ref/mod/domain fixups. This is particularly important
on machines with ARM_VECTORS_LOW.
 1.28 28-Apr-2003  briggs Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.27 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.26 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.25 13-Oct-2002  bjh21 branches: 1.25.2; 1.25.4;
It appears that MI code requires ci_cpuid to be the CPU number of the CPU
in question, whereas the ARM code was using it to hold the model
identification. To fix this, rename:

ci_cpuid -> ci_arm_cpuid
ci_cputype -> ci_arm_cputype (for consistency)
ci_cpurev -> ci_arm_cpurev (ditto)
ci_cpunum -> ci_cpuid

This makes top(1) give correct CPU numbers in its "STATE" column (all 0 for
now).
 1.24 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.23 21-Sep-2002  nathanw In the fault handler, record growth of the stack, so that core dumps
actually contain the entire stack.
 1.22 14-Aug-2002  briggs G/c cowfault.
 1.21 12-Aug-2002  bjh21 __KERNEL_RCSID
 1.20 12-Aug-2002  bjh21 When pcb_onfault is set, pass the error code we get from uvm_fault()
(or EFAULT if we never called uvm_fault) to the onfault handler in R0,
in case it wants to use it.
 1.19 25-May-2002  ichiro make compile when define DEBUG
 1.18 12-Apr-2002  thorpej branches: 1.18.2; 1.18.4;
Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.17 04-Apr-2002  skrll Fix compile problem when DDB not defined.
 1.16 29-Mar-2002  thorpej Fix a printf format.
 1.15 25-Mar-2002  thorpej Garbage-collect fetchuserword(); nothing uses it any more.
 1.14 25-Mar-2002  thorpej In the Prefetch Abort handler, just do the uvm_fault() dance
directly, rather than doing a data access to fetch the page,
which meant we had to take another fault (!!).
 1.13 24-Mar-2002  thorpej Only check for SA110 bugs on SA110 CPUs with step <= K.
 1.12 24-Mar-2002  thorpej * Only check for SA110 rev K bug if we're on an SA110 (XXX should also
check stepping).
* In said check, don't use pmap_pte().
* Garbage-collect some useless debug code.
 1.11 15-Mar-2002  reinoud Serious bug fix: a userland program could panic the kernel when it tried to
issue an instruction that caused the late abort handler to be called for
wich the kernel had no support build in for.

It now only panics when it happends in kernel but otherwise signals the
process a SEGV signal.
 1.10 22-Feb-2002  thorpej When reporting there is no VM map for a fault, also report the
faulting address.
 1.9 14-Feb-2002  bjh21 Undo part of rev 1.8: SWP intructions really do both read and write
the referenced address.
 1.8 14-Feb-2002  chs allow writing to write-only mappings. fixes PR 3493.
 1.7 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.6 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.5 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.4 09-Nov-2001  thorpej branches: 1.4.2;
Print the fault PC for non-USR Prefetch Aborts.
 1.3 09-Nov-2001  thorpej Implement a badaddr_read() routine which performs a load of the
specified size for the caller, and returns true or false indicating
whether or not a Data Abort occurred (i.e. the address was "bad").
 1.2 05-Sep-2001  matt branches: 1.2.4;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 28-Jul-2001  chris branches: 1.1.2;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.2.8 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.7 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.5 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file fault.c was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.2.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.2.15 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.14 26-Sep-2002  nathanw Pull up stack-tracking fix.
 1.4.2.13 28-Aug-2002  nathanw Merge fix - G/C cowfault.
 1.4.2.12 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.4.2.11 13-Aug-2002  nathanw Catch up to -current.
 1.4.2.10 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.4.2.9 20-Jun-2002  nathanw Catch up to -current.
 1.4.2.8 17-Apr-2002  nathanw Catch up to -current.
 1.4.2.7 11-Apr-2002  thorpej Make this compile again.
 1.4.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.4 11-Jan-2002  nathanw More catchup.
 1.4.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.4.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.4.2.1 09-Nov-2001  thorpej file fault.c was added on branch nathanw_sa on 2001-11-15 06:39:21 +0000
 1.18.4.1 01-Oct-2002  lukem Pull up revision 1.23 (requested by nathanw in ticket #885):
In the fault handler, record growth of the stack, so that core dumps
actually contain the entire stack.
 1.18.2.2 30-Aug-2002  gehenna catch up with -current.
 1.18.2.1 30-May-2002  gehenna Catch up with -current.
 1.25.4.1 18-Dec-2002  gmcgarry Merge pcred and ucred, and poolify. TBD: check backward compatibility
and factor-out some higher-level functionality.
 1.25.2.2 24-Oct-2002  bjh21 Remove DEBUG check for pcb != curpcb. This can legitimately occur if
curpcb == NULL and curproc == NULL on entry. At least, I think it's
legitimate.
 1.25.2.1 19-Oct-2002  bjh21 Lock the kernel when handling page faults and undefined instructions.
 1.30.2.7 17-Jan-2005  skrll Sync with HEAD.
 1.30.2.6 02-Nov-2004  skrll Sync with HEAD.
 1.30.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.30.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.30.2.3 25-Aug-2004  skrll Sync with HEAD.
 1.30.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.30.2.1 03-Aug-2004  skrll Sync with HEAD
 1.54.10.4 21-Jan-2008  yamt sync with head
 1.54.10.3 26-Feb-2007  yamt sync with head.
 1.54.10.2 30-Dec-2006  yamt sync with head.
 1.54.10.1 21-Jun-2006  yamt sync with head.
 1.56.10.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.56.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.56.8.3 11-Aug-2006  yamt sync with head
 1.56.8.2 24-May-2006  yamt sync with head.
 1.56.8.1 01-Apr-2006  yamt sync with head.
 1.56.6.2 01-Jun-2006  kardel Sync with head.
 1.56.6.1 22-Apr-2006  simonb Sync with head.
 1.56.4.1 09-Sep-2006  rpaulo sync with head
 1.58.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.62.4.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.63.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.64.36.1 08-Jan-2008  bouyer Sync with HEAD
 1.64.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.64.24.2 09-Jan-2008  matt sync with HEAD
 1.64.24.1 28-Aug-2007  matt Update to new reality.
 1.64.22.1 20-Jan-2008  chris Sync to HEAD.
 1.64.18.1 28-Feb-2008  rjs Sync with HEAD.
 1.65.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.65.6.3 28-Sep-2008  mjf Sync with HEAD.
 1.65.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.65.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.66.4.4 11-Aug-2010  yamt sync with head.
 1.66.4.3 11-Mar-2010  yamt sync with head
 1.66.4.2 04-May-2009  yamt sync with head.
 1.66.4.1 16-May-2008  yamt sync with head.
 1.66.2.2 04-Jun-2008  yamt sync with head
 1.66.2.1 18-May-2008  yamt sync with head.
 1.67.2.4 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.67.2.3 30-Jun-2008  wrstuden Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

Adjust tests that look at LW_SA. Now, we are an upcall-generating
lwp if ((l->l_flag & LW_SA) && (~l->l_pflag & LP_SA_NOBLOCK)).

Introduce code pattern to set & remember this:

f = ~l->l_pflag & LP_SA_NOBLOCK;
l->l_pflag |= LP_SA_NOBLOCK;

...

/* f is now LP_SA_NOBLOCK if it wasn't set in l_pflag before */

l->l_pflag ^= f;

I updated a lot of the trap handlers to do trap handling iff LP_SA_NOBLOCK
is not set. I tried to figure out if the trap handler could be triggered
for user-based faults as opposed to kernel faults to user addresses, and
only look at LP_SA_NOBLOCK for the latter.

Above is a result of discussions with rmind at to reduce lock twiddling.

Also, per same discussions, add locking to sys_sa_preempt(). p_lock is
the lock we want.

Also, per same discussions, remove use of LSSUSPENDED as a thread state.
We needed to use it when we were emulating the 4.X and previous behavior
of hiding cached threads. For the moment, we now have them instead
remain visible to all and have them sleeping on the "lwpcache" wait
channel.

sa_newcachelwp(): sa_putcachelwp() wants savp_mutex held, not p_lock.

Tweak some comments.
 1.67.2.2 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.67.2.1 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.68.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.68.4.1 19-Oct-2008  haad Sync with HEAD.
 1.71.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.71.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.75.4.2 05-Mar-2011  rmind sync with head
 1.75.4.1 30-May-2010  rmind sync with head
 1.75.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.75.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.78.12.2 24-Feb-2012  mrg sync to -current.
 1.78.12.1 18-Feb-2012  mrg merge to -current.
 1.78.8.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.78.8.3 16-Jan-2013  yamt sync with (a bit old) head
 1.78.8.2 30-Oct-2012  yamt sync with head
 1.78.8.1 17-Apr-2012  yamt sync with head
 1.79.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.85.2.4 03-Dec-2017  jdolecek update from HEAD
 1.85.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.85.2.2 25-Feb-2013  tls resync with head
 1.85.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.88.2.2 18-May-2014  rmind sync with head
 1.88.2.1 28-Aug-2013  rmind sync with head
 1.99.2.1 10-Aug-2014  tls Rebase.
 1.102.2.2 28-Aug-2017  skrll Sync with HEAD
 1.102.2.1 06-Apr-2015  skrll Sync with HEAD
 1.103.10.1 02-Nov-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #335):
share/man/man9/kernhist.9: 1.5-1.8
sys/arch/acorn26/acorn26/pmap.c: 1.39
sys/arch/arm/arm32/fault.c: 1.105 via patch
sys/arch/arm/arm32/pmap.c: 1.350, 1.359
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
sys/arch/arm/omap/if_cpsw.c: 1.20
sys/arch/arm/omap/tiotg.c: 1.7
sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
sys/dev/ic/sl811hs.c: 1.98
sys/dev/usb/ehci.c: 1.256
sys/dev/usb/if_axe.c: 1.83
sys/dev/usb/motg.c: 1.18
sys/dev/usb/ohci.c: 1.274
sys/dev/usb/ucom.c: 1.119
sys/dev/usb/uhci.c: 1.277
sys/dev/usb/uhub.c: 1.137
sys/dev/usb/umass.c: 1.160-1.162
sys/dev/usb/umass_quirks.c: 1.100
sys/dev/usb/umass_scsipi.c: 1.55
sys/dev/usb/usb.c: 1.168
sys/dev/usb/usb_mem.c: 1.70
sys/dev/usb/usb_subr.c: 1.221
sys/dev/usb/usbdi.c: 1.175
sys/dev/usb/usbdi_util.c: 1.67-1.70
sys/dev/usb/usbroothub.c: 1.3
sys/dev/usb/xhci.c: 1.75
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
sys/kern/kern_history.c: 1.15
sys/kern/kern_xxx.c: 1.74
sys/kern/vfs_bio.c: 1.275-1.276
sys/miscfs/genfs/genfs_io.c: 1.71
sys/sys/kernhist.h: 1.21
sys/ufs/ffs/ffs_balloc.c: 1.63
sys/ufs/lfs/lfs_vfsops.c: 1.361
sys/ufs/lfs/ulfs_inode.c: 1.21
sys/ufs/lfs/ulfs_vnops.c: 1.52
sys/ufs/ufs/ufs_inode.c: 1.102
sys/ufs/ufs/ufs_vnops.c: 1.239
sys/uvm/pmap/pmap.c: 1.37-1.39
sys/uvm/pmap/pmap_tlb.c: 1.22
sys/uvm/uvm_amap.c: 1.108
sys/uvm/uvm_anon.c: 1.64
sys/uvm/uvm_aobj.c: 1.126
sys/uvm/uvm_bio.c: 1.91
sys/uvm/uvm_device.c: 1.66
sys/uvm/uvm_fault.c: 1.201
sys/uvm/uvm_km.c: 1.144
sys/uvm/uvm_loan.c: 1.85
sys/uvm/uvm_map.c: 1.353
sys/uvm/uvm_page.c: 1.194
sys/uvm/uvm_pager.c: 1.111
sys/uvm/uvm_pdaemon.c: 1.109
sys/uvm/uvm_swap.c: 1.175
sys/uvm/uvm_vnode.c: 1.103
usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3)
format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
but it is possible that I've missed some of them. I would be glad
to
update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes. Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one. :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.
 1.105.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.105.4.1 10-Jun-2019  christos Sync with HEAD
 1.105.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.105.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.108.4.1 08-Dec-2019  martin Pull up following revision(s) (requested by ryo in ticket #510):

sys/arch/arm/arm32/fault.c: revision 1.109

if Thumb-32 bit instruction located on a page boundariy, also need to consider the pc + 2 address.
Fix PR/54720. more detail and PoC are descrived in the PR.
 1.109.2.1 29-Feb-2020  ad Sync with head.
 1.113.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 18-Jan-2009  bjh21 Move arch/arm/arm32/fusu.S to arch/arm/arm/fusu.S in preparation for making
it usable on acorn26 as well.
 1.15 18-Jan-2009  bjh21 Now that GET_CURPCB and GET_CURCPU are generally available, use them
unconditionally rather than rolling our own (often badly) all over the
place.
 1.14 17-Jan-2009  bjh21 Clear out the vestigial support for the Simtec Hydra board. Now that we're
getting support for proper SMP ARMs, keeping non-functional support for
a seriously crippled not-really-SMP system is likely to cause more problems
than it's worth, even if it was fun for a while.
 1.13 27-Apr-2008  matt branches: 1.13.8; 1.13.16;
Merge kernel changes in matt-armv6 to HEAD.
 1.12 04-Mar-2007  christos branches: 1.12.22; 1.12.42; 1.12.44; 1.12.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 11-Dec-2005  christos branches: 1.11.26;
merge ktrace-lwp.
 1.10 01-Dec-2003  rearnsha branches: 1.10.16;
Avoid alignment faults in fusword and fuswintr. Also handle big-endian
systems in susword and suswintr.
 1.9 13-Oct-2002  bjh21 branches: 1.9.8;
Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.8 13-Oct-2002  bjh21 Use cpu_number() to find curpcb rather than assuming we're on CPU 0.
 1.7 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.6 17-Aug-2002  thorpej More local label fixups.
 1.5 15-Aug-2002  briggs * Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.4 09-Aug-2002  thorpej Use ldrt/strt.
 1.3 25-Mar-2002  thorpej branches: 1.3.2; 1.3.4;
Garbage-collect fetchuserword(); nothing uses it any more.
 1.2 02-Mar-2002  chris Remove ref to VM_MAXKERN_ADDRESS, it's not used in this file
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.8;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.8.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.1 28-Jul-2001  nathanw file fusu.S was added on branch nathanw_sa on 2002-04-01 07:39:08 +0000
 1.1.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file fusu.S was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.3.4.1 16-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #657):
Use ldrt/strt.
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.9.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.8.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.1 03-Sep-2007  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.46.2 04-May-2009  yamt sync with head.
 1.12.46.1 16-May-2008  yamt sync with head.
 1.12.44.1 18-May-2008  yamt sync with head.
 1.12.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.22.1 28-Aug-2007  matt Deal with new world order.
 1.13.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.13.8.1 03-Mar-2009  skrll Sync with HEAD.
 1.97 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.96 04-Oct-2025  skrll G/C
 1.95 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.94 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.93 08-Jul-2020  skrll Use the stack provided by armv6_start.S rather than svcstk. This saves
some bss too.
 1.92 08-Jul-2020  skrll Sort the __HAVE_* defines
 1.91 08-Jul-2020  skrll Sort include "opt_..."s
 1.90 03-Jul-2020  skrll KNF (sort includes)
 1.89 20-Mar-2020  skrll Really use armv7 noncache memory attribute for early kernel mapping and
not SO
 1.88 18-Feb-2020  skrll G/C
 1.87 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.86 14-Feb-2020  skrll Sort define CI_*. NFCI.
 1.85 29-Jan-2020  skrll G/C some more
 1.84 29-Jan-2020  skrll G/C
 1.83 08-Jan-2020  ad Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
calling cpu_switchto(). It's not safe to let other actors mess with the
LWP (in particular l->l_cpu) while it's still context switching. This
removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead. Everything
is in cache anyway so it wasn't buying much by trying to avoid saving old
state. This means cpu_switchto() will never be called with prevlwp ==
NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.
 1.82 24-Nov-2019  skrll branches: 1.82.2;
corect #include order
 1.81 23-Nov-2019  ad cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
 1.80 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.79 15-Oct-2018  skrll Group/sort struct arm_cache_info members
 1.78 27-Jun-2018  ryo branches: 1.78.2;
on evbarm/RPI,RPI2, VERBOSE_INIT_ARM had broken.

XPUTC() of evbarm/rpi/rpi*_start.S uses bcm283[567]_platform_early_putchar() and it requires stack.
fixed to allocate stack when starting from rpi*_start.S and a9_mpsubr.S if needed.

to work XPUTC(), need to define VERBOSE_INIT_ARM and EARLYCONS option.
 1.77 24-Jan-2018  skrll branches: 1.77.2;
Remove port-acorn26

OK core@
 1.76 12-Jul-2017  skrll Alignment whitespace. No functional change.
 1.75 12-Jul-2017  skrll In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all

Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.74 09-Jun-2015  skrll branches: 1.74.10;
Trailing whitespace.
 1.73 09-Jun-2015  skrll Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@
 1.72 15-Apr-2015  matt define __HAVE_PREEMPTION
 1.71 07-Apr-2015  matt __HAVE_UNNESTED_INTRS is never used.
 1.70 23-Mar-2015  matt Add L_FLAG/LW_SYSTEM
 1.69 10-Apr-2014  matt branches: 1.69.2; 1.69.4;
emit VERBOSE_INIT_ARM
 1.68 28-Mar-2014  matt branches: 1.68.2;
Add ARM_MMU_EXTENDED support.
 1.67 26-Feb-2014  matt Move pmap_recent_user to ci->ci_pmap_lastuser and
pmap_previous_active_lwp to ci->ci_lastlwp. Fix some comments.
 1.66 09-Nov-2013  jmcneill wrap opt_* includes with if defined(_KERNEL_OPT)
 1.65 18-Aug-2013  matt include <arm/locore.h>
 1.64 18-Aug-2013  matt Add more TF_* symbols
 1.63 02-Jul-2013  matt Add L2_S_SIZE
 1.62 17-Jun-2013  matt branches: 1.62.2;
Add L1_S_V6_S
 1.61 29-Apr-2013  kiyohara Add some defines for epoc32.
 1.60 17-Dec-2012  matt Add CPU_VFP_ID and PCB_VFP_FPEXC
 1.59 10-Dec-2012  matt add __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 1.58 10-Dec-2012  matt Add VFP_FPEXC_EN
 1.57 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.56 21-Oct-2012  matt Change to use symbolic constants from assym.h and fix a typo in a comment.
 1.55 21-Oct-2012  matt Implement a "fast" path for IRQ handling out of the idle loop. Since we
are in SVC32 already we only need to save a few registers. Processing is
also simplified since we know we can't return to user-mode.
 1.54 07-Sep-2012  matt branches: 1.54.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.53 01-Sep-2012  matt Add __BITS to asm.h (remove from imxuartreg.h)
Add L1_S_AP_KR to genassym.h
Use L1_S_AP_* in omap_start.S and don't include pmap.h
 1.52 31-Aug-2012  matt Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.51 29-Aug-2012  matt Don't use locations in .data to store exception temporaries, use decidicated
space in cpu_info instead. This also moves undefined_handler_address into
cpu_info as well.
Use the new armreg* inlines for getting TPIDRPRW register.
Add MULTIPROCESSOR version of CPU_INFO_FOREACH
 1.50 29-Aug-2012  matt Use ARMV6+ cpsi{d,f} instructions whenever possible. Use r7 to hold previous
mode and avoid recomputing it. Add support for obtaining kernel_lock on
exception entry and exit.
 1.49 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.48 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.47 02-Aug-2012  skrll Remove irqframe and replace with identical trapframe.
 1.46 07-Apr-2011  matt branches: 1.46.4; 1.46.12;
Fetch user read-only thread and process id from l->l_private, not the pcb.
(need to g/c the pcb field formerly used for this).
 1.45 31-Jan-2011  matt Define the L1* pte values. Now pmap.h and pte.h no longer needed in .S files.
 1.44 14-Jan-2011  rmind branches: 1.44.2; 1.44.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.43 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.42 10-Dec-2009  rmind branches: 1.42.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.41 20-Sep-2008  tsutsui branches: 1.41.12;
Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.40 07-Aug-2008  matt Do fast softint processing in DO_AST_AND_RESTORE_ALIGNMENT_FAULTS.
Redo the softint mask so ci_softints >> ci_cpl != 0 becomes an easy
test for work to be done.
 1.39 27-Apr-2008  matt branches: 1.39.2; 1.39.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.38 19-Jan-2008  chris branches: 1.38.6; 1.38.8; 1.38.10;
With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.37 08-Jan-2008  matt As of this commit, all arm32 kernel now build.
 1.36 06-Jan-2008  matt Make sure interrupt handler is updating curcpu()->ci_depth
 1.35 17-Oct-2007  garbled branches: 1.35.2; 1.35.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.34 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.33 17-May-2007  yamt branches: 1.33.6; 1.33.8; 1.33.10; 1.33.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.32 09-Mar-2007  thorpej branches: 1.32.2; 1.32.4; 1.32.10;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.31 20-Feb-2007  matt Add KERNEL_BASE
 1.30 19-Feb-2007  briggs Get DOMAIN_CLIENT directly from arm/arm32/pte.h instead of from genassym
to avoid redefinition when both assymh and pte.h are included (as in
INTEGRATOR's intmmu.S, which uses more macros from pte.h).
 1.29 27-Sep-2006  manu branches: 1.29.2; 1.29.4;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.28 11-Dec-2005  christos branches: 1.28.20; 1.28.22;
merge ktrace-lwp.
 1.27 04-Nov-2003  dsl branches: 1.27.16;
Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
 1.26 25-Oct-2003  scw Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.25 11-Sep-2003  scw Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
 1.24 22-May-2003  thorpej branches: 1.24.2;
Remove old pmap support.
 1.23 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.22 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.21 08-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.20 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 19-Oct-2002  bjh21 branches: 1.19.2;
Undo recent cpu_switch register usage changes in order to decrease nathanw_sa
merge pain.
 1.18 18-Oct-2002  bjh21 In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.17 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.16 05-Oct-2002  bjh21 Minimal changes to allow a kernel with "options MULTIPROCESSOR" to compile
and boot multi-user on a single-processor machine. Many of these changes
are wildly inappropriate for actual multi-processor operation, and correcting
this will be my next task.
 1.15 31-Aug-2002  thorpej Add machine-dependent bits of RAS for arm32.
 1.14 23-Jun-2002  thorpej Garbage-collect sigframe references.
 1.13 05-Apr-2002  thorpej branches: 1.13.2;
* Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.12 23-Mar-2002  thorpej * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.11 03-Mar-2002  chris Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.10 05-Feb-2002  thorpej Allow platforms to use an extra level of indirection for FIQs,
enabled by definining __ARM_FIQ_INDIRECT in <machine/types.h>.
This is needed for OpenFirmware systems (like the Shark), where
the OFW vector page is used, and kernel entries merely patched
into it.
 1.9 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.8 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.7 28-Nov-2001  thorpej Don't define interrupt handler-related offsets here.
 1.6 23-Nov-2001  thorpej Provide __PROG32 to assembly code.
 1.5 09-Sep-2001  toshii branches: 1.5.4;
Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.4 05-Sep-2001  matt branches: 1.4.2;
Don't compile SPL/INTR stuff if NEWINTR is defined.
 1.3 05-Sep-2001  matt Change <machine/irqhandler.h> to <machine/intr.h>. Change
{irq,fiq}handler_t to struct XXXhandler
 1.2 27-Aug-2001  chris Remove unused entries from the pcb. This is with a long term view of merging the arm26 and arm32 pcb's.
 1.1 28-Jul-2001  chris branches: 1.1.2;
finish moving common arm32 bits out into arm/arm32.
 1.1.2.8 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.7 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.6 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file genassym.cf was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.4.11 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.10 17-Sep-2002  nathanw This need L_PROC now, for the RAS code.
 1.5.4.9 17-Sep-2002  nathanw Catch up to -current.
 1.5.4.8 01-Aug-2002  nathanw Catch up to -current.
 1.5.4.7 05-Jul-2002  thorpej When delivering an upcall, arrange to have the kernel return to
the upcall directly, and use the upcall trampoline only to exit
if the upcall returns.
 1.5.4.6 17-Apr-2002  nathanw Catch up to -current.
 1.5.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.5.4.1 09-Sep-2001  thorpej file genassym.cf was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.13.2.2 31-Aug-2002  gehenna catch up with -current.
 1.13.2.1 16-Jul-2002  gehenna catch up with -current.
 1.19.2.3 24-Oct-2002  bjh21 Add CI_IDLEPCB for cpu_switch().
 1.19.2.2 19-Oct-2002  bjh21 Re-do the following revisions, this time on a branch where they won't
interfere with the nathanw_sa merge:

syssrc/sys/arch/arm/arm32/cpuswitch.S 1.26
syssrc/sys/arch/arm/arm32/genassym.cf 1.18
syssrc/sys/arch/arm/arm32/vm_machdep.c 1.21
syssrc/sys/arch/arm/include/pcb.h 1.5

Original commit message:

In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.19.2.1 19-Oct-2002  bjh21 file genassym.cf was added on branch bjh21-hydra on 2002-10-19 11:59:36 +0000
 1.24.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1 03-Aug-2004  skrll Sync with HEAD
 1.27.16.5 21-Jan-2008  yamt sync with head
 1.27.16.4 27-Oct-2007  yamt sync with head.
 1.27.16.3 03-Sep-2007  yamt sync with head.
 1.27.16.2 26-Feb-2007  yamt sync with head.
 1.27.16.1 30-Dec-2006  yamt sync with head.
 1.28.22.1 22-Oct-2006  yamt sync with head
 1.28.20.1 18-Nov-2006  ad Sync with head.
 1.29.4.4 27-Apr-2007  skrll Remove process/LWP status constants.
 1.29.4.3 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.29.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.29.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.29.2.2 04-Mar-2007  bouyer Pull up following revision(s) (requested by matt in ticket #470):
sys/arch/evbarm/iq80310/iq80310_timer.c: revision 1.20
sys/arch/evbarm/ifpga/pl030_rtc.c: revision 1.8
sys/arch/evbarm/include/types.h: revision 1.7
sys/arch/arm/arm32/genassym.cf: revision 1.30
sys/arch/arm/arm32/cpuswitch.S: revision 1.46
Get DOMAIN_CLIENT directly from arm/arm32/pte.h instead of from genassym
to avoid redefinition when both assymh and pte.h are included (as in
INTEGRATOR's intmmu.S, which uses more macros from pte.h).
Convert evbarm to __HAVE_GENERIC_TODR.
 1.29.2.1 24-Feb-2007  snj Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/arm32/genassym.cf: revision 1.31
Add KERNEL_BASE
 1.32.10.2 03-Oct-2007  garbled Sync with HEAD
 1.32.10.1 22-May-2007  matt Update to HEAD.
 1.32.4.1 11-Jul-2007  mjf Sync with head.
 1.32.2.2 09-Oct-2007  ad Sync with head.
 1.32.2.1 27-May-2007  ad Sync with head.
 1.33.12.5 23-Mar-2008  matt sync with HEAD
 1.33.12.4 28-Jan-2008  matt Add assym symbols needed for fast softint switching
 1.33.12.3 09-Jan-2008  matt sync with HEAD
 1.33.12.2 06-Nov-2007  matt sync with HEAD
 1.33.12.1 29-Aug-2007  matt Update to new world order.
 1.33.10.2 20-Jan-2008  chris Sync to HEAD.
 1.33.10.1 01-Jan-2008  chris Sync with HEAD.
 1.33.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.33.6.2 28-Feb-2008  rjs Sync with HEAD.
 1.33.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.35.8.2 20-Jan-2008  bouyer Sync with HEAD
 1.35.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.35.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.38.10.3 11-Mar-2010  yamt sync with head
 1.38.10.2 04-May-2009  yamt sync with head.
 1.38.10.1 16-May-2008  yamt sync with head.
 1.38.8.1 18-May-2008  yamt sync with head.
 1.38.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.38.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.39.6.1 19-Oct-2008  haad Sync with HEAD.
 1.39.2.2 10-Oct-2008  skrll Sync with HEAD.
 1.39.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.41.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.42.4.2 21-Apr-2011  rmind sync with head
 1.42.4.1 05-Mar-2011  rmind sync with head
 1.44.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.44.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.46.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.46.4.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.46.4.3 23-Jan-2013  yamt sync with head
 1.46.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.46.4.1 30-Oct-2012  yamt sync with head
 1.54.2.5 03-Dec-2017  jdolecek update from HEAD
 1.54.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.2.3 23-Jun-2013  tls resync from head
 1.54.2.2 25-Feb-2013  tls resync with head
 1.54.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.62.2.2 18-May-2014  rmind sync with head
 1.62.2.1 28-Aug-2013  rmind sync with head
 1.68.2.1 10-Aug-2014  tls Rebase.
 1.69.4.4 28-Aug-2017  skrll Sync with HEAD
 1.69.4.3 22-Sep-2015  skrll Sync with HEAD
 1.69.4.2 06-Jun-2015  skrll Sync with HEAD
 1.69.4.1 06-Apr-2015  skrll Sync with HEAD
 1.69.2.2 23-Jul-2017  snj Pull up following revision(s) (requested by skrll in ticket #1452):
sys/arch/arm/arm32/genassym.cf: revision 1.75
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.8
In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all
Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.69.2.1 27-Mar-2015  martin Pull up following revision(s) (requested by skrll in ticket #646):
sys/arch/arm/arm32/genassym.cf: revision 1.70
sys/arch/arm/arm32/cpuswitch.S: revision 1.86-1.89

Only set vfp & tpid registers and do ras lookups if new
lwp is not LW_SYSTEM.
 1.74.10.1 12-Jul-2017  martin Pull up following revision(s) (requested by skrll in ticket #122):
sys/arch/arm/arm32/genassym.cf: revision 1.75
sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.8
In idcache_wbinv_range if the range size is bigger than the dcache size
then call idcache_wbinv_all
Avoids a problem with large ranges as seen in
port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot
 1.77.2.2 20-Oct-2018  pgoyette Sync with head
 1.77.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.78.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.78.2.1 10-Jun-2019  christos Sync with HEAD
 1.82.2.2 29-Feb-2020  ad Sync with head.
 1.82.2.1 17-Jan-2020  ad Sync with head.
 1.36 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.35 20-Jun-2020  skrll Trailing whitespace
 1.34 01-Sep-2012  matt Rework includes and include <uvm/uvm_extern.h> for pmap.h
 1.33 27-Jul-2012  matt Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.32 20-Dec-2010  matt branches: 1.32.8; 1.32.16;
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.31 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.30 19-Nov-2008  matt branches: 1.30.6; 1.30.8;
No need to include <machine/atomic.h>
 1.29 11-Jun-2008  rafal branches: 1.29.2; 1.29.4; 1.29.10;
Let the shark boot again. Fixes port-shark/38929. While I'm here fix the
splsoft... macros to always raise the IPL (oops!).
 1.28 27-Apr-2008  matt branches: 1.28.2; 1.28.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.27 24-Feb-2008  matt branches: 1.27.2; 1.27.4;
no need to include opt_irqstats.h
 1.26 06-Jan-2008  matt branches: 1.26.2; 1.26.6;
Cleanup softint lossage.
 1.25 03-Dec-2007  ad branches: 1.25.6;
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.24 17-Oct-2007  garbled branches: 1.24.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.23 13-Aug-2007  tsutsui branches: 1.23.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.22 04-Aug-2007  tsutsui branches: 1.22.2;
Fix a typo in a debug printf message.
 1.21 09-Mar-2007  thorpej branches: 1.21.2; 1.21.8; 1.21.10; 1.21.12; 1.21.14; 1.21.16; 1.21.18;
Make ipl_t and ipl_cookie_t 8-bit values. kmutex is now down to 12 bytes
(from 20) on ARM.

Approved by Matt Thomas.
 1.20 20-Feb-2007  matt Don't double count uvmexp.softs
 1.19 20-Feb-2007  matt _setsoftintr takes a si, not a ipl, so don't map it.
Shark now boots to multiuser!
 1.18 18-Feb-2007  matt Move declaration of spl_smasks. make spl_smasks and soft_interrupts static.
 1.17 18-Feb-2007  matt Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
 1.16 18-Feb-2007  matt Map IPL_SOFTxxx to SI_SOFTxxx.
 1.15 18-Feb-2007  matt Add __HAVE_GENERIC_SOFT_INTERRUPTS support for shark. This was done by
extenting the current arm generic intrs to support softintrs. Add
IPL_SOFTCLOCK, IPL_SOFTNET, IPL_SOFTSERIAL.
 1.14 21-Dec-2006  yamt branches: 1.14.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 15-Jul-2003  lukem branches: 1.12.16;
__KERNEL_RCSID()
 1.11 16-Jun-2003  thorpej branches: 1.11.2;
Rename IPL_IMP -> IPL_VM.
 1.10 19-Oct-2002  bsh make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
 1.9 06-Sep-2002  gehenna branches: 1.9.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.8 31-Jan-2002  chris branches: 1.8.4; 1.8.8;
Fix the type of irqmasks (any reason it's even been added as an extern when it's in irqhandler.h with the correct type and array size?)
 1.7 30-Jan-2002  thorpej New interrupt framework for NetBSD/evbarm, and accompanying new
interrupt code for the IQ80310 board support package.

XXX The Integrator board support package still uses the old-style
arm32 interrupt code, so some compatibility hacks have been added
for it. When the Integrator uses new-style interrupts, those hacks
can go away.
 1.6 07-Jan-2002  chris Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
 1.5 21-Dec-2001  bjh21 Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
 1.4 26-Nov-2001  thorpej Move interrupt-related stuff out of stubs.c into intr.c.
 1.3 27-Oct-2001  rearnsha branches: 1.3.2;
Pull in machine/conf.h to find out if we have the plcom serial driver.
If so, then call plcomsoft when appropriate.
 1.2 05-Sep-2001  matt branches: 1.2.4;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 28-Jul-2001  chris branches: 1.1.2;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file intr.c was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.2.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.6 11-Nov-2002  nathanw Catch up to -current
 1.3.2.5 17-Sep-2002  nathanw Catch up to -current.
 1.3.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.3 11-Jan-2002  nathanw More catchup.
 1.3.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.2.1 27-Oct-2001  nathanw file intr.c was added on branch nathanw_sa on 2002-01-08 00:23:08 +0000
 1.8.8.1 19-May-2002  gehenna Remove unnecessary #include
 1.8.4.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.9.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.16.6 27-Feb-2008  yamt sync with head.
 1.12.16.5 21-Jan-2008  yamt sync with head
 1.12.16.4 07-Dec-2007  yamt sync with head
 1.12.16.3 03-Sep-2007  yamt sync with head.
 1.12.16.2 26-Feb-2007  yamt sync with head.
 1.12.16.1 30-Dec-2006  yamt sync with head.
 1.13.22.6 18-Dec-2006  yamt ipl_to_spl: include ipl number in panic messages.
 1.13.22.5 23-Oct-2006  yamt ipl_to_spl: add IPL_STATCLOCK.
 1.13.22.4 09-Oct-2006  yamt add missing IPL_NONE case.
 1.13.22.3 21-Sep-2006  yamt implement splraiseipl for hpcarm, shark, and acorn32.
 1.13.22.2 21-Sep-2006  yamt revert the previous which was committed unintentionally.
 1.13.22.1 21-Sep-2006  yamt *** empty log message ***
 1.13.20.1 12-Jan-2007  ad Sync with head.
 1.14.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.14.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.21.18.3 09-Dec-2007  jmcneill Sync with HEAD.
 1.21.18.2 16-Aug-2007  jmcneill Sync with HEAD.
 1.21.18.1 09-Aug-2007  jmcneill Sync with HEAD.
 1.21.16.3 28-Feb-2008  rjs Sync with HEAD.
 1.21.16.2 26-Dec-2007  rjs Sync with HEAD.
 1.21.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.21.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.21.12.1 07-Aug-2007  matt Sync with HEAD.
 1.21.10.1 03-Oct-2007  garbled Sync with HEAD
 1.21.8.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.21.2.2 03-Dec-2007  ad Sync with HEAD.
 1.21.2.1 20-Aug-2007  ad Sync with HEAD.
 1.22.2.5 21-Mar-2008  chris Sync with head.
 1.22.2.4 26-Jan-2008  chris Fix merge botch.
 1.22.2.3 20-Jan-2008  chris Sync to HEAD.
 1.22.2.2 01-Jan-2008  chris Sync with HEAD.
 1.22.2.1 18-Aug-2007  chris Sync with HEAD
 1.23.2.4 23-Mar-2008  matt sync with HEAD
 1.23.2.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.23.2.2 09-Jan-2008  matt sync with HEAD
 1.23.2.1 11-Sep-2007  matt s/current_spl_level/curcpu()->ci_cpl/
 1.24.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.24.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.25.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.26.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.26.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.26.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.26.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.26.2.1 24-Mar-2008  keiichi sync with head.
 1.27.4.3 11-Aug-2010  yamt sync with head.
 1.27.4.2 04-May-2009  yamt sync with head.
 1.27.4.1 16-May-2008  yamt sync with head.
 1.27.2.2 17-Jun-2008  yamt sync with head.
 1.27.2.1 18-May-2008  yamt 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.29.10.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.29.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.29.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.30.8.2 05-Mar-2011  rmind sync with head
 1.30.8.1 03-Jul-2010  rmind sync with head
 1.30.6.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.32.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.32.8.1 30-Oct-2012  yamt sync with head
 1.17 21-Nov-2020  skrll Sprinkle some comments about ENABLE_ALIGNMENT_FAULTS leaving curcpu in r4
and curlwp in r5
 1.16 02-Jun-2015  matt branches: 1.16.30;
Add a clrex/dmb to irq path as recommended by ARM.
 1.15 18-Aug-2013  matt branches: 1.15.6;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.14 21-Oct-2012  matt branches: 1.14.2;
Add softint processing for irq_idle_entry
 1.13 21-Oct-2012  matt Implement a "fast" path for IRQ handling out of the idle loop. Since we
are in SVC32 already we only need to save a few registers. Processing is
also simplified since we know we can't return to user-mode.
 1.12 29-Aug-2012  matt branches: 1.12.2;
Avoid using r7 (which is being reserved for a different purpose).
 1.11 28-May-2011  jakllsch branches: 1.11.4; 1.11.12;
Remove unused local variable.
Spelling fix in comment.
 1.10 27-Apr-2008  matt branches: 1.10.18; 1.10.22; 1.10.28;
Merge kernel changes in matt-armv6 to HEAD.
 1.9 06-Jan-2008  matt branches: 1.9.6; 1.9.8; 1.9.10;
Truly kill current_intr_depth once and for all.
 1.8 09-Mar-2007  thorpej branches: 1.8.8; 1.8.16; 1.8.20; 1.8.22; 1.8.28; 1.8.34;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 31-May-2005  chs branches: 1.6.2;
remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them.
 1.5 30-Oct-2003  scw Move the alignment fault enable/disable code into macroes to avoid
needless duplication.

Additionally, merge AST handling into the same code.

exception.S and the generic irq_dispatch.S routines have been updated
to use the macroes.

XXX: I have patches for the non-generic IRQ dispatch routines, but they
need testing by someone with hardware.
 1.4 26-Oct-2003  scw Assume that if curpcb is NULL, we're already running with alignment
faults enabled.
 1.3 25-Oct-2003  scw Oops, forgot to commit this along with the others...

Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.2 03-Jan-2003  thorpej branches: 1.2.2; 1.2.4;
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.1 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.2.4.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.4.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 03-Jan-2003  thorpej Sync with HEAD.
 1.2.2.1 03-Jan-2003  thorpej file irq_dispatch.S was added on branch nathanw_sa on 2003-01-03 16:41:07 +0000
 1.6.2.2 21-Jan-2008  yamt sync with head
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.34.1 08-Jan-2008  bouyer Sync with HEAD
 1.8.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.22.2 09-Jan-2008  matt sync with HEAD
 1.8.22.1 28-Aug-2007  matt Teach this about the new world order (cpu_info = r4, intr_depth in cpu_info)
 1.8.20.1 20-Jan-2008  chris Sync to HEAD.
 1.8.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.8.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.22.1 31-May-2011  rmind sync with head
 1.10.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.11.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.11.4.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.11.4.1 30-Oct-2012  yamt sync with head
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.1 28-Aug-2013  rmind sync with head
 1.15.6.1 06-Jun-2015  skrll Sync with HEAD
 1.16.30.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.10 20-Jun-2020  skrll KNF
 1.9 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.8 20-Jun-2020  skrll Trailing whitespace
 1.7 18-Oct-2009  snj Move Matthias Pfaller's files to 2-clause license. OK matthias@.
 1.6 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.5 11-Jan-2009  cegger branches: 1.5.2;
adaption for making kgdb_dev a dev_t
 1.4 24-Dec-2005  perry branches: 1.4.76; 1.4.80; 1.4.88; 1.4.96;
bare asm -> __asm
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 28-Apr-2003  briggs branches: 1.1.2;
Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.96.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.88.2 28-Apr-2009  skrll Sync with HEAD.
 1.4.88.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.80.2 11-Mar-2010  yamt sync with head
 1.4.80.1 04-May-2009  yamt sync with head.
 1.4.76.1 17-Jan-2009  mjf Sync with HEAD.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16 28-Apr-2023  skrll Pass local symbols relocations in both passes and provide the kobj_reloc
implementation visibility of these relocations.

Currently all implementations resolve local symbol relocations in the first
pass and simply skip them in the second. The RISC-V implementation will
make use of this visiblity.
 1.15 01-Dec-2020  rin Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.14 20-Jun-2020  skrll branches: 1.14.2;
KNF #includes

Remove some unnecessary ones while I'm here.
 1.13 20-Jun-2020  skrll Trailing whitespace
 1.12 03-Nov-2017  maxv Handle absolute relocations coming from the kernel: preserve SHN_ABS in
the kernel and module symbols, and when relocating a symbol that has
SHN_ABS, take its value as-is and don't return an error if it equals zero.

Sent on tech-kern@.
 1.11 11-Jul-2016  martin kobj_machdep() is now called multiple times for the same module.
Only do arm-BE8 symbol fixup when called for the text segment.
 1.10 07-Nov-2014  martin branches: 1.10.2;
PR port-arm/49299: add support for BE8 byte swapped instructions.
 1.9 27-Aug-2013  skrll branches: 1.9.4;
Minor tidyup
 1.8 27-Aug-2013  skrll Support R_ARM_REL32 and R_ARM_PREL31.

ok matt.
 1.7 09-Aug-2013  matt Use cpu_idcache_wbinv_range so we don't nuke the entire idcache.
Add a test to make sure we are only modifying movw/movt
 1.6 09-Aug-2013  matt Fix addend manipulation
 1.5 08-Aug-2013  matt Don't sync idcache/tlb when _RUMPKERNEL is defined.
 1.4 07-Aug-2013  matt Add R_ARM_V4BX, R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS
Fix R_ARM_PC24 and match R_ARM_CALL and R_ARM_JUMP24
 1.3 17-Aug-2009  dsl branches: 1.3.12; 1.3.22; 1.3.26;
Add support for R_ARM_PC24 relocations and fix R_ARM_ABS32.
Changes from PR/40309, but structure changed so there is a common error printf.
Compiles ok, but my quick kernel build failed to find module_init_md().
 1.2 28-Apr-2008  martin branches: 1.2.18;
Remove clause 3 and 4 from TNF licenses
 1.1 04-Jan-2008  ad branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.16; 1.1.18; 1.1.20; 1.1.22;
Linker bits for arm.
 1.1.22.2 19-Aug-2009  yamt sync with head.
 1.1.22.1 16-May-2008  yamt sync with head.
 1.1.20.1 18-May-2008  yamt sync with head.
 1.1.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.1.18.1 04-Jan-2008  rjs file kobj_machdep.c was added on branch hpcarm-cleanup on 2008-02-28 21:58:52 +0000
 1.1.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.10.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.10.1 04-Jan-2008  mjf file kobj_machdep.c was added on branch mjf-devfs on 2008-02-18 21:04:22 +0000
 1.1.8.2 21-Jan-2008  yamt sync with head
 1.1.8.1 04-Jan-2008  yamt file kobj_machdep.c was added on branch yamt-lazymbuf on 2008-01-21 09:35:36 +0000
 1.1.6.2 20-Jan-2008  chris Sync to HEAD.
 1.1.6.1 04-Jan-2008  chris file kobj_machdep.c was added on branch chris-arm-intr-rework on 2008-01-20 16:03:57 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 04-Jan-2008  matt file kobj_machdep.c was added on branch matt-armv6 on 2008-01-09 01:45:12 +0000
 1.1.2.2 08-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 04-Jan-2008  bouyer file kobj_machdep.c was added on branch bouyer-xeni386 on 2008-01-08 22:09:25 +0000
 1.2.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.26.1 28-Aug-2013  rmind sync with head
 1.3.22.2 03-Dec-2017  jdolecek update from HEAD
 1.3.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.12.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.9.4.1 14-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #228):
sys/arch/arm/arm32/kobj_machdep.c: revision 1.10
PR port-arm/49299: add support for BE8 byte swapped instructions.
 1.10.2.1 05-Oct-2016  skrll Sync with HEAD
 1.14.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.44 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.43 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.42 28-Aug-2020  skrll Fix typo
 1.41 08-Jul-2020  skrll Use the stack provided by armv6_start.S rather than svcstk. This saves
some bss too.
 1.40 14-Jul-2019  skrll Spell initarm correctly in comments
 1.39 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.38 14-Oct-2017  skrll branches: 1.38.2; 1.38.4;
Fix a comment
 1.37 27-Aug-2014  matt Make the initial svcstack is doubleword aligned if EABI.
 1.36 11-Apr-2014  matt branches: 1.36.2;
whitespace cleanup
 1.35 17-Dec-2013  joerg branches: 1.35.2;
Write out register pairs for strd.
 1.34 01-Dec-2013  joerg For load/store double, name the second register explicitly.
 1.33 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.32 17-Jun-2013  matt branches: 1.32.2;
If possible, use strd to clear .bss
 1.31 27-Feb-2013  matt Don't include <machine/param.h> since we should be getting that stuff from
"assym.h"
 1.30 21-Nov-2012  matt Fix missing registers (don't make then implicit).
 1.29 27-Sep-2012  matt Make sure SPSR[23:8] is set to a known valid value (taken from CPSR).
 1.28 03-Sep-2012  matt branches: 1.28.2;
Always cpu_info_store as the 3rd work unless TPIDRPRW_IS_CURLWP and then
it needs to be lwp0. Fix IGEPV2 boot problem.
 1.27 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.26 16-Aug-2012  matt Move the standard definitions of the {UND,IRQ,FIQ,ABT}_STACK_SIZE to
<arm32/machdep.h>
Move the extern for cpu_reset_address to the same file.
Add cpu_reset_address_paddr.
Kill cpu_reset_v4_MMU_disable.
if cpu_reset_address is NULL, then the MMU will be disabled.
 1.25 19-Jun-2010  matt branches: 1.25.8; 1.25.16;
Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.24 07-Aug-2008  matt branches: 1.24.12; 1.24.14; 1.24.16;
Use IF32_bits instead of I32_bit | F32_bit
 1.23 27-Apr-2008  matt branches: 1.23.2; 1.23.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.22 19-Jan-2008  chris branches: 1.22.6; 1.22.8; 1.22.10;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.21 13-Jan-2008  skrll Update a comment.
 1.20 12-Jan-2008  skrll Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
 1.19 01-Jan-2008  chris Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.18 11-Dec-2005  christos branches: 1.18.46; 1.18.50; 1.18.52; 1.18.58; 1.18.60; 1.18.66;
merge ktrace-lwp.
 1.17 10-Oct-2005  pooka foreach NOTEACHED make the comment say NOTREACHED
 1.16 19-Nov-2004  skrll branches: 1.16.12;
Fix syntax error from 1.9. I guess IPKDB isn't used very much...
 1.15 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.14 20-Apr-2003  thorpej branches: 1.14.2;
Reinstate one change from rev. 1.12, but differently. Preload r2 with
0 before frobbing the control register, and use r2 in the ARMv4 TLB
flush.
 1.13 20-Apr-2003  thorpej Back out previous. There were several problems with the patch that
was checked in:
* It was not actually disabling the MMU, and so jumping to the
reset vector would happily cause a panic(), since it would be
the kernel's reset vector, not the ROM's.
* In the event the system was using high vectors, VECRELOC was not
getting cleared, which has the potential to wreak havoc when re-entering
the ROM.
* It was totally broken for CPUs < ARMv4; you still need to disable
the MMU on those, just need to skip the ARMv4 TLB flush.
* The code that was checked in would only work if the kernel is mapped
VA==PA. For systems where the kernel is NOT mapped VA==PA, you only
get the prefetch depth # of insns (2) after the MMU is turned off before
you have fix the PC.

Backing out the change fixes rebooting on several evbarm platforms.
 1.12 26-Mar-2003  mycroft Fix multiple bugs in the way we do the v4 MMU disable -- it was blasting way
too many bits (including some reserved ones) and was writing the wrong value
for the TLB flush.
Also, if the flag is off, don't write the control register!
 1.11 19-Oct-2002  bsh make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
 1.10 15-Oct-2002  bsh branches: 1.10.2;
fix a bug sneaked into cpu_reset() in "- . - 8 purge"
(s/mov pc,lr/mov lr,pc/)
 1.9 13-Oct-2002  bjh21 Instead of "add rd, pc, #foo - . - 8", use either "adr rd, foo" or (where
appropriate) "mov lr, pc". This makes things slightly less confusing and
ugly.
 1.8 17-Aug-2002  thorpej More local label fixups.
 1.7 15-Aug-2002  briggs * Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.6 25-Apr-2002  thorpej branches: 1.6.2;
Make a comment describe what the code actually does.
 1.5 03-Apr-2002  thorpej Always provide kernel_text.
 1.4 25-Mar-2002  thorpej * Clean up some comments/whitespace.
* Don't construct a fake trap frame and pass it to main(); that hasn't
been needed for some time.
* panic if main() returns.
 1.3 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.2 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.8;
finish moving common arm32 bits out into arm/arm32.
 1.1.8.9 11-Nov-2002  nathanw Catch up to -current
 1.1.8.8 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.7 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.8.6 20-Jun-2002  nathanw Catch up to -current.
 1.1.8.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.8.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.8.1 28-Jul-2001  nathanw file locore.S was added on branch nathanw_sa on 2002-01-08 00:23:09 +0000
 1.1.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file locore.S was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.6.2.1 30-Aug-2002  gehenna catch up with -current.
 1.10.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.14.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.4 29-Nov-2004  skrll Sync with HEAD.
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.12.2 21-Jan-2008  yamt sync with head
 1.16.12.1 21-Jun-2006  yamt sync with head.
 1.18.66.3 20-Jan-2008  bouyer Sync with HEAD
 1.18.66.2 19-Jan-2008  bouyer Sync with HEAD
 1.18.66.1 02-Jan-2008  bouyer Sync with HEAD
 1.18.60.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.18.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.18.52.2 23-Mar-2008  matt sync with HEAD
 1.18.52.1 09-Jan-2008  matt sync with HEAD
 1.18.50.2 20-Jan-2008  chris Sync to HEAD.
 1.18.50.1 01-Jan-2008  chris Sync with HEAD.
 1.18.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.22.10.3 11-Aug-2010  yamt sync with head.
 1.22.10.2 04-May-2009  yamt sync with head.
 1.22.10.1 16-May-2008  yamt sync with head.
 1.22.8.1 18-May-2008  yamt sync with head.
 1.22.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.22.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.6.1 19-Oct-2008  haad Sync with HEAD.
 1.23.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.16.1 03-Jul-2010  rmind sync with head
 1.24.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.24.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.25.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.25.8.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.25.8.2 16-Jan-2013  yamt sync with (a bit old) head
 1.25.8.1 30-Oct-2012  yamt sync with head
 1.28.2.5 03-Dec-2017  jdolecek update from HEAD
 1.28.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.2.3 23-Jun-2013  tls resync from head
 1.28.2.2 25-Feb-2013  tls resync with head
 1.28.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.2.2 18-May-2014  rmind sync with head
 1.32.2.1 28-Aug-2013  rmind sync with head
 1.35.2.1 10-Aug-2014  tls Rebase.
 1.36.2.1 14-Nov-2014  martin Pull up the following revisions, requested by skrll in ticket #222:
src/sys/arch/arm/arm32/locore.S 1.37
src/sys/arch/arm/arm32/bus_dma.c 1.87

Make the initial svcstack is doubleword aligned if EABI.

With PMAP_NEED_ALLOC_POOLPAGE, before using pmap_map_poolpage make sure
the page comes from the same freelist that pmap_map_poolpage uses.
 1.38.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.38.4.1 10-Jun-2019  christos Sync with HEAD
 1.38.2.1 20-Oct-2018  pgoyette Sync with head
 1.32 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.31 08-Feb-2011  rmind branches: 1.31.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.30 12-Nov-2010  uebayasi branches: 1.30.2; 1.30.4;
Put VM_PAGE_TO_MD() definition in one place. No functional changes.
 1.29 06-Nov-2010  uebayasi Machine dependent code is considered as part of UVM. Include
internal API header.
 1.28 02-Nov-2010  uebayasi Fix build of evbarm.
 1.27 30-Oct-2010  uebayasi Use VM_PAGE_TO_MD() to locate struct vm_page_md. No functional
changes.
 1.26 19-Nov-2008  matt branches: 1.26.6; 1.26.8;
Allocate /dev/mem's page in pmap_init. Mark /dev/mem as MPSAFE. Ansify.
 1.25 18-Nov-2008  nonaka enable _DEV_ZERO_oARM case, when only COMPAT_16 defined.
 1.24 15-Nov-2008  ad Remove compat ifdef.
 1.23 04-Nov-2008  matt Just move the mutex ops into the DEV_MEM case.
 1.22 04-Nov-2008  matt Use a mutex to control access DEV_MEM.
 1.21 07-Aug-2008  matt branches: 1.21.2; 1.21.8;
Now that pmap allocates ncolors for memhook, use them to properly memory.
 1.20 01-Jan-2008  chris branches: 1.20.6; 1.20.10; 1.20.12; 1.20.16;
Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.19 04-Mar-2007  christos branches: 1.19.16; 1.19.20; 1.19.22; 1.19.28; 1.19.34;
fix caddr_t fallout.
 1.18 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 26-Dec-2006  elad branches: 1.17.2;
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.16 22-Dec-2006  elad Add requests indicating access to unmanaged memory for arm, pc532, powerpc,
sh3, sh5, and vax, and use them instead of KAUTH_GENERIC_ISSUSER.

Update documentation and example secmodel code.
 1.15 25-Jul-2006  elad branches: 1.15.4; 1.15.8;
typo; from Arnaud Lacombe, thanks!
 1.14 23-Jul-2006  ad Use the LWP cached credentials where sane.
 1.13 14-May-2006  elad integrate kauth.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11 16-Oct-2003  jdolecek branches: 1.11.16;
switch ARM to use same minor for /dev/zero as other archs
as discussed on tech-arm@
 1.10 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.9 01-Apr-2003  thorpej branches: 1.9.2;
Use PAGE_SIZE rather than NBPG.
 1.8 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.7 06-Sep-2002  gehenna branches: 1.7.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.6 24-Mar-2002  thorpej branches: 1.6.2;
* arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.5 27-Feb-2002  christos - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
 1.4 05-Jan-2002  chris include <arm/conf.h> for prototypes.
Correct args to mmopen and mmclose.
Add RCSID line.
 1.3 05-Jan-2002  chris Update mem device to bring it into line with a change in version 1.32 of i386/mem.c. Appears that we may move uio twice.
Original i386 log message:
Optimize the case of writing to /dev/zero, and clean up the
surrounding code a bit. Partly suggested by gwr.

I think this needs to be applied to arm26 as well.
 1.2 10-Sep-2001  chris branches: 1.2.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.4;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.4.2 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.5 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file mem.c was added on branch kqueue on 2001-08-03 04:10:58 +0000
 1.2.4.8 11-Nov-2002  nathanw Catch up to -current
 1.2.4.7 17-Sep-2002  nathanw Catch up to -current.
 1.2.4.6 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.2.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.3 11-Jan-2002  nathanw More catchup.
 1.2.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.2.4.1 10-Sep-2001  thorpej file mem.c was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.6.2.1 17-May-2002  gehenna Add the character device switch.
 1.7.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.4 21-Jan-2008  yamt sync with head
 1.11.16.3 03-Sep-2007  yamt sync with head.
 1.11.16.2 30-Dec-2006  yamt sync with head.
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.3 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.12.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.12.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.12.8.2 11-Aug-2006  yamt sync with head
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.1 01-Jun-2006  kardel Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.15.8.1 06-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #316):
share/examples/secmodel/secmodel_example.c: revision 1.10 via patch
sys/arch/i386/i386/sys_machdep.c: revision 1.79
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.31
share/man/man9/secmodel_bsd44.9: revision 1.9
sys/arch/vax/vax/mem.c: revision 1.34 via patch
sys/arch/sh3/sh3/mem.c: revision 1.23 via patch
sys/arch/sh5/sh5/mem.c: revision 1.14 via patch
sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.22 via patch
sys/arch/powerpc/powerpc/mem.c: revision 1.27 via patch
sys/arch/x86/x86/x86_machdep.c: revision 1.5
sys/arch/alpha/alpha/machdep.c: revision 1.291
sys/arch/arm/arm32/mem.c: revision 1.17 via patch
sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.20
sys/sys/kauth.h: revision 1.29 via patch
sys/arch/amd64/amd64/sys_machdep.c: revision 1.10
share/man/man9/kauth.9: revision 1.43 via patch
sys/arch/xen/i386/sys_machdep.c: revision 1.10
sys/kern/kern_auth.c: revision 1.35
sys/arch/pc532/pc532/mem.c: revision 1.43 via patch
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.15.4.1 12-Jan-2007  ad Sync with head.
 1.17.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.19.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.19.22.1 09-Jan-2008  matt sync with HEAD
 1.19.20.1 01-Jan-2008  chris Sync with HEAD.
 1.19.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.20.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.20.16.1 19-Oct-2008  haad Sync with HEAD.
 1.20.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.10.1 04-May-2009  yamt sync with head.
 1.20.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.20.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.20.6.1 29-Mar-2008  mjf - etc/devfsd.conf: Add some rules to give nodes like /dev/tty and
/dev/null better default modes, i.e. 0666.

- sbin/init: Run devfsd -s before going to multiuser.

- sys/arch: Provide arm32, i386, sparc with a mem_init() function to request
device nodes for /dev/null, /dev/zero, etc.

- sys/dev: Convert rnd, wd, agp, raid, cd, sd, wsdisplay, wskbd, wsmouse,
wsmux, tty, bpf, swap to devfs New World Order.

- sys/fs/devfs: Make the visibility attribute of device nodes configurable.
Also provide a function to mount a devfs on boot.

- sys/kern: Add a new boot flag, -n. This disables devfs support. Unless
the -n flag is specified the kernel will mount a devfs file
system on boot.
 1.21.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.21.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.26.8.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.26.6.8 15-Nov-2010  uebayasi Revert xmd(4).
 1.26.6.7 06-Nov-2010  uebayasi Sync with HEAD.
 1.26.6.6 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.26.6.5 07-Jul-2010  uebayasi Clean up; merge options DIRECT_PAGE into options XIP.
 1.26.6.4 31-May-2010  uebayasi Re-define the definition of "device page"; device pages are pages of
device memory. Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.
 1.26.6.3 25-Feb-2010  uebayasi A few more VM_PAGE_TO_MD().
 1.26.6.2 25-Feb-2010  uebayasi pg->mdpage -> VM_PAGE_TO_MD(pg)
 1.26.6.1 10-Feb-2010  uebayasi Missing bits of pmap_is_page_colored_p() conversion.
 1.30.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.30.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.31.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.11 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.10 20-Jun-2020  skrll Trailing whitespace
 1.9 13-Nov-2019  pgoyette Clean-up unnecessary inclusions of opt_coredump.h
 1.8 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.7 26-Nov-2015  martin branches: 1.7.16; 1.7.18;
We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.
 1.6 05-May-2014  skrll branches: 1.6.4;
Fill in netbsd32_vm_default_addr, and provide

- compat_13_netbsd32_sigreturn, and
- compat_16_netbsd32___sigreturn14
 1.5 28-Jan-2014  martin branches: 1.5.2; 1.5.4;
Simplify netbsd32_vm_default_addr (for now) to make it compilable.
 1.4 26-Jan-2014  christos whitespace
 1.3 25-Jan-2014  christos use the topdown hint.
 1.2 01-Jan-2014  dsl Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
 1.1 03-Aug-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 03-Aug-2012  matt file netbsd32_machdep.c was added on branch matt-nb6-plus on 2012-11-28 22:40:19 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 03-Aug-2012  yamt file netbsd32_machdep.c was added on branch yamt-pagecache on 2012-10-30 17:18:57 +0000
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 10-Aug-2014  tls Rebase.
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 28-Jan-2014  matt file netbsd32_machdep.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.6.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.18.1 10-Jun-2019  christos Sync with HEAD
 1.7.16.2 27-Sep-2018  pgoyette oopppsss - it's opt_coredump.h not opt_compat_coredump.h
 1.7.16.1 27-Sep-2018  pgoyette (Try to) move the arm-specific compat_netbsd32_machdep stuff to the
arm directory, not in acorn32!

XXX We still need to come back and hook up the _13 and _16 code!
 1.5 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.4 20-Jun-2020  skrll Trailing whitespace
 1.3 13-Nov-2019  pgoyette Clean-up unnecessary inclusions of opt_coredump.h
 1.2 27-Jan-2019  pgoyette branches: 1.2.4;
Merge the [pgoyette-compat] branch
 1.1 27-Sep-2018  pgoyette branches: 1.1.2;
file netbsd32_machdep_13.c was initially added on branch pgoyette-compat.
 1.1.2.3 27-Sep-2018  pgoyette Hook up the arm compat_netbsd32_13 & _16 code
 1.1.2.2 27-Sep-2018  pgoyette oopppsss - it's opt_coredump.h not opt_compat_coredump.h
 1.1.2.1 27-Sep-2018  pgoyette (Try to) move the arm-specific compat_netbsd32_machdep stuff to the
arm directory, not in acorn32!

XXX We still need to come back and hook up the _13 and _16 code!
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 27-Jan-2019  christos file netbsd32_machdep_13.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.5 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.4 20-Jun-2020  skrll Trailing whitespace
 1.3 13-Nov-2019  pgoyette Clean-up unnecessary inclusions of opt_coredump.h
 1.2 27-Jan-2019  pgoyette branches: 1.2.4;
Merge the [pgoyette-compat] branch
 1.1 27-Sep-2018  pgoyette branches: 1.1.2;
file netbsd32_machdep_16.c was initially added on branch pgoyette-compat.
 1.1.2.3 27-Sep-2018  pgoyette Hook up the arm compat_netbsd32_13 & _16 code
 1.1.2.2 27-Sep-2018  pgoyette oopppsss - it's opt_coredump.h not opt_compat_coredump.h
 1.1.2.1 27-Sep-2018  pgoyette (Try to) move the arm-specific compat_netbsd32_machdep stuff to the
arm directory, not in acorn32!

XXX We still need to come back and hook up the _13 and _16 code!
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 27-Jan-2019  christos file netbsd32_machdep_16.c was added on branch phil-wifi on 2019-06-10 22:05:51 +0000
 1.443 13-Apr-2024  skrll port-arm/58135: reproducible pmap KASSERT failure for armv7 with NFS root

Don't unconditionally set XN in pmap_clearbit - only set it if a mapping
exists VM_PROT_EXEC is being cleared.

I've simplified the #ifdefs in the patch from the PR.
 1.442 13-Apr-2024  skrll Restore a space I accidentally removed from a copyright with

$NetBSD: pmap.c,v 1.396 2020/03/13 16:14:18 skrll Exp $
 1.441 13-Dec-2023  rin arm: pmap: Fix clang build without DIAGNOSTIC
 1.440 12-Oct-2023  skrll Fix non-DIAGNOSTIC builds
 1.439 20-Apr-2023  skrll Provide a shared pmap_devmap implementation and convert all pmap_devmap
arrays to use DEVMAP_ENTRY{,_END}
 1.438 18-Dec-2022  skrll Appease KDASSERT / LOCKDEBUG.

Tested by mlelstv.
 1.437 03-May-2022  skrll branches: 1.437.4;
Catch up with aarch64 TTBR0 handling in pmap_{,de}activate_efirt and
kpreempt_{en,dis}able.
 1.436 09-Apr-2022  riastradh sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.
 1.435 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.434 19-Mar-2022  skrll Alight code re-organisation so it better matches the VPRINTF headings
it is under. NFCI.
 1.433 12-Mar-2022  riastradh sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

Thread A Thread B
obj->foo = 42; obj->baz = 73;
mumble(&obj->bar); grumble(&obj->quux);
/* membar_exit(); */ /* membar_exit(); */
atomic_dec -- not last atomic_dec -- last
/* membar_enter(); */
KASSERT(invariant(obj->foo,
obj->bar));
free_stuff(obj);

The memory barriers ensure that

obj->foo = 42;
mumble(&obj->bar);

in thread A happens before

KASSERT(invariant(obj->foo, obj->bar));
free_stuff(obj);

in thread B. Without them, this ordering is not guaranteed.

So in general it is necessary to do

membar_exit();
if (atomic_dec_uint_nv(&obj->refcnt) != 0)
return;
membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting. (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these. Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that. It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.
 1.432 02-Jan-2022  riastradh arm: Remove #ifdef DIAGNOSTIC now wrong after KASSERT change.

Objects in question aren't volatile here so access is flushable.
 1.431 01-Jan-2022  christos KASSERT now always uses the expression, so don't protect with DIAGNOSTIC
 1.430 26-Aug-2021  skrll Improve a comment
 1.429 24-Aug-2021  skrll Remove '\n' from UVMHIST format
 1.428 23-Mar-2021  skrll Another missing kpreempt_enable
 1.427 23-Mar-2021  skrll Re-enable kpreemption in an error path. Spotted by nat@
 1.426 14-Mar-2021  skrll branches: 1.426.2;
Sprinkle kpreempt_{dis,en}able ready for when preemption gets turned on.
 1.425 01-Feb-2021  skrll "as appropos" -> "as appropriate" in comments
 1.424 29-Jan-2021  skrll More debug
 1.423 24-Jan-2021  skrll More debug
 1.422 30-Oct-2020  skrll branches: 1.422.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.421 12-Aug-2020  skrll Whack-a-mole
 1.420 11-Aug-2020  skrll s/pmaphist/maphist/
 1.419 10-Aug-2020  skrll More UVMHIST_LOG and a new KASSERT
 1.418 10-Aug-2020  skrll In pmag_page_remove initilise pvp after taking the page lock
 1.417 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.416 03-Jul-2020  skrll 1 page is enough for memhook now since the merge of the rmind-uvmplock
branch and the removal of sys/arch/arm/arm32/mem.c

The last users of memhook don't care about number of CPUs or page colours.
 1.415 21-Jun-2020  skrll Use howmany(). NFCI.
 1.414 27-May-2020  skrll KNF
 1.413 27-May-2020  skrll Remove duplicate #include
 1.412 21-Apr-2020  skrll There is no fast spoon^Wfast path in pmap_clearbit.

PR port-arm/55186: tests crash arm pmap

Tested by martin@
 1.411 19-Apr-2020  ad PR port-arm/55186: tests crash arm pmap

pmap_clearbit(): take execbits into account in the fastpath.
 1.410 19-Apr-2020  kre Give UVMHIST_LOG() the 6 args it requires. Unbreak builds.
 1.409 19-Apr-2020  skrll Fix typo in UVMHIST_LOG
 1.408 18-Apr-2020  skrll Remove PMAP_DEBUG by converting to UVMHIST
 1.407 17-Apr-2020  skrll Fix build after PV locking change
 1.406 17-Apr-2020  skrll Use UVMHIST_CALLARGS
 1.405 16-Apr-2020  ad With the right timing, V->P operations could change stuff behind the back of
callers working in the opposite direction - fix it. Tested by skrll@.
 1.404 14-Apr-2020  skrll Fix a comment. From ad@
 1.403 13-Apr-2020  chs slightly change and fix the semantics of pool_set*wat(), pool_sethardlimit()
and pool_prime() (and their pool_cache_* counterparts):

- the pool_set*wat() APIs are supposed to specify thresholds for the count of
free items in the pool before pool pages are automatically allocated or freed
during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
are supposed to specify minimum and maximum numbers of total items
in the pool (both free and allocated). these were somewhat conflated
in the existing code, so separate them as they were intended.

- change pool_prime() to take an absolute number of items to preallocate
rather than an increment over whatever was done before, and wait for
any memory allocations to succeed. since pool_prime() can no longer fail
after this, change its return value to void and adjust all callers.

- pool_setlowat() is documented as not immediately attempting to allocate
any memory, but it was changed some time ago to immediately try to allocate
up to the lowat level, so just fix the manpage to describe the current
behaviour.

- add a pool_cache_prime() to complete the API set.
 1.402 29-Mar-2020  skrll branches: 1.402.2;
PTE_SYNC before TLB flush and no need to PTE_SYNC after an unmap.
 1.401 29-Mar-2020  skrll Support PMAP_FAULTINFO on arm
 1.400 23-Mar-2020  skrll Reduce #ifdefs
 1.399 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.398 13-Mar-2020  skrll Enhance the DIAGNOSTICs around pmap_grow_map
 1.397 13-Mar-2020  skrll Re-indent a function call. NFCI.
 1.396 13-Mar-2020  skrll Oops... remove a stray <space>
 1.395 13-Mar-2020  skrll Fixup some comments
 1.394 24-Feb-2020  ad Adjust for UVM locking changes
 1.393 23-Feb-2020  skrll type in comment
 1.392 12-Feb-2020  skrll Convert the DEBUG code in pmap_grow_map to DIAGNOSTIC
 1.391 12-Feb-2020  skrll Add a CTASSERT to pmap_grow_l2_bucket that PAGE_SIZE is a multiple of
L2_TABLE_SIZE_REAL.
 1.390 12-Feb-2020  skrll Add a KASERT that we're not overwriting anything in pmap_growkernel
 1.389 12-Feb-2020  skrll Minor changes to make pmap_grow_l2_bucket look more like
pmap_alloc_l2_bucket. NFCI.
 1.388 05-Feb-2020  skrll Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.

armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO

bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.

XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.387 02-Feb-2020  skrll More KNF
 1.386 02-Feb-2020  skrll Always call pmap_grow_map with a page aligned new VA. KASSERT that this
happenes.
 1.385 02-Feb-2020  skrll Always pmap_kenter_pa the page in pmap_grow_map regardless of how we got
it.
 1.384 02-Feb-2020  skrll KNF
 1.383 02-Feb-2020  skrll Fix comment
 1.382 25-Jan-2020  skrll A fix and an optimisation to pmap_l1tt_free
- in the !__HAVE_MM_MD_DIRECT_MAPPED_PHYS case pass UVM_KMF_WIRED so that
the mappings are removed and the KVA is released. Fixes the KASSERT
seen in the automated test runs.
- in the __HAVE_MM_MD_DIRECT_MAPPED_PHYS case we can work out pa much
easier than caling pmap_extract.
 1.381 19-Jan-2020  skrll Fix non-ARM_MMU_EXTENDED buildx
 1.380 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.379 18-Jan-2020  skrll Trailing whitespace
 1.378 17-Jan-2020  skrll Fix a bug introduced in 1.271 where pmap_grow_map would no longer map
the allocated page for the uvm.page_init_done == false case when
PMAP_STEAL_MEMORY is not defined.
 1.377 17-Jan-2020  skrll Typo in comment
 1.376 17-Jan-2020  skrll Update PMAP_STEAL_MEMORY code to uvm_hotplug
 1.375 31-Dec-2019  skrll branches: 1.375.2;
Improve a comment
 1.374 25-Sep-2019  skrll Convert a __CTASSERT into a KASSERT as L1_S_CACHE_MASK may not be a
compile time constant if ARM_NMMUS > 1
 1.373 23-Apr-2019  bouyer branches: 1.373.2;
Fix a deadlock between the pool and pmap codes:
- cpu0 grabs the kernel lock (e.g. from a non-MPSAFE interrupt) and
calls pool_get().
- cpu1 does a pool_get() on the same pool from MPSAFE code, which needs a
pool_page_alloc(), which ends up in pmap_extract_coherency().

So cpu0 holds the kernel_lock and wants the pool lock. cpu1 holds the pool
lock and wants the kernel_lock in pmap_extract_coherency().

The pmap code should not rely on kernel_lock. Intead make the
pmap_kernel()->pm_obj_lock a IPL_VM lock and use it as pmap lock
(thus dropping the pmap test pmap_{acquire,release}_pmap_lock()).
This needs to be a IPL_VM because unlike user pmaps, this can be locked
from interrupt context.

Add a IPL_NONE lock for pmap_growkernel(). We can't use
pmap_kernel()->pm_obj_lock here because pmap_grow_map() may sleep.

Make pmap_lock (which may be locked with pm_obj_lock held) a IPL_VM
lock in all case.

reorder a few things to not call pool_get()/pool_put() (which may sleep)
with pm_obj_lock held.

Patch initially posted to port-arm@ on April 19, improved patch (per
suggestions from Nick Hudson and Jason Thorpe) on April 21.
 1.372 23-Apr-2019  bouyer Don't try to aquire/release the pmap lock when in ddb.
Avoids a deadlock when entering ddb, or on "mach cpu n" ddb command
(the pmap lock may already be held by another CPU, which is halted when
entering ddb).
Posted to port-arm@ on April 19.
 1.371 28-Oct-2018  skrll Fix the comment near pmap_bootstrap itself as well
 1.370 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.369 14-Oct-2018  skrll Use __nothing
 1.368 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.367 28-Aug-2018  skrll Fix arguments to align and align_offset for pmap_l2ptp_cache, i.e.align
is now L2_TABLE_SIZE_REAL and align_offset is now 0. (There were
reversed previously)
 1.366 31-Jul-2018  skrll Define and use VPRINTF
 1.365 01-Apr-2018  ryo branches: 1.365.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.364 22-Jan-2018  skrll branches: 1.364.2;
Add PMAP_WRITE_COMBINE: to the list of flags supported by pmap_kenter_pa
 1.363 22-Jan-2018  skrll Trailing whitespace
 1.362 17-Jan-2018  skrll G/C ARM32_NEW_VM_LAYOUT
 1.361 01-Nov-2017  skrll Unwrap two lines. NFC.
 1.360 01-Nov-2017  skrll Fix a comment
 1.359 28-Oct-2017  pgoyette Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3) format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
but it is possible that I've missed some of them. I would be glad to
update any stragglers that anyone identifies.
 1.358 08-Oct-2017  flxd Revert attempt at tracking unmanaged mappings for VIVT as it was incomplete and
buggy. PR port-shark/52102
From skrll@. Tested by martin@ and me.
 1.357 06-Sep-2017  skrll Remove useless KASSERT - we can't assert !mutex_owned()
 1.356 02-Sep-2017  skrll Perform tracking of unmanaged mappings for VIVT and call vac_me_harder
as appropriate.

PR/52102 shark: ffs_newvnode panic when unpacking sets installing -current

Thanks to Felix Deichmann for bisecting the problem and testing the fix.
 1.355 02-Sep-2017  skrll KNF
 1.354 02-Sep-2017  skrll Remove an #ifdef PMAP_CACHE_VIVT that's inside #ifdef PMAP_CACHE_VIVT
already
 1.353 24-Aug-2017  jmcneill Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.352 27-Jul-2017  skrll Macro confusion - fortunately this has no functional change.
 1.351 27-Jul-2017  skrll Remove redundant test - the compiler realised anyway as we get same binary
output
 1.350 10-Jul-2017  skrll No need for '\n' in UVMHIST_LOG
 1.349 24-May-2017  skrll branches: 1.349.2;
Check the "Havard TLB" maintenance operations if the "Unified TLB"
maintenance opeations don't include invalidate by ASID. Some CPUs, e.g.
Cortex-A8, have Havard TLBs and report ASID operations this way.
 1.348 24-May-2017  skrll Move closer to the common pmap by using the same pmap_remove_all
optimisation where TLB flushes are avoided by clever ASID assignment.

pmap_remove_all_complete can now be removed.
 1.347 22-May-2017  skrll Indent comment to match code it's describing
 1.346 21-May-2017  skrll KNF
 1.345 17-Apr-2017  skrll Perform icache syncs for ARM_MMU_EXTENDED as well. This helps the PT_STEP
code in pr/52119 and probably other things.
 1.344 25-Feb-2017  christos fix unused.
 1.343 23-Feb-2017  skrll Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.

Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.

PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
 1.342 23-Dec-2016  cherry branches: 1.342.2;
"Make NetBSD great again!"

Introduce uvm_hotplug(9) to the kernel.

Many thanks, in no particular order to:

TNF, for funding the project.

Chuck Silvers - for multiple API reviews and feedback.
Nick Hudson - for testing on multiple architectures and bugfix patches.
Everyone who helped with boot testing.

KeK (http://www.kek.org.in) for hosting the primary developers.
 1.341 17-Dec-2016  flxd Fix typo "one the" and architecture where appropriate.
 1.340 04-Aug-2016  skrll provide and use 'ci' in pmap_remove_all_complete.
 1.339 03-Aug-2016  skrll Don't touch pm_onproc at all in pmap_{update,destroy} and adjust KASSERT
to suit.

Update to cover the PMAP_TLB_MAX > 1 case as well while I'm here.
 1.338 01-Aug-2016  skrll pm_remove_all needs handling in pmap_destroy as well as pmap_update
 1.337 29-Jul-2016  skrll more debug
 1.336 29-Jul-2016  skrll Simplify ARM_MMU_EXTENDED #ifdefs

No functional change
 1.335 14-Jul-2016  skrll branches: 1.335.2;
Adapt this to the recent sys/uvm/pmap/pmap_tlb.c changes. MP kernels
now don't trigger KASSERTs
 1.334 14-Jul-2016  skrll Spell PMAP_TLB_NEED_SHOOTDOWN correctly
 1.333 12-Jul-2016  skrll Fix harmless (?) typo
 1.332 14-Dec-2015  skrll Delete pmap_pmaps and its only user pmap_dump_all. The list wasn't
being updated in an MP-safe manner.
 1.331 25-Nov-2015  skrll In the ARM_MMU_EXTENDED case make sure the kernel mappings are marked with
XN (eXecute Never) appropriately.

The XN logic is inconsistent and could do with changing to XN always set
and cleared for VM_PROT_EXECUTE (or the inverse) everywhere.
 1.330 13-Nov-2015  skrll Tweak the KASSERTs in pmap_update in the ARM_MMU_EXTENDED case - Lazy
updating is not done on the kernel pmap.

PR port-arm/50420: curcpu()->ci_pmap_cur != pm || pm->pm_pai[0].pai_asid == curcpu()->ci_pmap_asid_cur" failed
 1.329 13-Nov-2015  skrll Wrap long lines.
 1.328 11-Nov-2015  skrll Support pmap_pv_track and friends
 1.327 06-Nov-2015  skrll Trailing whitespace
 1.326 26-Jul-2015  matt KASSERT->KASSERTMSG
 1.325 09-Jun-2015  skrll Use armreg_auxctl_{read,write} instead of inline asm.

No functional change.
 1.324 01-Jun-2015  matt pmap_directbase is a failed experiment, nuke it.
 1.323 30-May-2015  matt Support directmapped systems with >1GB that start memory at 0x80000000.
 1.322 13-May-2015  skrll Use PDE_SYNC when syncing pdeps
 1.321 11-May-2015  matt Make sure nptes is a multiple of PAGE_SIZE / L2_S_SIZE.
 1.320 13-Apr-2015  matt Add pmap locking to pmap_kenter_pa/kremove
 1.319 11-Apr-2015  skrll #include "opt_arm_debug.h" for VERBOSE_INIT_ARM
 1.318 07-Apr-2015  matt Fix two bugs. pmap_is_cached fix for MULTIPROCESSOR (not just ASID on
local cpu -> any valid ASID on any cpu).
pmap_deactivate: update curcpu()->ci_pmap_cur_asid to KERNEL_PID too.
 1.317 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.316 10-Nov-2014  skrll branches: 1.316.2;
Update PTE_SYNC_CURRENT to add a dsb for armv7 - part of the
break-before-make fix.
 1.315 10-Nov-2014  skrll Remove an XXXNH comment.
 1.314 10-Nov-2014  skrll Remove an unnecessary flush that sneaked in as part of break-before-make
change.
 1.313 10-Nov-2014  skrll In pmap_fault_fixup re-instate the TLB flush for the shared L1 case that
occurs for non-ARM_MMU_EXTENDED kernels.

This fixes rump/rumpkern/t_sp:stress_killer on rpi which is currently
non-ARM_MMU_EXTENDED
 1.312 08-Nov-2014  matt When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
 1.311 07-Nov-2014  skrll The fixup debug message can report false positives on MULTIPROCESSOR, so
disable them there.
 1.310 07-Nov-2014  skrll In pmap_enter only flush the TLB if really necessary
 1.309 05-Nov-2014  skrll Fix typo in comment
 1.308 04-Nov-2014  matt pmap_tlb_flushD is for !ARM_MMU_EXTENDED only now
 1.307 29-Oct-2014  skrll Apply a bunch of break-before-make, i.e. set PTEs to zero, flush the TLB
(across all CPUs) and set new PTE value. Mostly from matt@ with some
updates from me.

Flush the branch predictor in pmap_update.
 1.306 29-Oct-2014  skrll In pmap_deactivate don't set TTBR with the ASID of the deactivated LWP -
use KERNEL_PID instead.

This is probably a no-op as TTBCR_S_PD0 should (still) be set at the time
of the call to cpu_setttb.
 1.305 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.304 20-Oct-2014  skrll Reduce code a little. Reviewed by gimpy.
 1.303 14-Oct-2014  skrll Typo in comment
 1.302 23-Sep-2014  matt Use right conditional for checking nG.
 1.301 23-Sep-2014  nonaka nG bit exists only in ARMv6 and above.
 1.300 21-Sep-2014  christos remove dead code
 1.299 05-Sep-2014  matt Don't nest structure definitions.
 1.298 30-Aug-2014  kiyohara It expects return value 'va != NULL' from uvm_km_alloc().
 1.297 13-Aug-2014  matt Fix for PR/49061
only kassert in pmap_kenter_pa if PMAP_CACHE_PIVT && !ARM_MMU_EXTENDED
 1.296 13-Aug-2014  matt Fix for PR/49107.
Make sure pmap_copy_page_xscale clears the ptes afters its done with them.
 1.295 25-Jul-2014  matt branches: 1.295.2;
PTE_SYNC_RANGE a newly allocated L1 page for ARM_MMU_EXTENDED
 1.294 15-Jun-2014  ozaki-r Add missing semicolon
 1.293 05-Jun-2014  matt Fix occupancy bug.
 1.292 30-Apr-2014  joerg pmap_is_current might be unused, tag it as such.
 1.291 22-Apr-2014  skrll Remove stray comment.
 1.290 22-Apr-2014  skrll Call pmap_free_l2_bucket for the kernel pmap so that l2b_occupancy is
updated. pmap_free_l2_bucket already deals with the kernel pmap properly.

ok matt@

Should fix the

panic: kernel debugging assertion "mappings <= l2b->l2b_occupancy" failed:
file "/usr/src/sys/arch/arm/arm32/pmap.c", line 3838

problem reported on port-arm by Joachim Thiemann
 1.289 22-Apr-2014  skrll Fix a format string to actually print the prot
 1.288 20-Apr-2014  matt Reduce resident_count by number of pages, not number of ptes.
 1.287 12-Apr-2014  matt KDASSERT -> KDASSERTMSG
 1.286 12-Apr-2014  skrll Trailing whitespace
 1.285 12-Apr-2014  skrll Fix typo and unbreak the build for various arm kernel builds.
 1.284 11-Apr-2014  matt Add a kernel for the CUBIETRUCK (CUBIEBOARD3). Allow direct mapping of all
memory (but for now allow the memory mapped above KERNEL_BASE to used for
poolpages).
 1.283 10-Apr-2014  matt Fix pasto.
 1.282 10-Apr-2014  matt Fix pmap_extract to deal with non-4KB pages.
 1.281 05-Apr-2014  skrll Add a missing pmap_release_page_lock
 1.280 02-Apr-2014  matt branches: 1.280.2;
Mark omd as diagused for the ARM_MMU_EXTENDED case.
 1.279 02-Apr-2014  skrll Fix non-DIAGNOSTIC build
 1.278 02-Apr-2014  matt Init the page_lock to IPL_VM iff VIPT && arm_cache_prefer_mask != 0 otherwise
use IPL_NONE. Don't bother with page_lock for KMPAGEs.
 1.277 02-Apr-2014  matt braces are your friends. use them.
 1.276 02-Apr-2014  matt Really fix locking this time.
 1.275 02-Apr-2014  matt Because vector_page might be 0, we have to process the entry L1pt.
Make sure to map the new l2 area after we've grown the kernel.
If msgbufaddr is set, don't alloc space for msgbuf.
 1.274 01-Apr-2014  matt For ARM_MMU_EXTENDED, if the page being mapped asked for EXEC but is not EXEC,
sync it.
 1.273 31-Mar-2014  matt tag a variable with __diagused
 1.272 30-Mar-2014  matt Fix debug code in fault_fixup
 1.271 30-Mar-2014  matt Make the ARM pmap use ASIDs, split TTBRs, and MP safe. This only happens for
ARMv6 or later CPUs. This means that on context switch that the TLBs and
caches no longer to cleaned/flushed. Also, eXecute Never (XN) protection has
been added so non-exec pages can not be run. Change the page size for ARMv6+
to be 8KB while allows a L1PT to be a normal page. This means that the L1PT
is not special. Use the XN support to only sync pages that are executed from.
 1.270 27-Feb-2014  joerg Member will never be null, so remove check.
 1.269 26-Feb-2014  matt Only track kenter_pa'ed pages if arm_cache_prefer_mask is non-zero.
 1.268 26-Feb-2014  matt Don't do ref/mod emulation for KENTRY pages.
l2pte_minidata -> l2pte_minidata_p
 1.267 26-Feb-2014  matt Move pmap_recent_user to ci->ci_pmap_lastuser and
pmap_previous_active_lwp to ci->ci_lastlwp. Fix some comments.
 1.266 26-Feb-2014  matt l2pte_valid -> l2pte_valid_p
 1.265 26-Feb-2014  matt Add support for PMAP_PTE to pmap_kenter_pa
 1.264 12-Sep-2013  kiyohara Fix VIVT cache operation. Tested on Kirkwood machines.
 1.263 18-Aug-2013  matt Include <arm/locore.h>
 1.262 03-Jul-2013  matt Add l2pte_set and l2pte_reset inlines to set/reset a pte. These will be
used to support > 4KB pages sizes.
Don't use >> L1_S_SHIFT, use L1_IDX() instead.
 1.261 03-Jul-2013  matt restore deleted conditional
 1.260 03-Jul-2013  matt Fix c&p error
 1.259 03-Jul-2013  matt Collapse multiple inlines and move repeated tests into them.
No functional change.
 1.258 03-Jul-2013  matt Add pmap_domain and pmap_l1_kva inlines.
 1.257 12-Jun-2013  matt branches: 1.257.2;
Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.256 12-Jun-2013  matt If the vector_page is not ARM_VECTORS_{LOW,HIGH}, assume it's in kernel
text and don't do anything special to map it.
 1.255 11-May-2013  skrll Fix !DDB build.
 1.254 29-Mar-2013  matt Fix pmap_flush_page to also flush the secondary cache, if there is one.
This solves a bus_dma problem with DMA from uncached pages.
 1.253 13-Feb-2013  matt Some armv7 fixes for speculative tlb loads.
 1.252 04-Feb-2013  macallan support ARM32_MMAP_WRITECOMBINE for managed pages as well
 1.251 01-Feb-2013  matt cleanup PVF_WRITE & pvh_attrs interaction.
 1.250 31-Jan-2013  skrll Another typo in a comment.
 1.249 31-Jan-2013  skrll Typo in comment.
 1.248 19-Jan-2013  matt Switch from only UVM_PGA_STRAT_ONLY to UVM_PGA_STRAT_FALLBACK in
arm_pmap_alloc_poolpage.
 1.247 11-Jan-2013  matt Fix a bug in pmap_modify_pv where we didn't set PVF_WRITE on a page after
changing its mapping to writeable.
Add more KASSERTS
Don't go into DDB by default in pmap_fixup.
 1.246 11-Dec-2012  matt Fix C&P bug.
 1.245 11-Dec-2012  matt Fix c&p error.
 1.244 11-Dec-2012  matt Optimize pmap_{copy,zerp}_page_generic to understand that when all of memory
is always mapped that you don't have create mappings dynamically.
 1.243 10-Dec-2012  matt Change a KASSERT to a KASSERTMSG
 1.242 12-Nov-2012  skrll C99 types
 1.241 17-Oct-2012  matt Add a PMAP_NEEDS_ALLOC_POOLPAGE / PMAP_ALLOC_POOLPAGE hook so systems can
allocate pool pages from a specific VM freelist.
 1.240 17-Oct-2012  matt Need to set pmap_needs_pte_sync before calling PTE_SYNC
 1.239 17-Oct-2012  matt When setting pmap_needs_pte_sync to 1 be sure to sync pte that caused
the issue.
 1.238 26-Sep-2012  matt If we get a fault we shouldn't have, set pmap_needs_pte_sync and retry.
 1.237 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.236 02-Sep-2012  matt branches: 1.236.2;
Supersections are on armv6 too.
 1.235 30-Aug-2012  matt Teach pmap_extract about supersections.
 1.234 29-Aug-2012  matt Make all cortex and arm11 cpus uses writeback cached memories for pagetables
 1.233 29-Aug-2012  matt Support PMAP_NOCACHE in pmap_kenter_pa
 1.232 29-Aug-2012  matt Use the correct prot mask in vector_page_setprot
 1.231 27-Aug-2012  matt Use the correct (L1_S_PROT, not L2_S_PROT) macro for setting the protection
of the vector page. This fixes a nasty little bug that shows up on armv7
systems when the vector page physical address changes (bit 12 of the address
is cleared) and then any exception causes the system to hang.
 1.230 20-Aug-2012  matt Add support for mapping SuperSection on armv6 and armv7. These always
a domain of 0 so move the kernel from domain 15 to domain 0.
 1.229 13-Jul-2012  skrll Fix a KASSERT. From/OK'ed by matt@
 1.228 29-Jan-2012  he branches: 1.228.2;
Only declare helper variable which is only used in KASSERT() if
DIAGNOSTIC is defined, to avoid "variable defined but never used"
warning if DIAGNOSTIC isn't defined, and KASSERT() expands to
nothing.
 1.227 28-Jan-2012  matt Since we don't do MULTIPROCESSOR, and hence preemption, locking the pvlists
doesn't really matter.
 1.226 28-Jan-2012  matt Don't use simple locks.
 1.225 27-Jan-2012  para extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged
 1.224 01-Jul-2011  dyoung branches: 1.224.2; 1.224.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.223 30-Jun-2011  wiz dependant -> dependent
 1.222 12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.221 10-Mar-2011  bsh branches: 1.221.2;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.220 28-Feb-2011  macallan implement arm32_pmap_flags() to allow mappings with write buffering enabled,
mostly for video memory
Tested on shark
 1.219 12-Nov-2010  uebayasi branches: 1.219.2; 1.219.4;
Put VM_PAGE_TO_MD() definition in one place. No functional changes.
 1.218 10-Nov-2010  uebayasi Use more VM_PHYSMEM_*() accessors. No functional changes.
 1.217 03-Nov-2010  uebayasi Fix build of IXM1200 too. Pointed out by cegger, thanks.
 1.216 02-Nov-2010  uebayasi Fix build of XScale.
 1.215 30-Oct-2010  uebayasi Pass struct vm_page_md * where possible.

This causes 1% code increase, mainly because additional argument
(paddr_t) affects register usage. This will be fixed when per-page
data structure (struct vm_page) is redone, and physical address
can be retrieved from struct vm_page_md *.

Tested on (uncommitted) i.MX35 (ARM1136).
 1.214 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.213 14-May-2010  cegger Move PMAP_KMPAGE to be used in pmap_kenter_pa flags argument.
'Looks good to me' gimpy@
 1.212 15-Feb-2010  skrll branches: 1.212.2;
Typo in comment.
 1.211 02-Jan-2010  he branches: 1.211.2;
Remove a shadowed and unused local declaration so that this builds again.
 1.210 01-Jan-2010  uebayasi Sprinkle assertions after calling pmap_get_l2_bucket().
 1.209 31-Dec-2009  uebayasi Use pmap_is_current() where appropriate. No functional changes.
 1.208 31-Dec-2009  uebayasi pmap_page_remove(): remove an unused local variable; no functional changes.
 1.207 31-Dec-2009  uebayasi Correct assertions for PMAP_CACHE_VIPT code; if page coloring is disabled
(arm_cache_prefer_mask == 0), pvh_attrs has never PVF_COLORED, so don't assert
it. No functional changes.
 1.206 28-Dec-2009  uebayasi Indent.
 1.205 28-Dec-2009  uebayasi Always name struct pv_entry * as pv, not pve. No binary change.
 1.204 27-Dec-2009  uebayasi Add write-through cache work-around for ARM11 as well as ARM9/ARM10. Analyzed
& tested on i.MX35 with help from Tsubai Masanari.
 1.203 28-Nov-2009  scw Apply some band-aid to pmap_activate() for PR kern/41058:

There's a corner case here which can leave turds in the cache as
reported in kern/41058. They're probably left over during tear-down and
switching away from an exiting process. Until the root cause is identified
and fixed, zap the cache when switching pmaps. This will result in a few
unnecessary cache flushes, but that's better than silently corrupting data.

Also remove an extraneous return statement in pmap_page_protect() which
crept in during the matt-armv6 merge.
 1.202 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.201 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.200 22-Oct-2009  rmind Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore. Apart from that,
no functional differences are intended.
 1.199 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.198 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.197 15-Mar-2009  cegger ansify function definitions
 1.196 09-Mar-2009  nonaka avail_start and avail_end is paddr_t.
 1.195 08-Jan-2009  matt branches: 1.195.2;
When allocating a KMPAGE and it has multiple colors, make sure to flush them.
Add some more KASSERTs for multiple colors (or lack thereof).
 1.194 30-Dec-2008  matt Reclaim PVF_KNC in VIPT to be PVF_MULTCLR (page has multiple colors).
Track when a page is mapping in multiple colors and deal with the ramifications.
When a page's MOD attribute is cleared, clean it from the cache.
Fix a logic inversion.

With these changes, the TI SDP2420 H4 board can successfully natively build a
TISDP2420 kernel.
 1.193 10-Dec-2008  pooka Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.192 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.191 19-Nov-2008  matt Allocate /dev/mem's page in pmap_init. Mark /dev/mem as MPSAFE. Ansify.
 1.190 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.189 04-Nov-2008  matt Use a mutex to control access DEV_MEM.
 1.188 04-Nov-2008  matt Protect some code with if (pg) { .. }
 1.187 28-Sep-2008  skrll branches: 1.187.2; 1.187.4; 1.187.8;
Typo in comment.
 1.186 14-Aug-2008  matt Now that we track pages used by any of the kernel memory allocators,
keep a count of them and export it as a sysctl node machdep.kmpages
 1.185 13-Aug-2008  matt Fix a few more corner cases. Always KMPAGE or pages with unmanaged writeable
kernel mappings as modified. Only ever set DIRTY bit is DMOD is true and
NC is false. Don't modify unmanaged mappings in pmap_clearbit.
 1.184 08-Aug-2008  dogcow fix "warning: 'npv' may be used uninitialized in this function"
 1.183 06-Aug-2008  matt Change pv_entries to use SLIST.

For VIPT caches, keep track of when pages are dirty so that their content
can be flushed back to main memory. This is done when the page is
read-only mapped by more than 1 color. Pages become when either their
modified bit gets set or an unmanaged writeable page is mapped. When
a page in unmapped or changed to read-only, run pmap_vac_me_harder in
case the page can be mapped read-only.

Thanks are given to Imre Deak for giving me the idea to assert for PVF_DIRTY.
 1.182 16-Jul-2008  matt Revamp bookkeeping for pages entered by pmap_kenter_pa. Keep track of them
on pvlists so that the cacheability can be properly tracked.
 1.181 09-Jul-2008  scw When dealing with 'cleanlist_idx == PMAP_REMOVE_CLEAN_LIST_SIZE' in
pmap_do_remove(), make sure to use PTE_SYNC() for each rolled-back
PTE on the list.

Fixes potential MMU inconsistencies on some ARM platforms where
page-tables are mapped write-back.
 1.180 03-Jul-2008  matt branches: 1.180.2;
Use the same login in pmap_kenter_pa when removing an unmamanged mapping
as in pmap_kremove (otherwise kro_mappings will become incorrect).
 1.179 03-Jul-2008  matt For armv6(VIPT), change the rules for mapping via kenter_pa. Allow readonly
pages to be mapped by different cache color indexes.
 1.178 24-Jun-2008  scw In pmap_deactivate(), if the process is exiting make sure the next call
to pmap_activate() performs a full MMU context-switch and cache flush,
which might otherwise be skipped.

Fixes ARM_LOW_VECTORS problem reported in PR port-arm/38950.
 1.177 17-Jun-2008  chris Fix two KASSERT(value | (C1|C2)) to KASSERT(value & (C1|C2)) so that it
tests for something, rather than always being true.

Pointed out by Andy Shevchenko in:
http://mail-index.netbsd.org/port-arm/2008/06/17/msg000255.html
 1.176 04-Jun-2008  ad branches: 1.176.2;
vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.
 1.175 28-Apr-2008  martin branches: 1.175.2;
Remove clause 3 and 4 from TNF licenses
 1.174 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.173 20-Apr-2008  scw branches: 1.173.2;
There's really no need to switch VM contexts within cpu_switchto() as
MI code always calls pmap_deactivate/pmap_activate on context switch.

Instead, just record the last active lwp (or NULL if it exited) and
defer switching VM context to pmap_activate(). This saves an additional
function call overhead in cpu_switchto().

While here, g/c unused cpuswitch.S local .Lblock_userspace_access.
 1.172 29-Mar-2008  chris branches: 1.172.2;
Fix LOCKDEBUG build on arm by:
* converting simple_{un}lock to mutex_enter/exit
* Using UVM_OBJ_INIT & DESTROY for the uvm_object in the pmap structure
 1.171 06-Jan-2008  matt branches: 1.171.6;
current_intr_depth is dead. Make sure we don't use it anymore.
 1.170 01-Jan-2008  chris Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.169 08-Nov-2007  matt branches: 1.169.6;
Make this compile again.
 1.168 07-Nov-2007  ad Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
 1.167 17-Oct-2007  garbled branches: 1.167.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.166 10-Oct-2007  ad branches: 1.166.2;
Comment out references to spinlockmgr().
 1.165 15-Sep-2007  scw branches: 1.165.2;
ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.164 17-May-2007  yamt branches: 1.164.6; 1.164.8; 1.164.10; 1.164.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.163 09-Apr-2007  chris branches: 1.163.4;
In pmap_activate restore interrupts to their previous state rather than
always enabling them.

It's not clear if this actually caused any problems, but it seems safer
to restore to the previous state in case pmap_activate is ever called
with interrupts disabled.
 1.162 12-Mar-2007  ad branches: 1.162.2;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.161 04-Mar-2007  christos branches: 1.161.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.160 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.159 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.158 06-Jan-2007  christos branches: 1.158.2;
From Scott Allen in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html
I ran into a problem when I tried to set up a mapping that started at virtual
address 0xFFF00000 and was 0x00100000 long. In other words, the mapping
should have gone to the end of the 32 bit address space. The mapping was made
with no problem, but pmap_devmap_find_va() wouldn't find an address within the
mapping. For example, if I told it to find a mapping for 0x1000 bytes at
0xFFF01000, it would try to make sure that 0xFFF01000 was greater than
0xFFF00000 and that (0xFFF01000+0x1000) was less than (0xFFF00000+0x00100000).
However, that last expression (0xFFF00000+0x00100000) wrapped around to be
simply 0x00000000 so it wasn't found. This patch fixes this problem in
pmap_devmap_find_va() and pmap_devmap_find_pa() by subtracting one off of the
sizes to be compared, so in my example, (0xFFF01000+0x1000-1) will be less
than (0xFFF00000+0x00100000-1).
 1.157 24-Dec-2005  perry branches: 1.157.20; 1.157.24;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.156 10-Dec-2005  scw Implement pmap_collect() for arm32.
 1.155 08-Dec-2005  yamt use VM_PAGE_TO_PHYS macro.
 1.154 04-Jul-2005  bsh branches: 1.154.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.153 24-Jun-2005  scw In pmap_devmap_find_pa(), use 64-bit arithmetic to handle the case where
'pa + size' == 0x0. As in, if we're passed details of a region right at
the top of physical address space.

Otherwise we'll likely hit a false-positive due to 32-bit wrap-around.
 1.152 26-Apr-2005  scw Since pmap_page_remove() is called from pmap_page_protect(), don't modify
the current pmap's pm_cstate if we have to flush the TLB, as callers of
pmap_page_protect() are not required to invoke pmap_update() afterwards.

Otherwise we can end up with a pm_cstate which is inconsistent with reality
in the TLB, which can lead to future TLB flushes being erroneously skipped.
 1.151 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.150 14-Jan-2005  joff branches: 1.150.2; 1.150.4;
Dont try freeing bootstrap pages with pool_page_free. Fixes kern/28869
 1.149 02-Jan-2005  chris Remove direct references to TAILQ internal structures.

No functional change, just tidying up code.
 1.148 03-Apr-2004  bsh pmap_pte_init_arm9() is necessary only when defined(CPU_ARM9) and defined(ARM9_CACHE_WRITE_THROUGH)
 1.147 18-Jan-2004  scw Fix ARM_VECTORS_LOW fallout caused by the recent reaper removal.

Just before removing the vector page mapping, switch to the kernel
pmap's L1/vector page mapping so as not to pull the rug out from
under ourselves.

To prevent the stale L1/vector page mapping from being restored by
cpu_switch, replace the relevant fields of the dying process' pcb
with those of lwp0's pcb.
 1.146 01-Nov-2003  jdolecek avoid stong words in comments
 1.145 29-Oct-2003  mycroft Whitespace.
 1.144 29-Oct-2003  mycroft The previous patch was wrong -- mcr does not output anything. Instead give a
junk input (it's not used when the last argument is 0).
 1.143 28-Oct-2003  scw Fix an uninitialised variable warning, reported by Shoichi Miyake
in port-arm/23293.
 1.142 26-Oct-2003  chris Fix up some unitialised variables.
 1.141 13-Oct-2003  scw On Xscale, define PMAP_UAREA() and use it to tweak uarea mappings so
they use the mini D$.

This results in a small performance boost on xscale platforms, since
flushing the main cache on a context switch won't affect the kernel
stack/pcb.
 1.140 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.139 21-Sep-2003  matt Change some type-punning detected by gcc 3.3.1 to (void *).
 1.138 06-Sep-2003  rearnsha Support for initializing ARM10 processors in write-through mode.
 1.137 23-Jun-2003  martin branches: 1.137.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.136 15-Jun-2003  thorpej Add another devmap routine that allows bootstrap code to register
a devmap reflecting mappings that are created by really early
bootstrap code before pmap_devmap_bootstrap() is called.
 1.135 15-Jun-2003  thorpej Replace the ad-hoc "section mapping table" for static device mappings
with a more generic "devmap" structure that can also handle mappings
made with large and small pages. Add new pmap routines to enter these
mappings during bootstrap (and "remember" the devmap), and routines to
look up the static mappings once the kernel is running.
 1.134 21-May-2003  thorpej Move the new pmap from arm32/pmap_new.c to arm32/pmap.c, fully replacing
the old.
 1.133 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
 1.132 08-May-2003  thorpej Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.131 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.130 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.129 29-Mar-2003  bsh for Intel PXA2[15][05] processors, select write-back/write-through
cache based on CPU id. write-through on PXA2[15]0 B2 stepping and
earlier. write-back on C0 and C1 stepping (a.k.a PXA2[15]5 A0)

options XSCALE_CACHE_WRITE_{THROUGH,BACK} can override it.

for other XScale CPUs than PXA2xx, XSCALE_CACHE_WRITE_THROUGH works
same as before.
 1.128 27-Mar-2003  mycroft Remove references to variables that aren't used here.
 1.127 23-Mar-2003  chris Garbage collect pmap_map, the last (and only?) use has been removed.
 1.126 23-Feb-2003  thorpej Change pcb32_pagedir to a paddr_t (after all, it's used as a paddr_t
everywhere in the code).
 1.125 21-Feb-2003  chris Convert a few types into things that are more accurate, mostly:
int's to unsigned int/u_int where they shouldn't go negative.
int's to boolean_t's where they're being used as bools.

No real functional change (in the produced asm a few condition codes changed)
 1.124 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.123 24-Nov-2002  chris Add a debug assert that wired pages provide protection flags in the flags
argument as well.

Also update a couple of debug messages to NPDEBUG.
 1.122 12-Nov-2002  chris Tweak a few minor things:
when looking to reenable caching, only do so if all the pages aren't already
cached.
Convert some ints to unsigned int. (scarily this actually shows the biggest
decrease in timing for my benchmark, I guess the compiler can optimise better)
 1.121 11-Nov-2002  chris gratuitous whitespace and de-__P'ing. No functional change.
 1.120 11-Nov-2002  chris A few minor tweaks.

Use pmap_free_pvs in pmap_remove, should save on the overhead of freeing
each pv on it's own.

Correctly set ptp when calling pmap_enter_pv, this adds more overhead, but
the effect is minimal. Timings show that it increases gmake's make configure
step from 2:07.90 to 2:08.90. I've more optimisations planned that should
negate this increase.
 1.119 11-Nov-2002  chris Remove unused pa variable (it's assigned but not used any more)
 1.118 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.117 22-Sep-2002  chs rename the existing pmap_remove_all() here to pmap_page_remove()
(ala the x86 pmap) to avoid conflicting with the new pmap interface
function of the same name.
 1.116 05-Sep-2002  jdolecek whitespace fix past __KERNEL_RCSID()
 1.115 24-Aug-2002  thorpej In pmap_map_in_l1() and pmap_unmap_in_l1(), make sure that the VA
that is passed in is already aligned to a 4M super-section.
 1.114 24-Aug-2002  thorpej When we allocate a PTP, make sure the offset we specify is for
the 4M super-section that the PTP will map, not some random 1M
chunk of it. This gives the PTP hint code a much better chance
to working properly, and allows us to tidy up the code that
flushes a PTP from the cache in pmap_destroy().
 1.113 24-Aug-2002  thorpej Enable caching on kernel and user page tables. This saves having
to do uncached memory access during VM operations (which can be
quite expensive on some CPUs).

We currently write-back PTEs as soon as they're modified; there is
some room for optimization (to write them back in larger chunks).
For PTEs in the APTE space (i.e. PTEs for pmaps that describe another
process's address space), PTEs must also be evicted from the cache
complete (PTEs in PTE space will be evicted durint a context switch).
 1.112 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.111 21-Aug-2002  thorpej Use a pool cache for PT-PTs.
 1.110 21-Aug-2002  thorpej Do cached memory access to L1 tables, making sure to write-back the
cache after any L1 table modifications.
 1.109 13-Aug-2002  thorpej Add the brutal hack that allows us to limp along using the read/write
cache line allocation policy on XScale CPUs: in pmap_enter(), if the
pmap is the kernel pmap, clear the X-bit in the PTE, thus disabling
read/write-allocate for managed kernel mappings.

Yes, this is ugly. But it makes userland code run with r/w-allocate,
which is a huge improvement on systems with low core memory performance.
 1.108 10-Aug-2002  thorpej Tidy up pmap_clean_page() a little, and reenable some code that was
disabled previously: Skip cleaning mappings which are read-only, because
the pmap (now) does clean pages on a r/w -> r/o transition.
 1.107 10-Aug-2002  thorpej Clean up some warts in pmap_protect().
 1.106 09-Aug-2002  thorpej Add an XSCALE_CACHE_READ_WRITE_ALLOCATE option for people who
want to play fast-and-loose.
 1.105 09-Aug-2002  thorpej Add some code, conditional on PMAP_ALIAS_DEBUG, that can be used to
hunt for virtual aliases between managed (pmap_enter) and non-managed
(pmap_kenter_pa) mappings.
 1.104 06-Aug-2002  thorpej - pmap_remove(): unmap the PTEs *after* we have finished with the
page tables.
- pmap_enter(): if making a mapping for the same PA rw->ro, write-back
the cache before doing so.
- pmap_clearbit(): if revoking REF on a page, make sure to wbinv the
cache if the page has write permission, else inv the cache if the page's
PTE is valid (XXX we actually wbinv in this case, as well, due to lack
of idcache_inv_range()). Only flush the TLB if the PTE changed.
 1.103 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.102 31-Jul-2002  thorpej Move the calls to uvm_page_physload() out of pmap_bootstrap() and
into platform-specific initialization code, giving platform-specific
code control over which free list a given chunk of memory gets put
onto.

Changes are essentially mechanical. Test compiled for all ARM
platforms, test booted on Intel IQ80321 and Shark.

Discussed some time ago on port-arm.
 1.101 30-Jul-2002  thorpej Move the uvm_setpagesize() call to platform-dependent code in preparation
for other changes to pmap_bootstrap().
 1.100 30-Jul-2002  thorpej Don't use pmap_kenter_pa() in pmap_map(); doing so causes an assertion
failure in pmap_kenter_pa().
 1.99 02-Jun-2002  drochner move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
 1.98 01-Jun-2002  lukem SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
 1.97 14-May-2002  chris branches: 1.97.2; 1.97.4;
Implement scheduler lock protocol, this fixes PR arm/10863.

Also add correct locking when freeing pages in pmap_destroy (fix from potr)

This now means that arm32 kernels can be built with LOCKDEBUG enabled. (only tested on cats though)
 1.96 24-Apr-2002  thorpej * pmap_clean_page(): Clean up a comment.
* pmap_protect(): write back the range when doing a r/w -> r/o
transition. (Still leave the block concerned with this in
pmap_clean_page() disabled, for now.)
* pmap_pte_init_xscale(): Disable read/write-allocate for now, until
we figure out why sometimes cache lines of NULs get deposited into
file data. Also, make sure ECC protection of page table access is
disabled for now.
* xscale_setup_minidata(): Make sure the mini-data cache is configured
write-back with read/write-allocate.
 1.95 12-Apr-2002  thorpej Default all XScale core processors to the read/write-allocate write-back
cache mode. Add a new XSCALE_CACHE_WRITE_THROUGH option for people who
are paranoid about the cache-related errata (you *do* have to line up
the planets correctly to trip them, but having the option is useful).
 1.94 10-Apr-2002  thorpej On XScale processors where we use write-back caching, use are
read/write-allocate line allocation policy.

On the i80321, this improves nearly every lmbench benchmark, dramatically
so the ones that are sensitive to memory bandwidth (100-300% improvement
for these).
 1.93 10-Apr-2002  thorpej Add a new function, pmap_alloc_ptpt(), that allocates the PTPT and
maps it the way we want, rather than using uvm_km_zalloc() and playing
the "revoke cacheability" song-and-dance.
 1.92 10-Apr-2002  thorpej pmap_alloc_l1pt(): Just enter the mappings for the L1 table by
hand, rather than calling pmap_kenter_pa() and then revoking
cacheability in the PTE.
 1.91 10-Apr-2002  thorpej Use L2_S_CACHE_MASK in places where we revoke cacheability.
 1.90 10-Apr-2002  thorpej pmap_kenter_pa(): Obey the "prot" argument, rather than simply making
all mappings r/w (!!).
 1.89 10-Apr-2002  thorpej In pmap_copy_page_xscale(), put the source page in the mini-data
cache, as well. The mini-data cache is 2-way, so src and dst won't
clobber each other, and the smallness of the cache doesn't matter,
since we access each page once sequentially.

While we still have to do the initial clean of the source page, this
saves another 4K of main D$ pollution, and also means we don't have
to do 2 cache passes after the copy is complete (i.e. we can skip the
invalidation of the source page in the main cache, since it's no longer
there).
 1.88 10-Apr-2002  thorpej Add separate pmap_{zero,copy}_page() functions for generic ARM
vs. XScale. Use the mini-data cache for the destination on XScale,
thus saving tossing out 4K of possible-useful data from the main
data cache each time.

This significantly improves every test in lmbench.
 1.87 09-Apr-2002  thorpej * Move the code that cleans the XScale mini-data cache into its
own function.
* Add a new function which sets up the mini-data cache clean area
properly.
 1.86 09-Apr-2002  thorpej * Split pte_cache_mode into pte_l1_s_cache_mode, pte_l2_l_cache_mode,
and pte_l2_s_cache_mode. The cache-meaningful bits are different
for these descriptor types on some processor models.
* Add pte_*_cache_mask, corresponding to each above, which has a mask
of the cache-meangful bits, and define those for generic and XScale
MMU classes. Note, the L2_S_CACHE_MASK_xscale definition requires
use of the Extended Small Page L2 descriptor (the "X" bit overlaps
with AP bits otherwise).
 1.85 09-Apr-2002  thorpej Define 2 classes of ARM MMUs:
1. Generic (compatible with ARM6)
1. XScale (can be used as generic, but also has certainly nifty extensions).

Define abstract PTE bit defintions for each MMU class. If only one MMU
class is configured into the kernel (based on CPU_* options), then we
get the constants for that MMU class. Otherwise we indirect through
varaibles set up via set_cpufuncs().

XXX The XScale bits are currently the same as the generic bits. Baby steps.
 1.84 09-Apr-2002  thorpej L2_TYPE_S -> L2_S_PROTO
 1.83 09-Apr-2002  thorpej Use abstract names for the protection and PTE type bits in
L1 and L2 descriptors. This will allow us to support different
PTE layouts that enable the use of extensions on different
processor models.
 1.82 05-Apr-2002  thorpej Back-out rev 1.75 (pmap_extract() rewrite), and fix the (minor)
bug that revision intended to fix properly.
 1.81 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.80 04-Apr-2002  thorpej Eliminate a mask against PD_MASK.
 1.79 04-Apr-2002  thorpej There is no need to mask VAs and PAs w/ PG_FRAME to clear
the lower bits; UVM provides us page-aligned addresses for
everything. For the paranoid, we'll leave KDASSERT()'s in
that check for this if the kernel is built with DEBUG.

Low-hanging fruit that shaves some cycles.
 1.78 04-Apr-2002  thorpej Rename flags that are really part of the pv_entry/mdpage into
pmap.h and give them more descriptive names and better comments:
* PT_M -> PVF_MOD (page is modified)
* PT_H -> PVF_REF (page is referenced)
* PT_W -> PVF_WIRED (mapping is wired)
* PT_Wr -> PVF_WRITE (mapping is writable)
* PT_NC -> PVF_NC (mapping is non-cacheable; multiple mappings)
 1.77 04-Apr-2002  thorpej Catch a couple more vector page mapping manipulations.
 1.76 03-Apr-2002  thorpej Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.75 03-Apr-2002  reinoud Rototil and fix the pmap_extract function. It wouldn't even return data
when the part being quiried was mapped with a section (!) giving weird
results and had become a mess of goto's.

Complete rewrite and cleaned up the `goto'-jungle entirely ... ripped all
goto's. The resulting code is much better to read and might even have a
small performance gain.
 1.74 25-Mar-2002  thorpej Fix reporting of the kernel virtual address space range to UVM.
 1.73 25-Mar-2002  thorpej * Some cleanup.
* Delete the call to pmap_copy() in pmap.h
 1.72 25-Mar-2002  thorpej Clean up pmap_map_ptes() and pmap_unmap_ptes() a little, and add
a debug assertion that curproc is never NULL if mapping a non-current
pmap.
 1.71 25-Mar-2002  thorpej The target page of pmap_zero_page(), pmap_pageidlezero(), and
pmap_copy_page() will never have any mappings. Therefore, it
is unnecessary to do a cache clean for that page.

Add assertions in #ifdef DEBUG that assert this invariant.

This shaves some cycles off the frequently-called pmap_zero_page()
and pmap_copy_page() (no need to look up the dst page's vm_page
structure, and one less function call to clean the page).
 1.70 25-Mar-2002  thorpej * Fix use of pmap_curmaxkvaddr.
* Use the PTP hint in the pmap.
 1.69 25-Mar-2002  thorpej Move some private pmap data structures into pmap.c
 1.68 24-Mar-2002  thorpej Garbage-collect pmap_pte() (and good riddance!)
 1.67 24-Mar-2002  chris remove pointless pg = NULL in else part of if (pg != NULL)
 1.66 24-Mar-2002  thorpej pmap_enter(): Use pmap_map_ptes() correctly.
 1.65 24-Mar-2002  chris Update pmap_copy_page to only map in the src readonly and only invalidate it after the copy, no need for it to flush the wb.
 1.64 24-Mar-2002  thorpej pmap_allocpagedir(): Don't use pmap_pte(), and simplify a little.
 1.63 24-Mar-2002  thorpej pmap_handled_emulation(): Fix locking protocol botch.
XXX Should we traverse the PV list and enable all PTEs?
 1.62 24-Mar-2002  thorpej pmap_handled_emulation(): Use pmap_map_ptes() correctly.
 1.61 24-Mar-2002  thorpej pmap_modified_emulation(): Use pmap_map_ptes() correctly.
 1.60 24-Mar-2002  thorpej pmap_unwire(): Use pmap_map_ptes() correctly.
 1.59 24-Mar-2002  thorpej pmap_clearbit(): Use pmap_map_ptes() correctly.
 1.58 24-Mar-2002  thorpej Use pmap_is_curpmap() consistently.
 1.57 24-Mar-2002  thorpej Clean up the PTP allocation functions a bit.
 1.56 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.55 24-Mar-2002  thorpej Remove some redundant tests in pmap_enter().
 1.54 23-Mar-2002  thorpej Garbage-collect the "pagehook" stuff.
 1.53 23-Mar-2002  thorpej * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.52 08-Mar-2002  thorpej Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:

* Group all information about the backend allocator for a pool in a
separate structure. The pool references this structure, rather than
the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
to become available, but will still fail if it cannot callocate KVA
space for the pages. If this happens, carefully drain all pools using
the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
some pages, and use that information to make draining easier and more
efficient.
* Get rid of PR_URGENT. There was only one use of it, and it could be
dealt with by the caller.

From art@openbsd.org.
 1.51 06-Mar-2002  chris Mostly style changes to stop us directly referencing tqh_first, and use TAILQ_FIRST instead. Based on rev 1.130 of the i386 pmap.c.
 1.50 05-Mar-2002  thorpej * Make pmap_is_{modified,referenced}() macros in pmap.h that just
test the attributes in the vm_page_md directly.
* Clean up pmap_clear_{modified,referenced}().
* Delete now-unused pmap_testbit().
 1.49 05-Mar-2002  thorpej Switch back to using vm_page_md (thanks chuq for finding the bug
in the code that made it unstable before!)
 1.48 03-Mar-2002  chris Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.47 22-Feb-2002  thorpej Change pmap_map_entry() to work like pmap_map_chunk(): take a pointer
to the L1 table and a virtual address, and no pointer to the L2 table.
The L2 table will be looked up by pmap_map_entry(), which will panic
if the there is no L2 table for the requested VA.

NOTE: IT IS EXTREMELY IMPORTANT THAT THE CORRECT VIRTUAL ADDRESS
BE PROVIDED TO pmap_map_entry()! Notably, the code that mapped
the kernel L2 tables into the kernel PT mapping L2 table were not
passing actual virtual addresses, but rather offsets into the range
mapped by the L2 table. I have fixed up all of these call sites,
and tested the resulting kernel on both an IQ80310 and a Shark.
Other portmasters should examine their pmap_map_entry() calls if
their new kernels fail.
 1.46 21-Feb-2002  thorpej Keep track of which kernel PTs are available during bootstrap,
and let pmap_map_chunk() lookup the correct one to use for the
current VA. Eliminate the "l2table" argument to pmap_map_chunk().

Add a second L2 table for mapping kernel text/data/bss on the
IQ80310 (fixes booting kernels with ramdisks).
 1.45 21-Feb-2002  thorpej In pmap_map_chunk(), if we can't use a section mapping, then
make sure that the L1 slot for the current VA points to an L2
table, and panic if it doesn't.
 1.44 21-Feb-2002  thorpej Always pass the L1 table to pmap_map_chunk(). This allows pmap_map_chunk()
to perform some error checking.
 1.43 21-Feb-2002  thorpej map_chunk() -> pmap_map_chunk(), and move it to pmap.c
 1.42 20-Feb-2002  thorpej map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c
 1.41 20-Feb-2002  thorpej Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
 1.40 20-Feb-2002  thorpej Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
 1.39 06-Feb-2002  thorpej Back out all the vm_page_md changes. They are causing some
mysterious problems (a similar change to the i386 pmap causes
mysterious problems there, as well), and the issue needs to
be investigated more.
 1.38 06-Feb-2002  thorpej Efficiency tweaks, some made possible by vm_page_md.
 1.37 05-Feb-2002  thorpej Use vm_page_md rather than pmap_physseg. Saves lots of cycles in
common operations.
 1.36 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.35 20-Jan-2002  thorpej Some prototype cleanup.
 1.34 17-Jan-2002  thorpej Teach pmap_extract() about section mappings.
 1.33 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.32 22-Nov-2001  thorpej Add cpu_cpwait() calls after TLB updates that are not expected to
be followed up by a pmap_update().
 1.31 19-Nov-2001  thorpej Implement pmap_update(). Currently it just calls cpu_cpwait(),
which ensures that TLB/cache operations have completed.
 1.30 03-Nov-2001  rearnsha branches: 1.30.2;
Replace most uses of pmap_pde_p with pmap_pde_page, since that is what
we need later in the code. This fixes a fatal kernel fault in
pmap_modified_emulation if a user application tries to access a kernel
address that is section-mapped.

Add a diagnostic that detects attempts to call pmap_kenter_pa with a
va that is section-mapped.
 1.29 01-Nov-2001  rearnsha When clearing the modified bit for modified emulation, don't turn
caching on for a page just because we are clearing the writable bit in
the PTE: this is incompatible with the way pmap_vac_me_harder works,
and the code in the modified emulation handler doesn't know about
recalculating the cachable attributes (nor should it, IMO).

Also, if we are invalidating a page, flush its TLB entry; for some
reason we were only doing this when clearing the Write or modified
bits.

These patches together seem to solve the random seg-faults that were
still occuring occasionally under heavy paging.
 1.28 18-Oct-2001  rearnsha branches: 1.28.2;
Add a comment describing the logic implemented by pmap_vac_me_harder.
 1.27 18-Oct-2001  rearnsha On processors that support both write-through and write-back cacheing
(eg ARM920), the mode in which the processor operates is governed by
the use of both the PT_C and PT_B bits:

PT_C=1,PT_B=1 -> Write-back
PT_C=1,PT_B=0 -> Write-through

To support this define pte_cache_mode (initialized to PT_C|PT_B) and
use that when enabling cacheing for a page.
 1.26 18-Oct-2001  rearnsha With a diagnostic kernel, printing out a message each time we fail
to allocate a L1 pt is often enough to bring the system to its knees:
so make the messages PDEBUG(0,...).

However, even with this step having more than a small number of
processes searching for a L1 pt can still be enough to bring the system
down, since they all run at high priority and sleep for very little time,
thus blocking out user code from completing. So implement an exponential
backoff when waiting for a page table, so that we don't hog the CPU when
memory is scarce.

Tested by running a make of the C compiler with "gnumake -j30" (and plenty
of swap space).
 1.25 18-Oct-2001  rearnsha Fix pmap_vac_me_harder to take into account pages that are mapped
into both kernel and user space.

Fixes port-arm32/13998.
 1.24 29-Sep-2001  chris Add a couple of simplelocks to make sure we call pagealloc with the uvm_object locked. Found while running a LOCKDEBUG kernel on cats.
 1.23 15-Sep-2001  chs a whole bunch of changes to improve performance and robustness under load:

- remove special treatment of pager_map mappings in pmaps. this is
required now, since I've removed the globals that expose the address range.
pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
no longer any need to special-case it.
- eliminate struct uvm_vnode by moving its fields into struct vnode.
- rewrite the pageout path. the pager is now responsible for handling the
high-level requests instead of only getting control after a bunch of work
has already been done on its behalf. this will allow us to UBCify LFS,
which needs tighter control over its pages than other filesystems do.
writing a page to disk no longer requires making it read-only, which
allows us to write wired pages without causing all kinds of havoc.
- use a new PG_PAGEOUT flag to indicate that a page should be freed
on behalf of the pagedaemon when it's unlocked. this flag is very similar
to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
pageout fails due to eg. an indirect-block buffer being locked.
this allows us to remove the "version" field from struct vm_page,
and together with shrinking "loan_count" from 32 bits to 16,
struct vm_page is now 4 bytes smaller.
- no longer use PG_RELEASED for swap-backed pages. if the page is busy
because it's being paged out, we can't release the swap slot to be
reallocated until that write is complete, but unlike with vnodes we
don't keep a count of in-progress writes so there's no good way to
know when the write is done. instead, when we need to free a busy
swap-backed page, just sleep until we can get it busy ourselves.
- implement a fast-path for extending writes which allows us to avoid
zeroing new pages. this substantially reduces cpu usage.
- encapsulate the data used by the genfs code in a struct genfs_node,
which must be the first element of the filesystem-specific vnode data
for filesystems which use genfs_{get,put}pages().
- eliminate many of the UVM pagerops, since they aren't needed anymore
now that the pager "put" operation is a higher-level operation.
- enhance the genfs code to allow NFS to use the genfs_{get,put}pages
instead of a modified copy.
- clean up struct vnode by removing all the fields that used to be used by
the vfs_cluster.c code (which we don't use anymore with UBC).
- remove kmem_object and mb_object since they were useless.
instead of allocating pages to these objects, we now just allocate
pages with no object. such pages are mapped in the kernel until they
are freed, so we can use the mapping to find the page to free it.
this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
 1.22 13-Sep-2001  chris Sprinkle some static and inline into a couple of functions. Remove dead entries from pmap.h.
 1.21 13-Sep-2001  chris Update pmap_clearbit to flush the cache if the area is being made readonly. Also only do this and the tlb flush if the pmap is the current pmap.
 1.20 10-Sep-2001  chris Update the pmap following some comments from Chuck Silvers:
Remove some overzealous locking of HEAD_TO_MAP
Remove a potential deadlock in pmap_copy_page
Change alloc and free l1pt to use kenter/kremove.
Update pmap_map to use kenter (only actually used by dumpsys, so no matching kremove)
 1.19 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.18 11-Aug-2001  chris branches: 1.18.2;
Fix compile without DIAGNOSTICs enabled
 1.17 11-Aug-2001  chris Checking a whole host of pmap changes:
Improved locking (not that we actually use it on a uniprocessor, but one day :)
Removed unneeded splvm's
tweaked pmap_clean_page code to only flush the cache if the page is mapped in the current pmap (based on diff from richard E)
Adopted pv entry allocation mechanism from i386.
Laid framework for returning ptp's when we've finished with them rather than holding onto them till the process exits.
ptp's are now allocated with a uvm object for the pmap, means that we can walk a list to free them off in pmap_release, until they get freed off by pmap_remove.

Also implemented a page zeroing function when the processor is idling. Note that hpcarm may wish to disable this.

I believe this code to be stable, if anyone has any problems please shout up.
 1.16 29-Jul-2001  chris Rework the pmap_release code to not have to walk the ptpt, it now uses a uvm_object to track the allocated vm_pages, this means it can free off the entries in the uvm_object.

Testing shows that it's about 5% faster on the make configure step for gmake.
 1.15 28-Jul-2001  chris A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.14 08-Jul-2001  chs branches: 1.14.2;
clean up pmap_k{enter_pa,remove}():
a page is allowed to be mapped normally when k-mapped.
use UVM_PGA_ZERO to get zeroed pages rather than zeroing here.
 1.13 06-Jul-2001  chris Implement proper versions of kenter_pa and kremove, I've based them on versions provided by Richard E.
 1.12 25-Jun-2001  chris Improve the vac_me_harder function, it is now slightly faster, however pmap_enter_pv is also now slightly slower, so they appear to balance out.

Note that I've some ideas in the works on how to improve the pv handling, so the slow down is short term only.

Also added non-advertising licence and copyright to myself and richard.
 1.11 24-Jun-2001  chris Add a pmap_map_ptes function to map another process page table entries into the current pmap (similair to pmap_pte) but this allows multiple use of it, rather than repeated calls of pmap_pte for pte, map_ptes returns a pointer to the va where the entries were mapped so it can be reused ptes can be found by indexing into it.

Update some of the functions that use pmap_pte to pmap_map_ptes.

Note that there's a dummy macro for pmap_unmap_ptes, this is because at some point locking will be needed, so we need to be able to unlock them.

Performance gain seems to be minimal, however long term it should help improve things.

This is similair to the i386 pmap_map_ptes, however it's based on a version from Richard Earnshaw.
 1.10 22-Jun-2001  chris Use a pool to store pmap structs.
 1.9 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.8 25-Apr-2001  thorpej Garbage-collect pmap_page_index().
 1.7 24-Apr-2001  thorpej Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.6 22-Apr-2001  thorpej Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
 1.5 20-Apr-2001  toshii In pmap_allocpagedir(), check if uvm_km_zalloc of ptpt is successful,
and handle alloc failure case.
 1.4 15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.3 04-Mar-2001  matt branches: 1.3.2; 1.3.4;
more vm_offset_t/vm_size_t -> {p,v}{addr,size}_t changes
move pmap_* declarations to pmap.h. fix conflicts this
exposed (e.g different definitions for pmap_bootstrap).
 1.2 04-Mar-2001  matt Convert some vm_size_t to vsize_t/psize_t. Change vaddr_t to paddr_t
where appropriate.
 1.1 04-Mar-2001  matt Move from arm32/arm32. s/vm_offset_t/vaddr_t/g
 1.3.4.4 23-Apr-2001  bouyer Sync with HEAD.
 1.3.4.3 27-Mar-2001  bouyer Sync with HEAD.
 1.3.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.4.1 04-Mar-2001  bouyer file pmap.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.3.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.14.2.9 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.14.2.8 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.14.2.7 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.2.6 16-Mar-2002  jdolecek Catch up with -current.
 1.14.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.14.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.14.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.14.2.1 03-Aug-2001  lukem update to -current
 1.18.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.28.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.30.2.19 11-Dec-2002  thorpej Sync with HEAD.
 1.30.2.18 11-Nov-2002  nathanw Catch up to -current
 1.30.2.17 18-Oct-2002  nathanw Catch up to -current.
 1.30.2.16 17-Sep-2002  nathanw Catch up to -current.
 1.30.2.15 28-Aug-2002  wrstuden There is no 'p', there is only 'l'.
 1.30.2.14 27-Aug-2002  thorpej Sync with -current.
 1.30.2.13 13-Aug-2002  thorpej From trunk:

Add the brutal hack that allows us to limp along using the read/write
cache line allocation policy on XScale CPUs: in pmap_enter(), if the
pmap is the kernel pmap, clear the X-bit in the PTE, thus disabling
read/write-allocate for managed kernel mappings.

Yes, this is ugly. But it makes userland code run with r/w-allocate,
which is a huge improvement on systems with low core memory performance.
 1.30.2.12 13-Aug-2002  nathanw Catch up to -current.
 1.30.2.11 01-Aug-2002  nathanw Catch up to -current.
 1.30.2.10 02-Jul-2002  nathanw Several curlwp references here can revert to curproc.
 1.30.2.9 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.30.2.8 20-Jun-2002  nathanw Catch up to -current.
 1.30.2.7 17-Apr-2002  nathanw Catch up to -current.
 1.30.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.30.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.30.2.4 11-Jan-2002  nathanw More catchup.
 1.30.2.3 08-Jan-2002  nathanw Catch up to -current.
 1.30.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.30.2.1 03-Nov-2001  thorpej file pmap.c was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.97.4.6 14-Feb-2003  he Revert pull-up of revision 1.110 (requested by rearnsha in ticket #1170):
Revert cached memory access to L1 tables, this causes instability
on the release branch.
 1.97.4.5 07-Dec-2002  he Pull up revision 1.111 (requested by thorpej in ticket #714):
Use a pool cache for PT-PTs.
 1.97.4.4 07-Dec-2002  he Pull up revision 1.105 (requested by thorpej in ticket #714):
Add code, conditional on PMAP_ALIAS_DEBUG, which can be
used to hunt for virtual aliases between managed (pmap_enter)
and unmanaged (pmap_kenter_pa) mappings.
 1.97.4.3 21-Nov-2002  he Pull up revision 1.110 (requested by thorpej in ticket #712):
Do cached memory access to L1 tables, making sure to
write-back the cache after any L1 table modifications.
 1.97.4.2 16-Nov-2002  he Pull up revision 1.107 (requested by thorpej in ticket #662):
Clean up some warts in pmap_protect().
 1.97.4.1 31-Jul-2002  lukem Pull up revision 1.100 (requested by thorpej in ticket #587):
Don't use pmap_kenter_pa() in pmap_map(); doing so causes an assertion
failure in pmap_kenter_pa().
 1.97.2.2 30-Aug-2002  gehenna catch up with -current.
 1.97.2.1 14-Jul-2002  gehenna catch up with -current.
 1.137.2.7 11-Dec-2005  christos Sync with head.
 1.137.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.137.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.137.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.137.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.137.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.137.2.1 03-Aug-2004  skrll Sync with HEAD
 1.150.4.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.150.2.1 29-Apr-2005  kent sync with -current
 1.154.2.6 21-Jan-2008  yamt sync with head
 1.154.2.5 15-Nov-2007  yamt sync with head.
 1.154.2.4 27-Oct-2007  yamt sync with head.
 1.154.2.3 03-Sep-2007  yamt sync with head.
 1.154.2.2 26-Feb-2007  yamt sync with head.
 1.154.2.1 21-Jun-2006  yamt sync with head.
 1.157.24.1 21-Feb-2007  snj branches: 1.157.24.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/arm32/pmap.c: revision 1.158
From Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html
I ran into a problem when I tried to set up a mapping that started at
virtual address 0xFFF00000 and was 0x00100000 long. In other words, the
mapping should have gone to the end of the 32 bit address space. The
mapping was made with no problem, but pmap_devmap_find_va() wouldn't
find an address within the mapping. For example, if I told it to find a
mapping for 0x1000 bytes at 0xFFF01000, it would try to make sure that
0xFFF01000 was greater than 0xFFF00000 and that (0xFFF01000+0x1000) was
less than (0xFFF00000 +0x00100000). However, that last expression
(0xFFF00000+0x00100000) wrapped around to be simply 0x00000000 so it
wasn't found. This patch fixes this problem in pmap_devmap_find_va()
and pmap_devmap_find_pa() by subtracting one off of the
 1.157.24.1.4.3 10-Nov-2007  matt Refix thinko. (deal with non-page-aligned starts/lengths)
 1.157.24.1.4.2 10-Nov-2007  matt Fix thinko.
 1.157.24.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.157.20.1 12-Jan-2007  ad Sync with head.
 1.158.2.5 15-Apr-2007  yamt sync with head.
 1.158.2.4 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.158.2.3 24-Mar-2007  yamt sync with head.
 1.158.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.158.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.161.2.6 03-Dec-2007  ad Sync with HEAD.
 1.161.2.5 19-Oct-2007  ad Sync with head.
 1.161.2.4 09-Oct-2007  ad Sync with head.
 1.161.2.3 27-May-2007  ad Sync with head.
 1.161.2.2 10-Apr-2007  ad Sync with head.
 1.161.2.1 13-Mar-2007  ad Sync with head.
 1.162.2.1 11-Jul-2007  mjf Sync with head.
 1.163.4.3 16-Oct-2007  garbled Sync with HEAD
 1.163.4.2 03-Oct-2007  garbled Sync with HEAD
 1.163.4.1 22-May-2007  matt Update to HEAD.
 1.164.12.10 04-Mar-2008  matt Fix a bug in pmap_flush_page which could nuke a PTE being used by
pmap_zero_page or pmap_copy_page.
 1.164.12.9 09-Jan-2008  matt sync with HEAD
 1.164.12.8 10-Nov-2007  matt Fix thinko. (need to deal non-page-aligned size/lengths)
 1.164.12.7 09-Nov-2007  matt Add pmap_icache_sync_range and change arm32_sync_icache to use it.
This will only invalidate va that have valid PTEs. This avoids cleaning
unneeded cache lines.
 1.164.12.6 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.164.12.5 08-Nov-2007  matt sync with -HEAD
 1.164.12.4 07-Nov-2007  matt Fix botched color assertion
 1.164.12.3 06-Nov-2007  matt sync with HEAD
 1.164.12.2 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.164.12.1 29-Aug-2007  matt Use ci_intr_depth
 1.164.10.2 20-Jan-2008  chris Sync to HEAD.
 1.164.10.1 01-Jan-2008  chris Sync with HEAD.
 1.164.8.3 11-Nov-2007  joerg Sync with HEAD.
 1.164.8.2 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.164.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.164.6.3 28-Feb-2008  rjs Sync with HEAD.
 1.164.6.2 26-Dec-2007  rjs Sync with HEAD.
 1.164.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.165.2.1 14-Oct-2007  yamt sync with head.
 1.166.2.1 13-Nov-2007  bouyer Sync with HEAD
 1.167.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.167.2.1 19-Nov-2007  mjf Sync with HEAD.
 1.169.6.2 08-Jan-2008  bouyer Sync with HEAD
 1.169.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.171.6.7 17-Jan-2009  mjf Sync with HEAD.
 1.171.6.6 05-Oct-2008  mjf Sync with HEAD.
 1.171.6.5 28-Sep-2008  mjf Sync with HEAD.
 1.171.6.4 29-Jun-2008  mjf Sync with HEAD.
 1.171.6.3 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.171.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.171.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.172.2.2 17-Jun-2008  yamt sync with head.
 1.172.2.1 18-May-2008  yamt sync with head.
 1.173.2.4 11-Aug-2010  yamt sync with head.
 1.173.2.3 11-Mar-2010  yamt sync with head
 1.173.2.2 04-May-2009  yamt sync with head.
 1.173.2.1 16-May-2008  yamt sync with head.
 1.175.2.3 10-Oct-2008  skrll Sync with HEAD.
 1.175.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.175.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.176.2.4 18-Jul-2008  simonb Sync with head.
 1.176.2.3 03-Jul-2008  simonb Sync with head.
 1.176.2.2 27-Jun-2008  simonb Sync with head.
 1.176.2.1 18-Jun-2008  simonb Sync with head.
 1.180.2.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.180.2.1 19-Oct-2008  haad Sync with HEAD.
 1.187.8.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.187.8.1 21-Apr-2010  matt sync to netbsd-5
 1.187.4.1 03-Dec-2009  sborrill Pull up the following revisions(s) (requested by scw in ticket #1168):
sys/arch/arm/arm32/pmap.c: revision 1.203

Work-around a possible process exit corner case which can leave stale
data in the cache after a context-switch. Addresses kern/41058.
 1.187.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.187.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.195.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.211.2.23 15-Nov-2010  uebayasi Revert xmd(4).
 1.211.2.22 10-Nov-2010  uebayasi Fix thinko; make vm_physseg ptr swap really work.
 1.211.2.21 10-Nov-2010  uebayasi opt_xip.h isn't needed any more here.
 1.211.2.20 10-Nov-2010  uebayasi Always use VM_PHYSMEM_PTR().
 1.211.2.19 06-Nov-2010  uebayasi Sync with HEAD.
 1.211.2.18 31-Oct-2010  uebayasi We already have a flag PMAP_NOCACHE. s/PMAP_UNMANAGED/PMAN_NOCACHE/.
Pointed out by Chuck Silvers, thanks.
 1.211.2.17 31-Oct-2010  uebayasi More struct vm_page * -> struct vm_page_md * adjustments.
 1.211.2.16 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.211.2.15 17-Aug-2010  uebayasi Sync with HEAD.
 1.211.2.14 07-Jul-2010  uebayasi Clean up; merge options DIRECT_PAGE into options XIP.
 1.211.2.13 31-May-2010  uebayasi Re-define the definition of "device page"; device pages are pages of
device memory. Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.
 1.211.2.12 30-Apr-2010  uebayasi Sync with HEAD.
 1.211.2.11 28-Apr-2010  uebayasi Always use struct vm_physseg *vm_physmem_ptrs[] in MD code.
 1.211.2.10 27-Apr-2010  uebayasi Support PMAP_UNMANAGED in some pmaps.

(Others should be converted eventually, but no problem while managed
device page is not used.)
 1.211.2.9 25-Feb-2010  uebayasi A few more VM_PAGE_TO_MD().
 1.211.2.8 20-Feb-2010  uebayasi Fix \!DIAGNOSTIC build.
 1.211.2.7 10-Feb-2010  uebayasi Adjust previous.
 1.211.2.6 10-Feb-2010  uebayasi Replace all remaining pg->mdpage references with VM_PAGE_TO_MD(). Now struct
vm_page * is fully opaque.
 1.211.2.5 10-Feb-2010  uebayasi Fix previous again & use VM_PAGE_TO_MD() where appropriate.
 1.211.2.4 10-Feb-2010  uebayasi Convert pmap_enter() and pmap_vac_me_harder().
 1.211.2.3 10-Feb-2010  uebayasi Convert pmap_enter_pv().
 1.211.2.2 10-Feb-2010  uebayasi Convert pmap_remove_pv() / pmap_modify_pv() to take struct vm_page_md *.
 1.211.2.1 10-Feb-2010  uebayasi Start changing this to be ready for device page (XIP). The basic rule is
device pages don't have struct vm_page * objects. Instead per-page data
(mainly PV mappings) is rooted from the global struct vm_page_md array.

Convert 2 functions to take struct vm_page_md * instead of struct vm_page *.
 1.212.2.6 19-May-2011  rmind Implement sharing of vnode_t::v_interlock amongst vnodes:
- Lock is shared amongst UVM objects using uvm_obj_setlock() or getnewvnode().
- Adjust vnode cache to handle unsharing, add VI_LOCKSHARE flag for that.
- Use sharing in tmpfs and layerfs for underlying object.
- Simplify locking in ubc_fault().
- Sprinkle some asserts.

Discussed with ad@.
 1.212.2.5 21-Apr-2011  rmind sync with head
 1.212.2.4 05-Mar-2011  rmind sync with head
 1.212.2.3 03-Jul-2010  rmind sync with head
 1.212.2.2 30-May-2010  rmind sync with head
 1.212.2.1 16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.219.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.219.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.221.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.224.6.1 18-Feb-2012  mrg merge to -current.
 1.224.2.5 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.224.2.4 23-Jan-2013  yamt sync with head
 1.224.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.224.2.2 30-Oct-2012  yamt sync with head
 1.224.2.1 17-Apr-2012  yamt sync with head
 1.228.2.2 09-Feb-2013  riz Pull up following revision(s) (requested by msaitoh in ticket #803):
 1.251 01-Feb-2013  matt cleanup PVF_WRITE & pvh_attrs interaction.
 1.250 31-Jan-2013  skrll Another typo in a comment.
 1.249 31-Jan-2013  skrll Typo in comment.
 1.247 11-Jan-2013  matt Fix a bug in pmap_modify_pv where we didnt set PVF_WRITE on a page after
changing its mapping to writeable.
Add more KASSERTS
Dont go into DDB by default in pmap_fixup.
 1.243 10-Dec-2012  matt Change a KASSERT to a KASSERTMSG
 1.233 29-Aug-2012  matt Support PMAP_NOCACHE in pmap_kenter_pa
 1.232 29-Aug-2012  matt Use the correct prot mask in vector_page_setprot
 1.228.2.1 09-Aug-2012  jdc branches: 1.228.2.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.228.2.1.2.3 13-Feb-2013  matt Sync with HEAD
 1.228.2.1.2.2 07-Feb-2013  matt pullup pmap changes from HEAD
 1.228.2.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.236.2.5 03-Dec-2017  jdolecek update from HEAD
 1.236.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.236.2.3 23-Jun-2013  tls resync from head
 1.236.2.2 25-Feb-2013  tls resync with head
 1.236.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.257.2.2 18-May-2014  rmind sync with head
 1.257.2.1 28-Aug-2013  rmind sync with head
 1.280.2.1 10-Aug-2014  tls Rebase.
 1.295.2.11 03-Jun-2017  snj Pull up following revision(s) (requested by skrll in ticket #1424):
sys/arch/arm/arm32/pmap.c: revision 1.345
Perform icache syncs for ARM_MMU_EXTENDED as well. This helps the PT_STEP
code in pr/52119 and probably other things.
 1.295.2.10 11-Mar-2017  snj fix fallout from ticket #1366: __nothing is nothing on netbsd-7
 1.295.2.9 11-Mar-2017  snj Pull up following revision(s) (requested by skrll in ticket #1366):
sys/arch/arm/include/arm32/pmap.h: 1.145
sys/arch/arm/arm32/pmap.c: 1.343, 1.344
sys/arch/evbarm/gumstix/gumstix_machdep.c: 1.58 via patch
Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.
Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.
PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
--
fix unused.
--
Set xscale_cache_clean_addr appropriately and re-arrange default KVA
layout to allow direct map for all boards.
OVERO/DUOVERO/PEPPER aren't tested.
PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size
 1.295.2.8 26-Feb-2016  snj branches: 1.295.2.8.2;
Pull up following revision(s) (requested by skrll in ticket #1106):
sys/arch/arm/arm32/pmap.c: revision 1.332
Delete pmap_pmaps and its only user pmap_dump_all. The list wasn't
being updated in an MP-safe manner.
 1.295.2.7 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.295.2.6 26-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #800):
sys/arch/arm/arm32/pmap.c: revision 1.320
sys/arch/arm/arm32/pmap.c: revision 1.321
sys/arch/arm/arm32/pmap.c: revision 1.322
sys/arch/arm/arm32/pmap.c: revision 1.319
- include "opt_arm_debug.h" for VERBOSE_INIT_ARM
- Add pmap locking to pmap_kenter_pa/kremove
- Make sure nptes is a multiple of PAGE_SIZE / L2_S_SIZE.
- Use PDE_SYNC when syncing pdeps
 1.295.2.5 19-May-2015  snj Pull up following revision(s) (requested by joerg in ticket #777):
sys/arch/arm/arm32/pmap.c: revision 1.308
pmap_tlb_flushD is for !ARM_MMU_EXTENDED only now
 1.295.2.4 10-Apr-2015  snj Pull up following revision(s) (requested by skrll in ticket #669):
sys/arch/arm/arm32/pmap.c: revision 1.318
Fix two bugs. pmap_is_cached fix for MULTIPROCESSOR (not just ASID on
local cpu -> any valid ASID on any cpu).
pmap_deactivate: update curcpu()->ci_pmap_cur_asid to KERNEL_PID too.
 1.295.2.3 10-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #209):
sys/arch/arm/pic/pic.c: revision 1.25
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.312
sys/arch/arm/arm32/bus_dma.c: revision 1.89
sys/arch/arm/arm32/pmap.c: revision 1.313
sys/arch/arm/arm32/pmap.c: revision 1.314
sys/arch/arm/arm32/pmap.c: revision 1.315
sys/arch/arm/arm32/pmap.c: revision 1.316
Include opt_multiprocessor.h
When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
Post a dmb before invalidating the cache in the post-{read,write}
operations to ensure that any/all cachelines brought in via speculation
are really flushed.
Ensure all memory operations are complete by before wfi. For example, the
cpu could have just been in uvm_pageidlezero.
In pmap_fault_fixup re-instate the TLB flush for the shared L1 case that
occurs for non-ARM_MMU_EXTENDED kernels.
This fixes rump/rumpkern/t_sp:stress_killer on rpi which is currently
non-ARM_MMU_EXTENDED
Remove an unnecessary flush that sneaked in as part of break-before-make
change.
Remove an XXXNH comment.
Update PTE_SYNC_CURRENT to add a dsb for armv7 - part of the
break-before-make fix.
 1.295.2.2 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.295.2.1 30-Oct-2014  martin Pull up following revision(s) (requested by maxv in ticket #165):
sys/arch/newsmips/stand/boot/netif_news.c: revision 1.9
sys/arch/mvme68k/stand/installboot/installboot.c: revision 1.19
sys/arch/arm/arm32/pmap.c: revision 1.300
sys/arch/amiga/dev/siop2.c: revision 1.43
sys/arch/amiga/amiga/disksubr.c: revision 1.62
sys/arch/news68k/news68k/bus_space.c: revision 1.13
sys/arch/amiga/dev/siop.c: revision 1.69
sys/arch/x86/x86/x86_autoconf.c: revision 1.72
Remove dead code in various places under arch/.
 1.295.2.8.2.1 13-Mar-2017  skrll Sync with netbsd-7-1-RELEASE
 1.316.2.7 28-Aug-2017  skrll Sync with HEAD
 1.316.2.6 05-Feb-2017  skrll Sync with HEAD
 1.316.2.5 05-Oct-2016  skrll Sync with HEAD
 1.316.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.316.2.3 22-Sep-2015  skrll Sync with HEAD
 1.316.2.2 06-Jun-2015  skrll Sync with HEAD
 1.316.2.1 06-Apr-2015  skrll Sync with HEAD
 1.335.2.4 26-Apr-2017  pgoyette Sync with HEAD
 1.335.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.335.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.335.2.1 06-Aug-2016  pgoyette Sync with HEAD
 1.342.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.349.2.3 23-Apr-2019  martin Pull up following revision(s) (requested by bouyer in ticket #1246):

sys/arch/arm/arm32/pmap.c: revision 1.373 (via patch)

Fix a deadlock between the pool and pmap codes:

- cpu0 grabs the kernel lock (e.g. from a non-MPSAFE interrupt) and
calls pool_get().
- cpu1 does a pool_get() on the same pool from MPSAFE code, which needs a
pool_page_alloc(), which ends up in pmap_extract_coherency().

So cpu0 holds the kernel_lock and wants the pool lock. cpu1 holds the pool
lock and wants the kernel_lock in pmap_extract_coherency().

The pmap code should not rely on kernel_lock. Intead make the
pmap_kernel()->pm_obj_lock a IPL_VM lock and use it as pmap lock
(thus dropping the pmap test pmap_{acquire,release}_pmap_lock()).

This needs to be a IPL_VM because unlike user pmaps, this can be locked
from interrupt context.

Add a IPL_NONE lock for pmap_growkernel(). We can't use
pmap_kernel()->pm_obj_lock here because pmap_grow_map() may sleep.

Make pmap_lock (which may be locked with pm_obj_lock held) a IPL_VM
lock in all case.
reorder a few things to not call pool_get()/pool_put() (which may sleep)
with pm_obj_lock held.

Patch initially posted to port-arm@ on April 19, improved patch (per
suggestions from Nick Hudson and Jason Thorpe) on April 21.
 1.349.2.2 23-Apr-2019  martin Pull up following revision(s) (requested by bouyer in ticket #1245):

sys/arch/arm/arm32/pmap.c: revision 1.372

Don't try to aquire/release the pmap lock when in ddb.

Avoids a deadlock when entering ddb, or on "mach cpu n" ddb command
(the pmap lock may already be held by another CPU, which is halted when
entering ddb).

Posted to port-arm@ on April 19.
 1.349.2.1 02-Nov-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #335):
share/man/man9/kernhist.9: 1.5-1.8
sys/arch/acorn26/acorn26/pmap.c: 1.39
sys/arch/arm/arm32/fault.c: 1.105 via patch
sys/arch/arm/arm32/pmap.c: 1.350, 1.359
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
sys/arch/arm/omap/if_cpsw.c: 1.20
sys/arch/arm/omap/tiotg.c: 1.7
sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
sys/dev/ic/sl811hs.c: 1.98
sys/dev/usb/ehci.c: 1.256
sys/dev/usb/if_axe.c: 1.83
sys/dev/usb/motg.c: 1.18
sys/dev/usb/ohci.c: 1.274
sys/dev/usb/ucom.c: 1.119
sys/dev/usb/uhci.c: 1.277
sys/dev/usb/uhub.c: 1.137
sys/dev/usb/umass.c: 1.160-1.162
sys/dev/usb/umass_quirks.c: 1.100
sys/dev/usb/umass_scsipi.c: 1.55
sys/dev/usb/usb.c: 1.168
sys/dev/usb/usb_mem.c: 1.70
sys/dev/usb/usb_subr.c: 1.221
sys/dev/usb/usbdi.c: 1.175
sys/dev/usb/usbdi_util.c: 1.67-1.70
sys/dev/usb/usbroothub.c: 1.3
sys/dev/usb/xhci.c: 1.75
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
sys/kern/kern_history.c: 1.15
sys/kern/kern_xxx.c: 1.74
sys/kern/vfs_bio.c: 1.275-1.276
sys/miscfs/genfs/genfs_io.c: 1.71
sys/sys/kernhist.h: 1.21
sys/ufs/ffs/ffs_balloc.c: 1.63
sys/ufs/lfs/lfs_vfsops.c: 1.361
sys/ufs/lfs/ulfs_inode.c: 1.21
sys/ufs/lfs/ulfs_vnops.c: 1.52
sys/ufs/ufs/ufs_inode.c: 1.102
sys/ufs/ufs/ufs_vnops.c: 1.239
sys/uvm/pmap/pmap.c: 1.37-1.39
sys/uvm/pmap/pmap_tlb.c: 1.22
sys/uvm/uvm_amap.c: 1.108
sys/uvm/uvm_anon.c: 1.64
sys/uvm/uvm_aobj.c: 1.126
sys/uvm/uvm_bio.c: 1.91
sys/uvm/uvm_device.c: 1.66
sys/uvm/uvm_fault.c: 1.201
sys/uvm/uvm_km.c: 1.144
sys/uvm/uvm_loan.c: 1.85
sys/uvm/uvm_map.c: 1.353
sys/uvm/uvm_page.c: 1.194
sys/uvm/uvm_pager.c: 1.111
sys/uvm/uvm_pdaemon.c: 1.109
sys/uvm/uvm_swap.c: 1.175
sys/uvm/uvm_vnode.c: 1.103
usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3)
format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
but it is possible that I've missed some of them. I would be glad
to
update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes. Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one. :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.
 1.364.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.364.2.3 20-Oct-2018  pgoyette Sync with head
 1.364.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.364.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.365.2.4 21-Apr-2020  martin Sync with HEAD
 1.365.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.365.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.365.2.1 10-Jun-2019  christos Sync with HEAD
 1.373.2.2 27-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #742):

sys/arch/arm/arm32/pmap.c: revision 1.388
sys/arch/arm/arm32/armv7_generic_space.c: revision 1.11
sys/arch/arm/arm/cpufunc.c: revision 1.176
sys/arch/arm/conf/Makefile.arm: revision 1.54 (via patch)
sys/arch/arm/include/arm32/pmap.h: revision 1.161

Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.
armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO
bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.
XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.373.2.1 10-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #691):

sys/arch/arm/arm32/pmap.c: revision 1.383
sys/arch/arm/arm32/pmap.c: revision 1.385
sys/arch/arm/arm32/pmap.c: revision 1.386
sys/arch/arm/arm32/pmap.c: revision 1.387
sys/arch/arm/arm32/pmap.c: revision 1.374
sys/arch/arm/arm32/pmap.c: revision 1.375
sys/arch/arm/arm32/pmap.c: revision 1.376
sys/arch/arm/arm32/pmap.c: revision 1.377
sys/arch/arm/arm32/pmap.c: revision 1.378
sys/arch/arm/arm32/pmap.c: revision 1.379

Convert a __CTASSERT into a KASSERT as L1_S_CACHE_MASK may not be a
compile time constant if ARM_NMMUS > 1

Improve a comment

Update PMAP_STEAL_MEMORY code to uvm_hotplug

Typo in comment

Fix a bug introduced in 1.271 where pmap_grow_map would no longer map
the allocated page for the uvm.page_init_done == false case when
PMAP_STEAL_MEMORY is not defined.

Trailing whitespace

Fix comment

Always pmap_kenter_pa the page in pmap_grow_map regardless of how we got
it.

Always call pmap_grow_map with a page aligned new VA. KASSERT that this
happenes.

More KNF
 1.375.2.4 29-Feb-2020  ad Sync with head.
 1.375.2.3 29-Feb-2020  ad Sync with head.
 1.375.2.2 25-Jan-2020  ad Sync with head.
 1.375.2.1 17-Jan-2020  ad Sync with head.
 1.402.2.2 25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)
 1.402.2.1 20-Apr-2020  bouyer Sync with HEAD
 1.422.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.426.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.437.4.4 18-Apr-2024  martin Pull up following revision(s) (requested by skrll in ticket #666):

sys/arch/arm/arm32/pmap.c: revision 1.443

port-arm/58135: reproducible pmap KASSERT failure for armv7 with NFS root

Don't unconditionally set XN in pmap_clearbit - only set it if a mapping
exists VM_PROT_EXEC is being cleared.

I've simplified the #ifdefs in the patch from the PR.
 1.437.4.3 14-Dec-2023  martin Pull up following revision(s) (requested by rin in ticket #495):

sys/arch/arm/arm/smccc.c: revision 1.4
sys/arch/arm/arm32/pmap.c: revision 1.441

smccc: Adjust SMCCC_ARCH_ATTRIBUTE for clang/arm
Conditionally use
(1) __attribute__ ((target("arch=armv7ve")))
(2) __attribute__ ((target("armv7ve")))
for gcc and clang, respectively.

While gcc does not accept (2), clang accepts (1) but silently ignores it :(

arm: pmap: Fix clang build without DIAGNOSTIC
 1.437.4.2 14-Oct-2023  martin Pull up following revision(s) (requested by skrll in ticket #411):

sys/arch/evbarm/nslu2/nslu2_machdep.c: revision 1.41
sys/arch/evbarm/gumstix/gumstix_machdep.c: revision 1.75
sys/arch/evbarm/iq80321/iq80321_machdep.c: revision 1.66
sys/arch/iyonix/iyonix/iyonix_machdep.c: revision 1.34
sys/arch/zaurus/zaurus/machdep.c: revision 1.52
sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c: revision 1.41
sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c: revision 1.33
sys/arch/evbarm/iq80310/iq80310_machdep.c: revision 1.96
sys/arch/evbarm/adi_brh/brh_machdep.c: revision 1.53
sys/arch/arm/include/arm32/pmap.h: revision 1.177
sys/arch/evbarm/viper/viper_machdep.c: revision 1.34
sys/arch/evbarm/iyonix/iyonix_machdep.c: revision 1.5
sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c: revision 1.30
sys/arch/evbarm/hdl_g/hdlg_machdep.c: revision 1.35
sys/arch/arm/arm32/pmap.c: revision 1.440
sys/arch/evbarm/lubbock/lubbock_machdep.c: revision 1.45
sys/arch/evbarm/ixdp425/ixdp425_machdep.c: revision 1.47

Fix non-DIAGNOSTIC builds
 1.437.4.1 19-Dec-2022  martin Pull up following revision(s) (requested by skrll in ticket #4):

sys/arch/arm/arm32/pmap.c: revision 1.438
sys/arch/arm/arm/efi_machdep.c: revision 1.3

Appease KDASSERT / LOCKDEBUG.

Tested by mlelstv.
 1.13 21-May-2003  thorpej Move the new pmap from arm32/pmap_new.c to arm32/pmap.c, fully replacing
the old.
 1.12 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
 1.11 08-May-2003  thorpej Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.10 03-May-2003  thorpej Fix a couple of comments.
 1.9 03-May-2003  thorpej Reduce differences between ARM32_NEW_VM_LAYOUT and not; always pass
the start and end of the kernel managed virtual address space to
pmap_bootstrap() in the new pmap.
 1.8 02-May-2003  thorpej Eliminate the last reference to PTE_BASE in the new pmap.
 1.7 02-May-2003  scw Rework pmap_growkernel() to *not* use the regular pmap_alloc_l2_bucket()
for L2 allocation. This avoids potential recursive calls into
uvm_km_kmemalloc() via the pool allocator.

Bug spotted by Allen Briggs while trying to boot on a machine with 512MB
of memory.
 1.6 28-Apr-2003  scw Fix the bug reported by Richard Earnshaw in port-arm32/21349.

Make sure to check the access permissions before doing
ref/mod/domain fixups. This is particularly important
on machines with ARM_VECTORS_LOW.
 1.5 22-Apr-2003  thorpej pmap_link_l2pt(): If not ARM32_NEW_VM_LAYOUT, add an assertion that
the VA that the page table maps is aligned to a 4MB boundary.
 1.4 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.3 18-Apr-2003  thorpej Use L1_S_MAPPABLE_P() and L2_L_MAPPABLE_P().
 1.2 18-Apr-2003  scw Didn't mean to leave PMAP_DEBUG enabled ...
 1.1 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.2 05-Aug-2001  chris branches: 1.2.6;
Share procfs_machdep.c across arm.
 1.1 28-Jul-2001  chris branches: 1.1.2;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.2.3 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file procfs_machdep.c was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.2.6.2 05-Aug-2001  chris Share procfs_machdep.c across arm.
 1.2.6.1 05-Aug-2001  chris file procfs_machdep.c was added on branch nathanw_sa on 2001-08-05 13:09:48 +0000
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 15-Aug-2002  briggs branches: 1.2.134; 1.2.150; 1.2.160; 1.2.166;
* Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.8; 1.1.16;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.16.1 30-Aug-2002  gehenna catch up with -current.
 1.1.8.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.8.1 28-Jul-2001  thorpej file setcpsr.S was added on branch nathanw_sa on 2002-08-19 21:39:05 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file setcpsr.S was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.2.166.1 28-Aug-2013  rmind sync with head
 1.2.160.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.150.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.134.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.5 16-Feb-2012  christos branches: 1.5.2; 1.5.4;
don't need arm/cpu.h, we just need the cpureg.h...
 1.4 27-Apr-2008  matt branches: 1.4.18; 1.4.34; 1.4.38; 1.4.42;
Merge kernel changes in matt-armv6 to HEAD.
 1.3 19-Jan-2008  chris branches: 1.3.6; 1.3.8; 1.3.10;
When chaning processor mode on ARM use cpsr_c, rather than cpsr_all.
 1.2 15-Aug-2002  briggs branches: 1.2.24; 1.2.82; 1.2.86; 1.2.88; 1.2.94; 1.2.102;
* Use local label names (.Lfoo vs. (Lfoo or foo))
* When moving from cpsr, use "cpsr" instead of "cpsr_all" (which is
provided, but doesn't make sense since mrs doesn't support fields
like msr does).
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.8; 1.1.16;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.16.1 30-Aug-2002  gehenna catch up with -current.
 1.1.8.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.8.1 28-Jul-2001  thorpej file setstack.S was added on branch nathanw_sa on 2002-08-19 21:39:06 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file setstack.S was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.2.102.1 20-Jan-2008  bouyer Sync with HEAD
 1.2.94.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.88.1 23-Mar-2008  matt sync with HEAD
 1.2.86.1 20-Jan-2008  chris Sync to HEAD.
 1.2.82.1 28-Feb-2008  rjs Sync with HEAD.
 1.2.24.1 21-Jan-2008  yamt sync with head
 1.3.10.1 16-May-2008  yamt sync with head.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.38.1 18-Feb-2012  mrg merge to -current.
 1.4.34.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.4.34.1 17-Apr-2012  yamt sync with head
 1.4.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.4.1 28-Aug-2013  rmind sync with head
 1.5.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11 11-Oct-2021  rin splx: Restore interrupts before dosoftints() for __HAVE_FAST_SOFTINTS.

No functional changes; All the users of arm32/spl.S, i.e., acorn32,
hpcarm/sa11x0, and shark have not switched to __HAVE_FAST_SOFTINTS yet.
 1.10 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.9 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.8 27-Apr-2008  matt branches: 1.8.18; 1.8.34; 1.8.44; 1.8.50;
Merge kernel changes in matt-armv6 to HEAD.
 1.7 03-Dec-2007  ad branches: 1.7.14; 1.7.16; 1.7.18;
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.6 17-Oct-2007  garbled branches: 1.6.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.5 13-Aug-2007  tsutsui branches: 1.5.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.4 17-Aug-2002  thorpej branches: 1.4.24; 1.4.66; 1.4.74; 1.4.80; 1.4.82; 1.4.84; 1.4.86;
More local label fixups.
 1.3 26-Nov-2001  thorpej branches: 1.3.8;
Use <arm/arm32/psl.h>, not <machine/psl.h>.
 1.2 28-Sep-2001  chris branches: 1.2.4;
Tweak spl functions a little, try to do something between an ldr and it's use. Not the greatest of gains but spl is called a lot it might add up.
Also add comments stating alignment of stack.
 1.1 28-Jul-2001  chris branches: 1.1.2; 1.1.4;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file spl.S was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.2.4.3 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 28-Sep-2001  nathanw file spl.S was added on branch nathanw_sa on 2002-01-08 00:23:09 +0000
 1.3.8.1 30-Aug-2002  gehenna catch up with -current.
 1.4.86.2 01-Jan-2008  chris Sync with HEAD.
 1.4.86.1 18-Aug-2007  chris Sync with HEAD
 1.4.84.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.4.84.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.4.82.2 26-Dec-2007  rjs Sync with HEAD.
 1.4.82.1 01-Nov-2007  rjs Sync with HEAD.
 1.4.80.1 15-Aug-2007  skrll Sync with HEAD.
 1.4.74.1 03-Oct-2007  garbled Sync with HEAD
 1.4.66.3 03-Dec-2007  ad Sync with HEAD.
 1.4.66.2 03-Dec-2007  ad Sync with HEAD.
 1.4.66.1 20-Aug-2007  ad Sync with HEAD.
 1.4.24.2 07-Dec-2007  yamt sync with head
 1.4.24.1 03-Sep-2007  yamt sync with head.
 1.5.2.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.5.2.2 09-Jan-2008  matt sync with HEAD
 1.5.2.1 11-Sep-2007  matt Adapt to move of current_spl_level to curcpu()->ci_cpl
 1.6.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.18.1 16-May-2008  yamt sync with head.
 1.7.16.1 18-May-2008  yamt sync with head.
 1.7.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.50.2 18-May-2014  rmind sync with head
 1.8.50.1 28-Aug-2013  rmind sync with head
 1.8.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.34.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.8.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2 13-May-2001  bjh21 branches: 1.2.8;
strstr() is no longer used in the kernel. G/C it.
 1.1 04-Mar-2001  matt branches: 1.1.4;
Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file strstr.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.2.8.2 13-May-2001  bjh21 strstr() is no longer used in the kernel. G/C it.
 1.2.8.1 13-May-2001  bjh21 file strstr.c was added on branch nathanw_sa on 2001-05-13 14:17:37 +0000
 1.27 03-Jul-2020  skrll KNF
 1.26 20-Jun-2020  skrll KNF
 1.25 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.24 12-Nov-2012  skrll branches: 1.24.18; 1.24.28;
C99 types
 1.23 12-Dec-2011  mrg branches: 1.23.4; 1.23.6;
implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
 1.22 07-Nov-2009  cegger branches: 1.22.12; 1.22.16;
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.21 15-Mar-2009  cegger ansify function definitions
 1.20 21-Jan-2009  he branches: 1.20.2;
Re-adapt to the changed return types for major() and minor().
 1.19 11-Jan-2009  cegger use PRI format macros to printf major and minor values
 1.18 01-Jan-2008  chris branches: 1.18.6; 1.18.10; 1.18.18; 1.18.26;
Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.17 04-Mar-2007  christos branches: 1.17.16; 1.17.20; 1.17.22; 1.17.28; 1.17.34;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 21-Oct-2006  mrg branches: 1.16.4;
in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device
with no driver loaded. this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf(). (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
 1.15 11-Dec-2005  christos branches: 1.15.20; 1.15.22;
merge ktrace-lwp.
 1.14 15-Jul-2003  lukem branches: 1.14.16;
__KERNEL_RCSID()
 1.13 01-Apr-2003  thorpej branches: 1.13.2;
Use PAGE_SIZE rather than NBPG.
 1.12 23-Mar-2003  chris When doing a kernel dump use the pmap_k* funcs. Also make sure that all
data is written to ram. This avoids issues with tlb's not being flushed
etc.

As discussed a long time ago on port-arm
 1.11 28-Dec-2002  reinoud Remove spurious declaration of bootconfig structure since that is already
done in bootconfig.h
 1.10 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.9 23-Mar-2002  thorpej branches: 1.9.2;
Garbage-collect the "pagehook" stuff.
 1.8 06-Mar-2002  tsutsui Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
 1.7 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.6 26-Nov-2001  thorpej Move interrupt-related stuff out of stubs.c into intr.c.
 1.5 27-Oct-2001  rearnsha branches: 1.5.2;
Set initial spl level to SPL_SERIAL, which for some strange reason
is higher than SPL_HIGH (maybe we should be fixing SPL_HIGH).

If IPL_STATCLOCK is defined, initialize spl_masks[_SPL_STATCLOCK] from
it; otherwise initialize use IPL_CLOCK.
 1.4 05-Sep-2001  matt branches: 1.4.4;
Don't compile SPL/INTR stuff if NEWINTR is defined.
 1.3 05-Sep-2001  matt Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.2 12-Aug-2001  jdolecek Move _insque()/_remque() to libkern. Once remaining uses would
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated
altogether.
 1.1 28-Jul-2001  chris branches: 1.1.2;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.2.8 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.7 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.6 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.5 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.4 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.3 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file stubs.c was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.4.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.5.2.7 29-Dec-2002  thorpej Sync with HEAD.
 1.5.2.6 17-Sep-2002  nathanw Catch up to -current.
 1.5.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.5.2.3 11-Jan-2002  nathanw More catchup.
 1.5.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.2.1 27-Oct-2001  nathanw file stubs.c was added on branch nathanw_sa on 2002-01-08 00:23:09 +0000
 1.9.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.16.3 21-Jan-2008  yamt sync with head
 1.14.16.2 03-Sep-2007  yamt sync with head.
 1.14.16.1 30-Dec-2006  yamt sync with head.
 1.15.22.1 22-Oct-2006  yamt sync with head
 1.15.20.1 18-Nov-2006  ad Sync with head.
 1.16.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.17.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.17.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.22.1 09-Jan-2008  matt sync with HEAD
 1.17.20.1 01-Jan-2008  chris Sync with HEAD.
 1.17.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.18.26.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.18.18.3 28-Apr-2009  skrll Sync with HEAD.
 1.18.18.2 03-Mar-2009  skrll Sync with HEAD.
 1.18.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.10.2 11-Mar-2010  yamt sync with head
 1.18.10.1 04-May-2009  yamt sync with head.
 1.18.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.20.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.16.1 18-Feb-2012  mrg merge to -current.
 1.22.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.22.12.1 17-Apr-2012  yamt sync with head
 1.23.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.24.28.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.24.18.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.26 20-Jun-2020  skrll KNF
 1.25 20-Jun-2020  skrll KNF #includes

Remove some unnecessary ones while I'm here.
 1.24 20-Jun-2020  skrll Trailing whitespace
 1.23 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.22 02-Jul-2015  skrll branches: 1.22.2; 1.22.4;
Use armreg_*_{read,write} instead of handcrafted asm

No functional change.
 1.21 22-Mar-2015  joerg Mark as volatile, just to be sure.
 1.20 03-Mar-2014  matt branches: 1.20.6;
Query the media and vfp feature registers to determine what our default
mode should be and what bits in the fpscr can be changed.
Print what features are supported:
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propogation, denormals
 1.19 23-Aug-2013  matt Make use of vfp_used_p condition on FPU_VFP
 1.18 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.17 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.16 31-Jan-2013  matt branches: 1.16.2;
add a fpu_used sysarch
 1.15 12-Aug-2012  matt branches: 1.15.2;
Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.14 17-Nov-2011  joerg branches: 1.14.8;
Don't return ENOSYS if nothing needs to be done for the CPU.

XXX Shouldn't this be a runtime test on the CPU?
 1.13 30-Jun-2011  wiz branches: 1.13.2;
dependant -> dependent
 1.12 07-Apr-2011  matt Don't use the pcb anymore since the user read-only thread and process id
value is now grabbed from l_private.
 1.11 07-Jul-2010  chs branches: 1.11.2;
implement cpu_lwp_setprivate() on several platforms.
 1.10 27-Apr-2008  matt branches: 1.10.2; 1.10.18; 1.10.20; 1.10.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.9 20-Dec-2007  dsl branches: 1.9.6; 1.9.8; 1.9.10;
Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.8 09-Feb-2007  ad branches: 1.8.20; 1.8.24; 1.8.26; 1.8.34; 1.8.38;
Merge newlock2 to head.
 1.7 11-Dec-2005  christos branches: 1.7.20; 1.7.28;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 17-Jan-2003  thorpej branches: 1.5.2;
Merge the nathanw_sa branch.
 1.4 30-Mar-2002  thorpej Rename the ARM sysarch calls from arm32* -> arm*
 1.3 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.2 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.1 04-Mar-2001  matt branches: 1.1.4; 1.1.6; 1.1.10;
Move these from arm32/arm32
 1.1.10.5 29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.1.10.4 17-Apr-2002  nathanw Catch up to -current.
 1.1.10.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.2 11-Jan-2002  nathanw More catchup.
 1.1.10.1 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file sys_machdep.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.2 21-Jan-2008  yamt sync with head
 1.6.16.1 26-Feb-2007  yamt sync with head.
 1.7.28.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.7.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.8.38.1 02-Jan-2008  bouyer Sync with HEAD
 1.8.34.1 26-Dec-2007  ad Sync with head.
 1.8.26.3 09-Jan-2008  matt sync with HEAD
 1.8.26.2 09-Nov-2007  matt Add pmap_icache_sync_range and change arm32_sync_icache to use it.
This will only invalidate va that have valid PTEs. This avoids cleaning
unneeded cache lines.
 1.8.26.1 06-Nov-2007  matt Cleanup (de-__P, ansify)
Use lwp instead of proc (since neither is used).
Use void * instead of char *
 1.8.24.1 01-Jan-2008  chris Sync with HEAD.
 1.8.20.1 26-Dec-2007  rjs Sync with HEAD.
 1.9.10.2 11-Aug-2010  yamt sync with head.
 1.9.10.1 16-May-2008  yamt sync with head.
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.22.2 21-Apr-2011  rmind sync with head
 1.10.22.1 05-Mar-2011  rmind sync with head
 1.10.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.10.2.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.10.2.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.11.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.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.13.2.2 30-Oct-2012  yamt sync with head
 1.13.2.1 17-Apr-2012  yamt sync with head
 1.14.8.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.15.2.3 03-Dec-2017  jdolecek update from HEAD
 1.15.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.2.1 25-Feb-2013  tls resync with head
 1.16.2.2 18-May-2014  rmind sync with head
 1.16.2.1 28-Aug-2013  rmind sync with head
 1.20.6.3 28-Aug-2017  skrll Sync with HEAD
 1.20.6.2 22-Sep-2015  skrll Sync with HEAD
 1.20.6.1 06-Apr-2015  skrll Sync with HEAD
 1.22.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.22.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.4 12-Jan-2002  bjh21 Combined syscall handler for all ARM ports. This is basically the arm32
version, made readable and compatible with arm26. In addition, this adds
support for NetBSD/arm's newly allocated SWI range.
 1.3 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 04-Mar-2001  matt branches: 1.1.4; 1.1.6; 1.1.10;
Move these from arm32/arm32
 1.1.10.4 28-Feb-2002  nathanw Catch up to -current.
 1.1.10.3 11-Jan-2002  nathanw More catchup.
 1.1.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.1 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.1.6.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 04-Mar-2001  bouyer file syscall.c was added on branch thorpej_scsipi on 2001-03-12 13:27:20 +0000
 1.79 15-Jan-2024  andvar Include <sys/syslog.h> with "#ifdef STACKCHECKS" guard.

The include was lost on rev 1.77 during includes cleanup and KNF, however
it is still needed with STACKCHECKS build option.
 1.78 28-Mar-2021  skrll fix a comment that has been c&p'ed around and not updated
 1.77 20-Jun-2020  skrll branches: 1.77.2; 1.77.4;
KNF #includes

Remove some unnecessary ones while I'm here.
 1.76 18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.75 12-Jul-2018  jakllsch branches: 1.75.10;
<sys/pmc.h> is gone; don't #include it
 1.74 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.73 28-May-2018  chs branches: 1.73.2;
merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
- dtrace FBT probes can now be placed in kernel modules.
- ZFS now supports mmap().
 1.72 17-Oct-2017  skrll branches: 1.72.2;
Fix eva argument to pmap_remove and passed prot bits in flags for
pmap_enter, i.e. fix previous.
 1.71 08-Oct-2017  flxd In vmapbuf use pmap_enter(pmap_kernel(), ...) and not pmap_kenter_pa as the
former handles multiple mappings for VIPT AND VIVT correctly whereas the latter
doesn't work for VIVT. PR port-shark/52102
From skrll@. Tested by martin@ and me.
 1.70 29-Mar-2015  matt branches: 1.70.10;
cache pmap in vmapbuf.
 1.69 10-Mar-2014  matt branches: 1.69.6;
Use pmap_kenter_pa/pmap_kremove for vmapbuf/vunmapbuf
 1.68 10-Sep-2013  matt Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.
 1.67 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.66 11-May-2013  skrll branches: 1.66.2;
Whitespace
 1.65 25-Jan-2013  skrll Shut up noisy debug unless pmap_debug_level > 0
 1.64 18-Dec-2012  matt Remove unneeded definitions.
When forking a LWP, disable the VFP in the new LWP since it isn't the LWP
that owns the VFP.
 1.63 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.62 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.61 23-Oct-2012  matt When allocating the kernel virtual addresses, make sure to match the
color of the user addresses.
 1.60 29-Aug-2012  matt branches: 1.60.2;
Use ARMV6+ cpsi{d,f} instructions whenever possible. Use r7 to hold previous
mode and avoid recomputing it. Add support for obtaining kernel_lock on
exception entry and exit.
 1.59 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.58 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.57 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.56 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.55 10-Feb-2011  pooka branches: 1.55.4; 1.55.8; 1.55.12;
Make vmapbuf() return success/error and make physio deal with a
failure.
 1.54 14-Jan-2011  rmind branches: 1.54.2; 1.54.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.53 29-Nov-2009  rmind branches: 1.53.4;
Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork().
 1.52 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.51 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.50 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.49 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.48 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.47 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.46 21-Oct-2008  matt branches: 1.46.2; 1.46.8; 1.46.12;
Adapt to SA (conditional KERN_SA) and add cpu_setfunc
 1.45 07-Aug-2008  matt Remove unneeded cast.
 1.44 07-Jul-2008  skrll branches: 1.44.2;
Update a comment.
 1.43 15-Mar-2008  rearnsha branches: 1.43.4; 1.43.6; 1.43.8;
VFP support.
 1.42 19-Jan-2008  chris branches: 1.42.2; 1.42.6;
With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.41 12-Jan-2008  skrll Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
 1.40 17-Oct-2007  garbled branches: 1.40.2; 1.40.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.39 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.38 17-May-2007  yamt branches: 1.38.6; 1.38.8; 1.38.10; 1.38.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.37 04-Mar-2007  christos branches: 1.37.2; 1.37.4; 1.37.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.36 18-Feb-2007  matt Changes for newlock2.
 1.35 10-May-2006  skrll branches: 1.35.14;
Fix a bunch of cast lvalues.
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33 01-Apr-2005  yamt branches: 1.33.2;
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.32 28-Aug-2004  thorpej branches: 1.32.4; 1.32.6;
Garbage-collect pagemove(); nothing use it anymore (YAY!!!)
 1.31 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
as FPU state), and is the last potentially blocking operation;
all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
 1.30 23-Oct-2003  scw Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop
instead.

With this change, we no longer need to save the current interrupt level
in the switchframe. This is no great loss since both cpu_switch and
cpu_switchto are always called at splsched, so the process' spl is
effectively saved somewhere in the callstack.

This fixes an evbarm problem reported by Allen Briggs:

lwp gets into sa_switch -> mi_switch with newl != NULL
when it's the last element on the runqueue, so it
hits the second bit of:
if (newl == NULL) {
retval = cpu_switch(l, NULL);
} else {
remrunqueue(newl);
cpu_switchto(l, newl);
retval = 0;
}

mi_switch calls remrunqueue() and cpu_switchto()

cpu_switchto unlocks the sched lock
cpu_switchto drops CPU priority
softclock is received
schedcpu is called from softclock
schedcpu hits the first if () {} block here:
if (l->l_priority >= PUSER) {
if (l->l_stat == LSRUN &&
(l->l_flag & L_INMEM) &&
(l->l_priority / PPQ) != (l->l_usrpri / PPQ)) {
remrunqueue(l);
l->l_priority = l->l_usrpri;
setrunqueue(l);
} else
l->l_priority = l->l_usrpri;
}

Since mi_switch has already run remrunqueue, the LWP has been
removed, but it's not been put back on any queue, so the
remrunqueue panics.
 1.29 15-Jul-2003  lukem __KERNEL_RCSID()
 1.28 17-May-2003  thorpej branches: 1.28.2;
Rewrite pagemove() to use pmap functions, rather than frobbing PTEs
directly. The old code was totally bogus for the new pmap. New code
lifted from SH5 port.

Fixes panics in ffs_balloc_ufs2() seen while stress-testing a file
system on an XScale-based server platform.
 1.27 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.26 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.25 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.24 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23 24-Nov-2002  chris Fix's DEBUG kernel's not making it into multiuser on cats. (as spotted by
nick)
When wiring a page with pmap_enter you must supply the protection in the
flags as well as in the prot.
 1.22 19-Oct-2002  bjh21 branches: 1.22.2;
Undo recent cpu_switch register usage changes in order to decrease nathanw_sa
merge pain.
 1.21 18-Oct-2002  bjh21 In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.20 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.19 09-Aug-2002  thorpej cpu_fork(): If PMCs are not enabled in the parent, clear the machine-
dependent PMC state in the child.
 1.18 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.17 06-Aug-2002  thorpej * Pass proc0 to switch_exit(), to make this a little more like the
nathanw_sa branch.
* In switch_exit(), set the outgoing-proc register to NULL (rather than
proc0) so that we actually use the "exiting process" optimization in
cpu_switch().
 1.16 03-Apr-2002  thorpej branches: 1.16.2;
Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.15 04-Mar-2002  simonb Don't need to declare phys_map - it is declared in <uvm/uvm_extern.h>.
 1.14 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.13 29-Jan-2002  thorpej When initializing sf->sf_spl, simply always assume that 0 is
equivalent to spl0().
 1.12 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.11 29-Nov-2001  thorpej Provide a hook for platform-specific interrupt code to specify
the "spl" cookie in the switch frame.
 1.10 24-Nov-2001  thorpej Move the ARM, Ltd. floating point emulator to arch/arm.
 1.9 19-Nov-2001  chris Give the idle loop a non-profiled entry, means it appears in profile info correctly (rather than all it's time being under remrunqueue)
switch_exit only needs to take 1 parameter, it loads the value of proc0 into R1 itself
Fixup some comments to reflect the real state of things.
Tweak a couple of bits of asm to avoid a load delay.
remove excess code for setting curpcb and curproc.
 1.8 18-Oct-2001  rearnsha branches: 1.8.4;
Don't unmap page 0 when preparing to swap out a process. If the pmap
is shared with another process (as can happen if vfork is being used),
then that other process will end up not having a page 0, which is bad
news indeed, since then there is no way back into the kernel.

Found this using a multi-ice box, so they are useful after all!

This seems to fix pr port-arm32/11921 and (possibly) kern/9859.
 1.7 20-Sep-2001  chris Fix bug in vmapbuf, was using len before it had been adjusted. Found by Frank while Luke was tracking down a bug.
 1.6 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.5 09-Sep-2001  toshii Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.4 20-Aug-2001  chris branches: 1.4.2;
Arm has a vac, so we must use pmap_enter/remove for vmapbuf rather than k* versions, otherwise we may not be doing the right caching thing.
 1.3 11-Aug-2001  chris Update to make use of a proper kenter implementation for vmapbuf and vunmapbuf.
 1.2 05-Aug-2001  matt Force size_t formats/arge to be (u_long). I'd use 'z' for this but gcc
2.95.3
 1.1 28-Jul-2001  chris branches: 1.1.2;
Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.1.2.9 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.8 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.7 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.6 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.5 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.4 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.3 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 28-Jul-2001  lukem file vm_machdep.c was added on branch kqueue on 2001-08-03 04:10:59 +0000
 1.4.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.8.4.14 03-Jan-2003  thorpej Merge switch_exit() and switch_lwp_exit(), and hand-schedule the
resulting function to avoid stalls on StrongARM and XScale.
 1.8.4.13 31-Dec-2002  thorpej Copy/initialize PMC state in cpu_proc_fork().
 1.8.4.12 11-Dec-2002  thorpej Sync with HEAD.
 1.8.4.11 07-Oct-2002  thorpej LWP'ify some debug printfs.
 1.8.4.10 27-Aug-2002  thorpej Sync with -current.
 1.8.4.9 13-Aug-2002  nathanw Catch up to -current.
 1.8.4.8 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.8.4.7 17-Apr-2002  nathanw Catch up to -current.
 1.8.4.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.4.5 28-Feb-2002  nathanw Catch up to -current.
 1.8.4.4 08-Jan-2002  nathanw Catch up to -current.
 1.8.4.3 08-Dec-2001  thorpej cpu_fork() -> cpu_lwp_fork(). This logically forks an LWP, not a
complete process. As noted by Gregory McGarry on tech-kern.
 1.8.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.8.4.1 18-Oct-2001  thorpej file vm_machdep.c was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.16.2.1 30-Aug-2002  gehenna catch up with -current.
 1.22.2.2 19-Oct-2002  bjh21 Re-do the following revisions, this time on a branch where they won't
interfere with the nathanw_sa merge:

syssrc/sys/arch/arm/arm32/cpuswitch.S 1.26
syssrc/sys/arch/arm/arm32/genassym.cf 1.18
syssrc/sys/arch/arm/arm32/vm_machdep.c 1.21
syssrc/sys/arch/arm/include/pcb.h 1.5

Original commit message:

In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.22.2.1 19-Oct-2002  bjh21 file vm_machdep.c was added on branch bjh21-hydra on 2002-10-19 11:59:37 +0000
 1.28.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.28.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.2 03-Sep-2004  skrll Sync with HEAD
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.32.6.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.32.4.1 29-Apr-2005  kent sync with -current
 1.33.2.6 17-Mar-2008  yamt sync with head.
 1.33.2.5 21-Jan-2008  yamt sync with head
 1.33.2.4 27-Oct-2007  yamt sync with head.
 1.33.2.3 03-Sep-2007  yamt sync with head.
 1.33.2.2 26-Feb-2007  yamt sync with head.
 1.33.2.1 21-Jun-2006  yamt sync with head.
 1.34.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.34.10.1 11-May-2006  elad sync with head
 1.34.8.1 24-May-2006  yamt sync with head.
 1.34.6.1 01-Jun-2006  kardel Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.14.4 23-Apr-2007  skrll Nuke cpu_setfunc
 1.35.14.3 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.35.14.2 12-Mar-2007  rmind Sync with HEAD.
 1.35.14.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.37.10.2 03-Oct-2007  garbled Sync with HEAD
 1.37.10.1 22-May-2007  matt Update to HEAD.
 1.37.4.1 11-Jul-2007  mjf Sync with head.
 1.37.2.2 09-Oct-2007  ad Sync with head.
 1.37.2.1 27-May-2007  ad Sync with head.
 1.38.12.2 23-Mar-2008  matt sync with HEAD
 1.38.12.1 06-Nov-2007  matt sync with HEAD
 1.38.10.3 21-Mar-2008  chris Sync with head.
 1.38.10.2 20-Jan-2008  chris Sync to HEAD.
 1.38.10.1 01-Jan-2008  chris Sync with HEAD.
 1.38.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.38.6.2 28-Feb-2008  rjs Sync with HEAD.
 1.38.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.40.8.2 20-Jan-2008  bouyer Sync with HEAD
 1.40.8.1 19-Jan-2008  bouyer Sync with HEAD
 1.40.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.42.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.42.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.42.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.42.2.1 24-Mar-2008  keiichi sync with head.
 1.43.8.1 18-Jul-2008  simonb Sync with head.
 1.43.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.43.4.2 11-Mar-2010  yamt sync with head
 1.43.4.1 04-May-2009  yamt sync with head.
 1.44.2.3 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.44.2.2 19-Oct-2008  haad Sync with HEAD.
 1.44.2.1 07-Jul-2008  haad file vm_machdep.c was added on branch haad-dm on 2008-10-19 22:15:41 +0000
 1.46.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.46.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.46.2.1 28-Apr-2009  skrll Sync with HEAD.
 1.53.4.1 05-Mar-2011  rmind sync with head
 1.54.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.54.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.55.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.55.8.1 24-Feb-2012  mrg sync to -current.
 1.55.4.5 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.55.4.4 23-Jan-2013  yamt sync with head
 1.55.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.55.4.2 30-Oct-2012  yamt sync with head
 1.55.4.1 17-Apr-2012  yamt sync with head
 1.60.2.5 03-Dec-2017  jdolecek update from HEAD
 1.60.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.60.2.3 23-Jun-2013  tls resync from head
 1.60.2.2 25-Feb-2013  tls resync with head
 1.60.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.66.2.2 18-May-2014  rmind sync with head
 1.66.2.1 28-Aug-2013  rmind sync with head
 1.69.6.1 06-Apr-2015  skrll Sync with HEAD
 1.70.10.1 24-Oct-2017  snj Pull up following revision(s) (requested by skrll in ticket #315):
sys/arch/arm/arm32/vm_machdep.c: 1.71-1.72
In vmapbuf use pmap_enter(pmap_kernel(), ...) and not pmap_kenter_pa as the
former handles multiple mappings for VIPT AND VIVT correctly whereas the latter
doesn't work for VIVT. PR port-shark/52102
From skrll@. Tested by martin@ and me.
--
Fix eva argument to pmap_remove and passed prot bits in flags for
pmap_enter, i.e. fix previous.
 1.72.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.72.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.73.2.2 21-Apr-2020  martin Sync with HEAD
 1.73.2.1 10-Jun-2019  christos Sync with HEAD
 1.75.10.1 20-Apr-2020  bouyer Sync with HEAD
 1.77.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.77.2.1 03-Apr-2021  thorpej Sync with HEAD.
 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 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91_bus_dma.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91_bus_dma.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +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.6 21-Apr-2023  skrll Trailing whitespace
 1.5 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.4 01-Jul-2011  dyoung branches: 1.4.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91_bus_space.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91_bus_space.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.13 21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 1.12 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.11 26-Mar-2014  christos branches: 1.11.42;
kill sprintf
 1.10 12-Nov-2012  skrll branches: 1.10.2;
C99 types
 1.9 02-Aug-2012  skrll branches: 1.9.2;
Remove irqframe and replace with identical trapframe.
 1.8 04-Nov-2011  aymeric attach event counters later, at attach time. Caught by an assertion
 1.7 01-Jul-2011  dyoung branches: 1.7.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 06-Jun-2011  matt Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup.
 1.5 20-Dec-2010  matt branches: 1.5.6;
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.4 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.3 23-Oct-2009  snj branches: 1.3.2; 1.3.4;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91aic.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.3 11-Aug-2010  yamt sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91aic.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.4.3 12-Jun-2011  rmind sync with head
 1.3.4.2 05-Mar-2011  rmind sync with head
 1.3.4.1 03-Jul-2010  rmind sync with head
 1.3.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.7.2.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.7.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.7.2.2 30-Oct-2012  yamt sync with head
 1.7.2.1 10-Nov-2011  yamt sync with head
 1.9.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.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.11.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91aicreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91aicreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.5 12-Nov-2012  skrll C99 types
 1.4 02-Aug-2012  skrll branches: 1.4.2;
Remove irqframe and replace with identical trapframe.
 1.3 23-Oct-2009  snj branches: 1.3.12;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91aicvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91aicvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.3.12.1 30-Oct-2012  yamt sync with head
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.30 20-Feb-2024  andvar Fix format specifier for physmem from %d to 0x%"PRIxPSIZE" in multiple places.

Should fix VERBOSE_INIT_ARM for various evbarm kernel configs.
Also add 0x prefix in few previously fixed places to improve readability.
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.27 18-Apr-2020  skrll branches: 1.27.4;
PMAP_DEBUG has been deleted on arm
 1.26 18-Apr-2020  skrll Trailing whitespace
 1.25 16-Jul-2019  skrll branches: 1.25.8;
Consistently use vaddr_t as initarm and friends return type.

Makes no difference to binaries except for aarch64 where it's required
 1.24 16-Jul-2019  skrll KNF
 1.23 28-Oct-2018  skrll Fix a commit
 1.22 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.21 31-Jul-2018  skrll Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.20 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.19 22-Dec-2016  cherry branches: 1.19.14; 1.19.16;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.18 13-Sep-2014  matt branches: 1.18.2; 1.18.4;
Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.17 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.16 12-Nov-2012  skrll branches: 1.16.2;
C99 types
 1.15 29-Oct-2012  chs add missing arg to cpu_setttb().
 1.14 01-Sep-2012  matt branches: 1.14.2;
Move things around for <arm/arm32/machdep.h>
 1.13 30-Jul-2012  matt More -fno-common fixes
 1.12 04-Nov-2011  aymeric add preliminary support for AT91SAM9260
 1.11 01-Jul-2011  dyoung branches: 1.11.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 26-Dec-2009  uebayasi Use cpu_* prefix to call cpu_* functions (setttb() -> cpu_setttb()); no
functional changes.
 1.9 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.8 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.7 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.6 11-Aug-2009  matt Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 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 30-Nov-2008  martin branches: 1.4.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.3 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.2 03-Jul-2008  matt branches: 1.2.2; 1.2.4; 1.2.6;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91bus.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.3 11-Mar-2010  yamt sync with head
 1.1.20.2 19-Aug-2009  yamt sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.6.2 28-Apr-2009  skrll Sync with HEAD.
 1.2.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91bus.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.2.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.2.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.11.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.11.2.2 30-Oct-2012  yamt sync with head
 1.11.2.1 10-Nov-2011  yamt sync with head
 1.14.2.3 03-Dec-2017  jdolecek update from HEAD
 1.14.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.2.1 28-Aug-2013  rmind sync with head
 1.18.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.18.2.1 05-Feb-2017  skrll Sync with HEAD
 1.19.16.3 21-Apr-2020  martin Sync with HEAD
 1.19.16.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.16.1 10-Jun-2019  christos Sync with HEAD
 1.19.14.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.19.14.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.19.14.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.19.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.25.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.27.4.8 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.27.4.7 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.27.4.6 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.27.4.5 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.27.4.4 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.27.4.3 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.27.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.27.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.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8 21-Apr-2023  skrll Trailing whitespace
 1.7 16-Jul-2019  skrll Consistently use vaddr_t as initarm and friends return type.

Makes no difference to binaries except for aarch64 where it's required
 1.6 12-Nov-2012  skrll branches: 1.6.38;
C99 types
 1.5 02-Aug-2012  skrll branches: 1.5.2;
Remove irqframe and replace with identical trapframe.
 1.4 01-Jul-2011  dyoung branches: 1.4.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91busvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91busvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.5.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8 27-Sep-2022  skrll malloc -> kmem
 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 26-Jul-2011  dyoung branches: 1.4.54;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.3 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91cf.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91cf.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.54.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91cfvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91cfvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.19 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.18 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.17 15-Dec-2019  tsutsui branches: 1.17.8;
Remove clause 3 and 4 leftovers from TNF licenses in more sources.

Confirmed by martin@ in PR/54760.
 1.16 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.15 21-Sep-2015  skrll branches: 1.15.2; 1.15.8; 1.15.18; 1.15.22;
Deal with unused variable warnings
 1.14 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.13 15-Nov-2014  christos branches: 1.13.2;
centralize the call unit / dialout macros
 1.12 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.11 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.10 16-Mar-2014  dholland branches: 1.10.2;
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.9 12-Nov-2012  skrll branches: 1.9.2;
C99 types
 1.8 02-Feb-2012  tls branches: 1.8.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.7 04-Nov-2011  aymeric branches: 1.7.4;
use CFATTACH_DECL_NEW
 1.6 01-Jul-2011  dyoung branches: 1.6.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.4 19-Jun-2010  matt branches: 1.4.2;
Misc fixes to get this to compile again.
 1.3 14-Mar-2009  dsl branches: 1.3.2; 1.3.4;
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.2 03-Jul-2008  matt branches: 1.2.4; 1.2.6; 1.2.12;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91dbgu.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Aug-2010  yamt sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91dbgu.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.4.2 31-May-2011  rmind sync with head
 1.3.4.1 03-Jul-2010  rmind sync with head
 1.3.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.2.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.6.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.6.2.2 17-Apr-2012  yamt sync with head
 1.6.2.1 10-Nov-2011  yamt sync with head
 1.7.4.1 18-Feb-2012  mrg merge to -current.
 1.8.6.3 03-Dec-2017  jdolecek update from HEAD
 1.8.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.1 18-May-2014  rmind sync with head
 1.10.2.2 10-Aug-2014  tls Rebase.
 1.10.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.13.2.2 22-Sep-2015  skrll Sync with HEAD
 1.13.2.1 06-Jun-2015  skrll Sync with HEAD
 1.15.22.1 18-Dec-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #570):

sys/compat/netbsd32/netbsd32_compat_50_sysv.c: revision 1.3
sys/dev/raidframe/rf_compat50.h: revision 1.6
sys/arch/emips/emips/bus_space.c: revision 1.3
sys/compat/net/if.h: revision 1.5
sys/arch/emips/stand/common/bootinfo.c: revision 1.2
sys/compat/common/sysv_msg_50.c: revision 1.5
sys/compat/common/kern_time_30.c: revision 1.8
sys/arch/emips/stand/common/bootinfo.h: revision 1.2
sys/arch/ia64/include/bus.h: revision 1.4
sys/arch/ia64/ia64/bus_space.c: revision 1.2
sys/compat/common/sysv_shm_50.c: revision 1.5
sys/dev/ic/adw.h: revision 1.15
sys/compat/common/uipc_syscalls_50.c: revision 1.10
sys/arch/emips/ebus/flash_ebus.c: revision 1.22
sys/dev/ic/adv.h: revision 1.15
sys/dev/ic/adwmcode.c: revision 1.18
sys/dev/ic/advlib.c: revision 1.29
sys/arch/hpcarm/include/kloader.h: revision 1.3
sys/dev/usb/uberry.c: revision 1.16
sys/compat/common/sysv_sem_50.c: revision 1.5
sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.43
sys/dev/ic/advlib.h: revision 1.21
sys/dev/ic/adv.c: revision 1.50
sys/compat/netinet6/in6_var.h: revision 1.5
sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm: revision 1.2
sys/arch/emips/include/loadfile_machdep.h: revision 1.3
sys/arch/emips/stand/common/prom_iface.c: revision 1.7
sys/dev/ic/adw.c: revision 1.56
sys/dev/ic/adwmcode.h: revision 1.12
sys/dev/ic/advmcode.c: revision 1.10
sys/arch/emips/ebus/ace_ebus.c: revision 1.22
sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.5
sys/dev/raidframe/rf_compat50.c: revision 1.13
sys/arch/x68k/dev/intiovar.h: revision 1.15
sys/dev/usb/uipad.c: revision 1.8
sys/arch/zaurus/include/kloader.h: revision 1.3
sys/arch/emips/stand/common/bootxx.c: revision 1.2
sys/dev/ic/adwlib.h: revision 1.23
sys/dev/ic/adwlib.c: revision 1.44
sys/compat/netbsd32/netbsd32_compat_16.c: revision 1.3
sys/arch/amigappc/include/intr.h: revision 1.27
sys/arch/x68k/dev/mfp.c: revision 1.27
sys/arch/arm/at91/at91dbgu.c: revision 1.17
sys/dev/ic/advmcode.h: revision 1.7
sys/compat/ultrix/ultrix_exec.h: revision 1.7
sys/compat/common/vfs_syscalls_50.c: revision 1.24
sys/arch/mips/cavium/octeon_dma.c: revision 1.3
sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm: revision 1.2

Remove clause 3 and 4 from TNF licenses.
Ok'ed by martin@ in PR/54760.

Remove clause 3 and 4 leftovers from TNF licenses in more sources.
Confirmed by martin@ in PR/54760.
 1.15.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.8.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.15.2.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.15.2.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.17.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.5 12-Nov-2012  skrll C99 types
 1.4 04-Nov-2011  aymeric branches: 1.4.10;
fix AT91SAM9260 chip id
 1.3 23-Oct-2009  snj branches: 1.3.12;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91dbgureg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91dbgureg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.3.12.1 10-Nov-2011  yamt sync with head
 1.4.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6 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.5 02-Feb-2012  tls branches: 1.5.6; 1.5.24;
Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.4 19-Nov-2011  tls branches: 1.4.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.3 23-Oct-2009  snj branches: 1.3.12;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91dbguvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91dbguvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.12.1 17-Apr-2012  yamt sync with head
 1.4.2.1 18-Feb-2012  mrg merge to -current.
 1.5.24.1 06-Jun-2015  skrll Sync with HEAD
 1.5.6.1 03-Dec-2017  jdolecek update from HEAD
 1.37 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.36 05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.35 27-Sep-2022  skrll branches: 1.35.10;
Remove unnecessary sys/malloc.h include
 1.34 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.33 04-Nov-2021  skrll Remove unnecessary duplicate bit define in mask

PR port-arm/50687
 1.32 19-Feb-2020  thorpej When a media change is requested, don't just all (*if_init)(). That's
needlessly disruptive and incompatible with future locking changes.
We can use both ether_mediachange() and ether_mediastatus() instead.
 1.31 11-Feb-2020  skrll More <net/if_stats.h>
 1.30 04-Feb-2020  skrll Adopt <net/if_stats.h>
 1.29 28-May-2019  msaitoh branches: 1.29.4;
Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.28 23-May-2019  msaitoh - Fix compile error (remove unused variable).
- KNF.
- ac -> ec
- Remove extra RCS Id.
 1.27 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.26 23-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- u_int*_t -> uint*_t.
- KNF
 1.25 22-Apr-2019  msaitoh On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
 1.24 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.23 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.22 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.21 26-Jun-2018  msaitoh branches: 1.21.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.20 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.19 20-Feb-2017  ozaki-r branches: 1.19.6; 1.19.12;
Apply deferred if_start to more drivers...
 1.18 15-Dec-2016  ozaki-r branches: 1.18.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.17 10-Jun-2016  ozaki-r branches: 1.17.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.15 21-Sep-2015  skrll Deal with unused variable warnings
 1.14 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.13 12-Nov-2012  skrll branches: 1.13.14;
C99 types
 1.12 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.11 22-Jul-2012  matt branches: 1.11.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.10 01-Jul-2011  dyoung branches: 1.10.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.8 22-Jan-2010  martin branches: 1.8.2; 1.8.4;
Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
 1.7 19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.6 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.5 18-Mar-2009  cegger bzero -> memset
 1.4 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.3 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.2 03-Jul-2008  matt branches: 1.2.4; 1.2.6; 1.2.12;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91emac.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.3 11-Aug-2010  yamt sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91emac.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.8.4.1 30-May-2010  rmind sync with head
 1.8.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.10.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.10.2.1 30-Oct-2012  yamt sync with head
 1.11.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.14.6 28-Aug-2017  skrll Sync with HEAD
 1.13.14.5 05-Feb-2017  skrll Sync with HEAD
 1.13.14.4 09-Jul-2016  skrll Sync with HEAD
 1.13.14.3 19-Mar-2016  skrll Sync with HEAD
 1.13.14.2 22-Sep-2015  skrll Sync with HEAD
 1.13.14.1 06-Jun-2015  skrll Sync with HEAD
 1.17.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.17.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.18.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.19.12.3 26-Jan-2019  pgoyette Sync with HEAD
 1.19.12.2 28-Jul-2018  pgoyette Sync with HEAD
 1.19.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.19.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.21.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.2.1 10-Jun-2019  christos Sync with HEAD
 1.29.4.1 29-Feb-2020  ad Sync with head.
 1.35.10.1 02-Aug-2025  perseant Sync with HEAD
 1.4 12-Nov-2012  skrll C99 types
 1.3 23-Oct-2009  snj branches: 1.3.12; 1.3.22;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91emacreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91emacreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.12.1 16-Jan-2013  yamt sync with (a bit old) head
 1.4 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91emacvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91emacvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4 04-Feb-2014  matt _setsoftintr is long dead. reap any leftovers from arm.
 1.3 23-Oct-2009  snj branches: 1.3.12; 1.3.22; 1.3.26;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91intr.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91intr.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.26.1 18-May-2014  rmind sync with head
 1.3.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.12.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.9 07-Aug-2021  thorpej 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 09-Apr-2018  jakllsch branches: 1.7.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.6 23-Apr-2016  skrll branches: 1.6.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.5 04-Nov-2011  aymeric branches: 1.5.10; 1.5.26; 1.5.28; 1.5.32;
. fix attach code
. use CFATTACH_DECL_NEW
 1.4 01-Jul-2011  dyoung branches: 1.4.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 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.2 03-Jul-2008  matt branches: 1.2.4; 1.2.6; 1.2.12;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91ohci.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91ohci.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.2.1 10-Nov-2011  yamt sync with head
 1.5.32.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.5.28.4 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.5.28.3 05-Dec-2014  skrll KNF. Remove ( ) from return statements.
 1.5.28.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.5.28.1 03-Dec-2014  skrll Trailing whitespace.
 1.5.26.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.5.10.1 03-Dec-2017  jdolecek update from HEAD
 1.6.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.7.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.8.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pdc.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pdc.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pdcreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pdcreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 12-Nov-2012  skrll C99 types
 1.2 03-Jul-2008  matt branches: 1.2.4; 1.2.32; 1.2.42;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pdcvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.42.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.32.1 16-Jan-2013  yamt sync with (a bit old) head
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pdcvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 12-Nov-2012  skrll branches: 1.6.52;
C99 types
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 19-Jun-2010  matt Misc fixes to get this to compile again.
 1.2 03-Jul-2008  matt branches: 1.2.4; 1.2.18; 1.2.20;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pio.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Aug-2010  yamt sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.20.1 03-Jul-2010  rmind sync with head
 1.2.18.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pio.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.6.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.6.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.6.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.6.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.6.52.2 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.6.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.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 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.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pioreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pioreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 10-Aug-2025  andvar Fix few typos in comments.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91piovar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91piovar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.8 24-Feb-2020  rin 0x%#x --> %#x for non-external codes.
Also, stop mixing up 0x%x and %#x in single files as far as possible.
 1.7 11-Apr-2019  kamil branches: 1.7.6;
Fix CVS Id usage
 1.6 12-Nov-2012  skrll branches: 1.6.38;
C99 types
 1.5 04-Nov-2011  aymeric branches: 1.5.10;
switch USB port on
 1.4 01-Jul-2011  dyoung branches: 1.4.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pmc.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pmc.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 10-Nov-2011  yamt sync with head
 1.5.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.38.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.38.1 10-Jun-2019  christos Sync with HEAD
 1.7.6.1 29-Feb-2020  ad Sync with head.
 1.3 04-Nov-2011  aymeric add preliminary support for AT91SAM9260
 1.2 03-Jul-2008  matt branches: 1.2.4; 1.2.32;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pmcreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.32.1 10-Nov-2011  yamt sync with head
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pmcreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91pmcvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91pmcvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91reg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91reg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4 21-Apr-2023  skrll More devmap updates
 1.3 21-Apr-2023  skrll Trailing whitespace
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91rm9200bus.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91rm9200bus.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4 30-Jul-2012  matt More -fno-common fixes
 1.3 23-Oct-2009  snj branches: 1.3.12;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91rm9200busvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91rm9200busvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3.12.1 30-Oct-2012  yamt sync with head
 1.4 17-Sep-2021  andvar some love to double letters (in comments).
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91rm9200reg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91rm9200reg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.2 21-Apr-2023  skrll Trailing whitespace
 1.1 04-Nov-2011  aymeric branches: 1.1.2;
add preliminary support for AT91SAM9260
 1.1.2.2 10-Nov-2011  yamt sync with head
 1.1.2.1 04-Nov-2011  yamt file at91sam9260bus.c was added on branch yamt-pagecache on 2011-11-10 14:31:39 +0000
 1.1 04-Nov-2011  aymeric branches: 1.1.2;
add preliminary support for AT91SAM9260
 1.1.2.2 10-Nov-2011  yamt sync with head
 1.1.2.1 04-Nov-2011  yamt file at91sam9260busvar.h was added on branch yamt-pagecache on 2011-11-10 14:31:39 +0000
 1.2 17-Sep-2021  andvar some love to double letters (in comments).
 1.1 04-Nov-2011  aymeric branches: 1.1.2;
add preliminary support for AT91SAM9260
 1.1.2.2 10-Nov-2011  yamt sync with head
 1.1.2.1 04-Nov-2011  yamt file at91sam9260reg.h was added on branch yamt-pagecache on 2011-11-10 14:31:39 +0000
 1.4 21-Apr-2023  skrll More devmap updates
 1.3 21-Apr-2023  skrll Trailing whitespace
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91sam9261bus.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91sam9261bus.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91sam9261busvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91sam9261busvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.4 17-Sep-2021  andvar some love to double letters (in comments).
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91sam9261reg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91sam9261reg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:19 +0000
 1.8 10-Sep-2025  thorpej Encapsulate what's needed to attach a SPI bus into a spibus_attach()
inline.
 1.7 07-Aug-2021  thorpej branches: 1.7.2;
Merge thorpej-cfargs2.
 1.6 24-Apr-2021  thorpej branches: 1.6.2; 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 27-Dec-2019  msaitoh branches: 1.5.10;
s/transfered/transferred/
 1.4 13-Aug-2019  tnn ensure spibus_attach_args is zero'ed
 1.3 01-Jul-2011  dyoung branches: 1.3.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91spi.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91spi.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.54.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.54.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6.2.1 18-May-2021  thorpej Pass the controller devhandle along to the "spi" instance.
 1.7.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91spireg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91spireg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91spivar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91spivar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.7 03-Jul-2020  maxv hardclock_ticks -> getticks()
 1.6 12-Nov-2012  skrll C99 types
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 27-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders
(Embedtronics Oy's owners, Jon Sevy, and joff).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91st.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91st.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.4.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.4 12-Nov-2012  skrll C99 types
 1.3 23-Oct-2009  snj branches: 1.3.12; 1.3.22;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91streg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91streg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.12.1 16-Jan-2013  yamt sync with (a bit old) head
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91tcreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91tcreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.9 03-Jul-2020  maxv hardclock_ticks -> getticks()
 1.8 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.7 12-Nov-2012  skrll C99 types
 1.6 04-Nov-2011  aymeric branches: 1.6.10;
make compile by disabling yet more things
 1.5 01-Jul-2011  dyoung branches: 1.5.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 19-Jun-2010  matt Misc fixes to get this to compile again.
 1.3 27-Oct-2009  snj branches: 1.3.2; 1.3.4;
Drop 3rd and 4th clauses. Approved by all copyright holders
(Embedtronics Oy's owners, Jon Sevy, and joff).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91tctmr.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.3 11-Aug-2010  yamt sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91tctmr.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.4.1 03-Jul-2010  rmind sync with head
 1.3.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.5.2.1 10-Nov-2011  yamt sync with head
 1.6.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11 15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 22-Dec-2019  thorpej branches: 1.8.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.7 14-Feb-2016  chs branches: 1.7.18;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.6 27-Oct-2012  chs branches: 1.6.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.3 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.2 03-Jul-2008  matt branches: 1.2.4; 1.2.6; 1.2.12;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91twi.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91twi.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.5.12.2 03-Dec-2017  jdolecek update from HEAD
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.6.14.1 19-Mar-2016  skrll Sync with HEAD
 1.7.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 23-Sep-2024  andvar s/hodling/holding/ in comment.
 1.3 06-May-2023  andvar branches: 1.3.6;
s/Registre/Register/ in comment.
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91twireg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91twireg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.6.1 02-Aug-2025  perseant Sync with HEAD
 1.3 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.2 03-Jul-2008  matt branches: 1.2.4; 1.2.86;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91twivar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.86.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91twivar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.14 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.13 13-Apr-2015  riastradh branches: 1.13.2; 1.13.8;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.12 15-Nov-2014  christos branches: 1.12.2;
centralize the call unit / dialout macros
 1.11 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.10 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.9 16-Mar-2014  dholland branches: 1.9.2;
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.8 12-Nov-2012  skrll branches: 1.8.2;
C99 types
 1.7 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.6 02-Feb-2012  tls branches: 1.6.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.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.3 23-Oct-2009  snj branches: 1.3.4; 1.3.6;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91usart.c was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91usart.c was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 31-May-2011  rmind sync with head
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.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.5.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.5.2.2 30-Oct-2012  yamt sync with head
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.6.6.3 03-Dec-2017  jdolecek update from HEAD
 1.6.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.2.1 18-May-2014  rmind sync with head
 1.9.2.2 10-Aug-2014  tls Rebase.
 1.9.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.12.2.1 06-Jun-2015  skrll Sync with HEAD
 1.13.8.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.13.2.2 20-Jul-2016  pgoyette Redo previous. Rather than separately extracting the device_t, we can
rely on sc->sc_dev when we need to call device_release().
 1.13.2.1 19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.4 13-Feb-2022  andvar s/Errorrs/Errors/
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91usartreg.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91usartreg.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.7 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.6 12-Nov-2012  skrll branches: 1.6.14;
C99 types
 1.5 02-Feb-2012  tls branches: 1.5.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.4 19-Nov-2011  tls branches: 1.4.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.3 23-Oct-2009  snj branches: 1.3.12;
Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91usartvar.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91usartvar.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.3.12.1 17-Apr-2012  yamt sync with head
 1.4.2.1 18-Feb-2012  mrg merge to -current.
 1.5.6.2 03-Dec-2017  jdolecek update from HEAD
 1.5.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.14.1 06-Jun-2015  skrll Sync with HEAD
 1.3 23-Oct-2009  snj Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
 1.2 03-Jul-2008  matt branches: 1.2.4;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file at91var.h was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.2 11-Mar-2010  yamt sync with head
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file at91var.h was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3 04-Nov-2011  aymeric add preliminary support for AT91SAM9260
 1.2 03-Jul-2008  matt branches: 1.2.4; 1.2.32;
Add AT91 support. (XXX need to finish timecounter support).
 1.1 10-Nov-2007  matt branches: 1.1.2; 1.1.16; 1.1.20; 1.1.22;
file files.at91 was initially added on branch matt-nb4-arm.
 1.1.22.1 03-Jul-2008  simonb Sync with head.
 1.1.20.1 04-May-2009  yamt sync with head.
 1.1.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.2.32.1 10-Nov-2011  yamt sync with head
 1.2.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.4.1 03-Jul-2008  wrstuden file files.at91 was added on branch wrstuden-revivesa on 2008-09-18 04:33:20 +0000
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 09-Sep-2018  aymeric branches: 1.2.12;
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.1 10-Dec-2017  skrll branches: 1.1.2; 1.1.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 16-Feb-2024  skrll Trailing whitespace
 1.15 31-Mar-2020  jmcneill branches: 1.15.22;
Add ACPI support.
 1.14 22-Dec-2019  thorpej Rewrite the bcm2835 i2c driver as an interrupt-driven state machine. This
improves general system responsiveness when tranferring large amounts of
data on a single-core Pi board. This also includes:

Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.13 01-Jul-2018  jmcneill Use fdtbus_attach_i2cbus
 1.12 07-Jun-2018  thorpej branches: 1.12.2;
A minimal change to prevent the Raspberry Pi i2c driver from
looping forever if the command buffer and data buffer are both
NULL. XXX This driver needs an overhaul.

Also, preemptively return an error if we get a 10-bit address,
because we don't yet handle them correctly.
 1.11 09-May-2018  thorpej If we don't get informed (via device properties) of child I2C devices,
don't assign an empty array to iba.iba_child_devices, as it will prevent
indirect configuration of the I2C bus from occurring.

Tested on Raspberry Pi (bcm2835), identical logical fix replicated
(and compile-tested) elsewhere.

PR port-arm/53171
 1.10 03-Mar-2018  skrll branches: 1.10.2;
bcm2835_bsc: use fdt to enumerate i2c child devices

From jmcneill@
 1.9 28-Dec-2017  christos PR/52848: Brad Spencer: Comment out KASSERT, length 0 appears to be valid.
 1.8 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.7 28-Oct-2017  pgoyette Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3) format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
but it is possible that I've missed some of them. I would be glad to
update any stragglers that anyone identifies.
 1.6 17-Jun-2017  jmcneill Disable BSC0 on Raspberry Pi 3 and Zero W boards.
 1.5 24-Jan-2015  jakllsch branches: 1.5.10;
If doing a read-only (that is, no initial command write phase) transfer,
do not send a 0-byte write to the device before performing data phase.
 1.4 24-Jan-2015  jakllsch Catch NAKs from the device more often.

Should fix PR#48855 and maybe PR#48932.
 1.3 11-Sep-2014  skrll branches: 1.3.2;
Initialise bsciichist only once, otherwise the kern_histories list
never ends.
 1.2 20-Mar-2014  ozaki-r branches: 1.2.4;
Mark a variable __diagused

PR 48668 from David H. Gutteridge
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add driver for Broadcom Serial Control (I²C) master on BCM2835.
 1.1.8.4 03-Dec-2017  jdolecek update from HEAD
 1.1.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_bsc.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_bsc.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.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.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_bsc.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.2.4.2 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.2.4.1 11-Sep-2014  martin Pull up following revision(s) (requested by skrll in ticket #90):
sys/arch/arm/broadcom/bcm2835_bsc.c: revision 1.3
Initialise bsciichist only once, otherwise the kern_histories list
never ends.
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 06-Apr-2015  skrll Sync with HEAD
 1.5.10.2 02-Nov-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #335):
share/man/man9/kernhist.9: 1.5-1.8
sys/arch/acorn26/acorn26/pmap.c: 1.39
sys/arch/arm/arm32/fault.c: 1.105 via patch
sys/arch/arm/arm32/pmap.c: 1.350, 1.359
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
sys/arch/arm/omap/if_cpsw.c: 1.20
sys/arch/arm/omap/tiotg.c: 1.7
sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
sys/dev/ic/sl811hs.c: 1.98
sys/dev/usb/ehci.c: 1.256
sys/dev/usb/if_axe.c: 1.83
sys/dev/usb/motg.c: 1.18
sys/dev/usb/ohci.c: 1.274
sys/dev/usb/ucom.c: 1.119
sys/dev/usb/uhci.c: 1.277
sys/dev/usb/uhub.c: 1.137
sys/dev/usb/umass.c: 1.160-1.162
sys/dev/usb/umass_quirks.c: 1.100
sys/dev/usb/umass_scsipi.c: 1.55
sys/dev/usb/usb.c: 1.168
sys/dev/usb/usb_mem.c: 1.70
sys/dev/usb/usb_subr.c: 1.221
sys/dev/usb/usbdi.c: 1.175
sys/dev/usb/usbdi_util.c: 1.67-1.70
sys/dev/usb/usbroothub.c: 1.3
sys/dev/usb/xhci.c: 1.75
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
sys/kern/kern_history.c: 1.15
sys/kern/kern_xxx.c: 1.74
sys/kern/vfs_bio.c: 1.275-1.276
sys/miscfs/genfs/genfs_io.c: 1.71
sys/sys/kernhist.h: 1.21
sys/ufs/ffs/ffs_balloc.c: 1.63
sys/ufs/lfs/lfs_vfsops.c: 1.361
sys/ufs/lfs/ulfs_inode.c: 1.21
sys/ufs/lfs/ulfs_vnops.c: 1.52
sys/ufs/ufs/ufs_inode.c: 1.102
sys/ufs/ufs/ufs_vnops.c: 1.239
sys/uvm/pmap/pmap.c: 1.37-1.39
sys/uvm/pmap/pmap_tlb.c: 1.22
sys/uvm/uvm_amap.c: 1.108
sys/uvm/uvm_anon.c: 1.64
sys/uvm/uvm_aobj.c: 1.126
sys/uvm/uvm_bio.c: 1.91
sys/uvm/uvm_device.c: 1.66
sys/uvm/uvm_fault.c: 1.201
sys/uvm/uvm_km.c: 1.144
sys/uvm/uvm_loan.c: 1.85
sys/uvm/uvm_map.c: 1.353
sys/uvm/uvm_page.c: 1.194
sys/uvm/uvm_pager.c: 1.111
sys/uvm/uvm_pdaemon.c: 1.109
sys/uvm/uvm_swap.c: 1.175
sys/uvm/uvm_vnode.c: 1.103
usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3)
format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
but it is possible that I've missed some of them. I would be glad
to
update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes. Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one. :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.
 1.5.10.1 21-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #43):
sys/arch/arm/broadcom/bcm2835_bsc.c: revision 1.6
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.71
sys/arch/evbarm/rpi/vcprop.h: revision 1.16
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
 1.10.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.10.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.10.2.1 21-May-2018  pgoyette Sync with HEAD
 1.12.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.2.1 10-Jun-2019  christos Sync with HEAD
 1.15.22.1 16-Feb-2024  skrll Trailing whitespace
 1.6 15-Sep-2025  thorpej No longer need to include acpi_i2c.h here.
 1.5 15-Sep-2025  thorpej Do the ACPI-specific get-child-devices dance in iic_attach(). This
obviously isn't ideal, but it funnels the issue into a central location
and provides for easier improvement later.
 1.4 07-Aug-2021  thorpej branches: 1.4.2;
Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.2; 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 26-Jan-2021  jmcneill branches: 1.2.2;
Add a device_t parameter to acpi_enter_i2c_devs. If non-NULL, all child
acpi_devnodes will be claimed by that device so we don't later try to
attach a duplicate device to that node at acpinodebus.
 1.1 31-Mar-2020  jmcneill branches: 1.1.2; 1.1.6;
Add ACPI support.
 1.1.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.1 31-Mar-2020  martin file bcm2835_bsc_acpi.c was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.2.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.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3.2.2 25-Apr-2021  thorpej - Don't use acpi_enter_i2c_devs() -- it no longer exists.
- Pass along our devhandle to the i2c bus instance.
 1.3.2.1 25-Apr-2021  thorpej acpi_i2c.h is no more.
 1.4.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.8 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.7 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.6 29-Jan-2021  skrll branches: 1.6.4; 1.6.14;
fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.3 23-Dec-2020  thorpej Add missing call to fdtbus_register_i2c_controller(). This doesn't
affect basic child attachment, but would have broken other references
to the i2c controller in DT overlays.
 1.2 31-May-2020  thorpej branches: 1.2.2;
Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.1 31-Mar-2020  jmcneill branches: 1.1.2;
Add ACPI support.
 1.1.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.1 31-Mar-2020  martin file bcm2835_bsc_fdt.c was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.2.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.2.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.6.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.6.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.8;
Add driver for Broadcom Serial Control (I²C) master on BCM2835.
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_bscreg.h was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_bscreg.h was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_bscreg.h was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.1 31-Mar-2020  jmcneill branches: 1.1.2;
Add bcm2835_bscvar.h
 1.1.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.1 31-Mar-2020  martin file bcm2835_bscvar.h was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 10-Dec-2017  skrll branches: 1.2.16;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1 21-Nov-2015  mlelstv branches: 1.1.2; 1.1.18;
Add drivers to access the clock manager and pulse width modulator.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Nov-2015  jdolecek file bcm2835_cm.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Nov-2015  skrll file bcm2835_cm.c was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.2.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 19-Oct-2017  skrll branches: 1.2.2;
Fix RCSIds
 1.1 21-Nov-2015  mlelstv branches: 1.1.2;
Add drivers to access the clock manager and pulse width modulator.
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Nov-2015  skrll file bcm2835_cm.h was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 19-Oct-2017  jdolecek file bcm2835_cm.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.10 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.9 11-Dec-2023  mlelstv Report UART clock.
 1.8 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 28-Sep-2020  jmcneill branches: 1.6.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.5 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.4 10-Dec-2017  skrll branches: 1.4.2; 1.4.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 31-Jul-2017  jmcneill branches: 1.3.2; 1.3.4;
mark ISR as mpsafe, detect when this is the console
 1.2 31-Jul-2017  jmcneill Set the correct com type
 1.1 30-Jul-2017  jmcneill Add support for BCM2835 AUX UART.
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 31-Jul-2017  jdolecek file bcm2835_com.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 31-Jul-2017  skrll file bcm2835_com.c was added on branch nick-nhusb on 2017-08-28 17:51:29 +0000
 1.4.4.1 10-Jun-2019  christos Sync with HEAD
 1.4.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.6.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 08-Aug-2021  jmcneill Adjust register base and size
 1.1 08-Aug-2021  jmcneill broadcom: ACPI: Add support for mini UART in ACPI mode.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 30-Dec-2019  skrll branches: 1.4.8;
Add emmc2 clock goop from mlelstv@
 1.3 24-Dec-2019  skrll Match brcm,bcm2711-cprman
 1.2 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.1 10-Dec-2017  skrll branches: 1.1.2; 1.1.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.4.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 18-Sep-2012  matt branches: 1.2.2;
Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_dma.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 18-Sep-2012  yamt file bcm2835_dma.c was added on branch yamt-pagecache on 2012-10-30 17:18:58 +0000
 1.19 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.18 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17 30-Sep-2020  jmcneill branches: 1.17.2;
Fix off-by-one in channel count, from Mark Millard.
 1.16 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.15 01-Jun-2017  chs branches: 1.15.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.14 09-Aug-2015  mlelstv Make the DMA halt procedure follow better the documentation.
 1.13 09-Aug-2015  mlelstv Invoke callback routine for all DMA interrupts.
Pass status and error bits to callback instead of filtering them early.
Adjust the current only callback routine in the EMMC driver.
 1.12 02-Aug-2015  jmcneill When halting a channel, abort the current DMA CB and reset the channel
before stopping DMA.
 1.11 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.10 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.9 14-Sep-2014  jmcneill branches: 1.9.2;
return NULL when failing to establish interrupt
 1.8 12-Sep-2014  jmcneill initialise ch_ih
 1.7 12-Sep-2014  jmcneill improve error handling in bcm_dmac_alloc and disestablish the irq handler in bcm_dmac_free
 1.6 12-Sep-2014  jakllsch Move DMA interrupt establishement to time of engine allocation so as to
allow the IPL to be specified by the driver using the DMA engine.
 1.5 12-Sep-2014  jmcneill trust the firmware and use whatever it advertises between DMA0-DMA11
 1.4 12-Sep-2014  jmcneill not sure how this compiles for me, but remove extra * on prop_dictionary_t decl
 1.3 12-Sep-2014  jmcneill use dma channel mask from firmware
 1.2 07-Sep-2014  jmcneill branches: 1.2.2;
fix a stupid bug at attach
 1.1 07-Sep-2014  jmcneill bcm2835 dma controller driver
 1.2.2.3 03-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.
 1.2.2.2 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.2.2.1 07-Sep-2014  martin file bcm2835_dmac.c was added on branch netbsd-7 on 2014-09-11 14:20:11 +0000
 1.9.2.2 28-Aug-2017  skrll Sync with HEAD
 1.9.2.1 22-Sep-2015  skrll Sync with HEAD
 1.15.8.2 03-Dec-2017  jdolecek update from HEAD
 1.15.8.1 01-Jun-2017  jdolecek file bcm2835_dmac.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.17.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 01-Dec-2020  rin Data written to bcmdmac(4) should be in little-endian.
 1.4 09-Aug-2015  mlelstv branches: 1.4.16; 1.4.32;
Invoke callback routine for all DMA interrupts.
Pass status and error bits to callback instead of filtering them early.
Adjust the current only callback routine in the EMMC driver.
 1.3 12-Sep-2014  jakllsch branches: 1.3.2;
Move DMA interrupt establishement to time of engine allocation so as to
allow the IPL to be specified by the driver using the DMA engine.
 1.2 12-Sep-2014  jakllsch Add a bunch of register offsets to read-only registers.
 1.1 07-Sep-2014  jmcneill branches: 1.1.2;
bcm2835 dma controller driver
 1.1.2.3 03-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.
 1.1.2.2 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.1.2.1 07-Sep-2014  martin file bcm2835_dmac.h was added on branch netbsd-7 on 2014-09-11 14:20:11 +0000
 1.3.2.1 22-Sep-2015  skrll Sync with HEAD
 1.4.32.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4.16.2 03-Dec-2017  jdolecek update from HEAD
 1.4.16.1 09-Aug-2015  jdolecek file bcm2835_dmac.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2 15-Oct-2013  skrll More dotg(4) removal.
 1.1 09-Jan-2013  skrll branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Provide dotg(4) - a driver for the Synposys DesignWare OTG USB IP found
in the RaspberryPI. The driver supports host mode and control, interrupt,
and bulk transfers only at this point.

Heavily based on the FreeBSD driver by Hans Petter Selasky.

Thanks to all who helped. Jared McNeill, Michael van Elst and other.
 1.1.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 09-Jan-2013  tls file bcm2835_dotg.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 09-Jan-2013  riz file bcm2835_dotg.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.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.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 09-Jan-2013  yamt file bcm2835_dotg.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 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 29-Jan-2021  skrll branches: 1.10.2;
fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 10-Dec-2017  skrll branches: 1.8.16;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.7 23-Apr-2016  skrll 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.6 30-Aug-2015  skrll Update for latest dwc2
 1.5 30-Jul-2015  skrll Use IPL_VM for dwc2_intr and mark as MP safe where possible.
 1.4 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.3 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

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

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 05-Sep-2013  yamt file bcm2835_dwctwo.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 05-Sep-2013  rmind file bcm2835_dwctwo.c was added on branch rmind-smpnet on 2014-05-18 17:44:57 +0000
 1.2.2.2 22-Sep-2015  skrll Sync with HEAD
 1.2.2.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.8.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.44 25-Sep-2025  jmcneill bcm283x: add SDHC_FLAG_NO_PWR0 quirk

Add SDHC_FLAG_NO_PWR0 quirk to restore previous behaviour with
SDHC_FLAG_32BIT_ACCESS flag.
 1.43 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.42 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.41 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.40 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.39 01-Dec-2020  rin Data written to bcmdmac(4) should be in little-endian.
 1.38 28-Aug-2020  skrll branches: 1.38.2;
Fix build if NBCMDMAC is zero
 1.37 31-May-2020  thorpej Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.36 20-Feb-2020  jmcneill Add support for brcm,bcm2711-emmc2
 1.35 30-Dec-2019  skrll branches: 1.35.2;
Oops, don't match brcm,bcm2711-emmc2 here.

Thanks to jmcneill for pointing out my mistake
 1.34 30-Dec-2019  skrll Match brcm,bcm2711-emmc2
 1.33 19-Aug-2018  rin Clean up leftover when converting intr_establish() to fdtbus_intr_establish().
The latter accept only flags 0 or FDT_INTR_MPSAFE. For both cases, it add
IST_LEVEL flag for underlying intr_establish() function.

OK skrll
 1.32 10-Dec-2017  skrll branches: 1.32.2; 1.32.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.31 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.30 22-Jun-2017  jmcneill Disable SDR50 support, it is not reliable on these boards.
 1.29 02-Feb-2016  skrll branches: 1.29.10;
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.28 09-Aug-2015  mlelstv Invoke callback routine for all DMA interrupts.
Pass status and error bits to callback instead of filtering them early.
Adjust the current only callback routine in the EMMC driver.
 1.27 09-Aug-2015  mlelstv Handle error when setting DMA transfer.
 1.26 03-Aug-2015  jmcneill DDR50 and SDR104 don't seem to be stable here, so disable them
 1.25 02-Aug-2015  jmcneill enable UHS support
 1.24 31-Jul-2015  jmcneill Simplify sdhc(4) locking
 1.23 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.22 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.21 15-Dec-2014  mlelstv Don't pipeline any DMA writes to eMMC.

Fixes PR/49463.
 1.20 25-Nov-2014  skrll branches: 1.20.2;
Only use 128-bit mode when the transfer is a multiple of this.

From Jared (the arm periph guy)
 1.19 04-Oct-2014  jmcneill vendor_transfer_data_dma callback takes a struct sdhc_softc now
 1.18 01-Oct-2014  jmcneill SDHC_MAX_BLK_LEN_1024 needs to be shifted into caps reg
 1.17 01-Oct-2014  jmcneill oops, SDHC_FLAG_NO_HS_BIT is still required
 1.16 01-Oct-2014  jmcneill SDHC_FLAG_NO_HS_BIT should no longer be needed
 1.15 13-Sep-2014  skrll Fix typo in previous
 1.14 13-Sep-2014  skrll Make emmc use of dma controller optional and disable the bcmdmac for now.

It doesn't work for me.
 1.13 12-Sep-2014  jmcneill cv_wait -> cv_timedwait for dma transfers, just to be safe
 1.12 12-Sep-2014  jmcneill use 0 and 1 for states instead of 27 and 42
 1.11 12-Sep-2014  jakllsch Add and enable DMA support for SD cards on Raspberry Pi/BCM2835.
 1.10 10-Sep-2014  jakllsch Drop unused local-softc variable.
 1.9 05-Sep-2013  skrll branches: 1.9.4;
Whitespace
 1.8 14-Apr-2013  skrll branches: 1.8.4;
Trailing whitespace
 1.7 10-Jan-2013  jmcneill reinstate SDHC_HIGH_SPEED_SUPP capability, and add SDHC_FLAG_NO_HS_BIT flag to workaround bcm2835 sdhc issue with many high speed cards
 1.6 10-Jan-2013  jmcneill Don't set SDHC_HIGH_SPEED_SUPP in host caps as many cards stop responding
after the switch to high speed mode.
 1.5 07-Jan-2013  jmcneill emmc supports 1k block size, so set SDHC_MAX_BLK_LEN_1024 in host caps
 1.4 23-Dec-2012  jakllsch The BCM2835 reference says the SDHC_HIGH_SPEED bit in SDHC_HOST_CTL is
implemented, so add SDHC_HIGH_SPEED_SUPP to the software-implemented
SDHC_CAPABILITIES register.
 1.3 30-Oct-2012  skrll Whitespace. *sigh*
 1.2 30-Oct-2012  skrll Query the EMMC clock rate and use it if it's available.
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.6.5 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.1.6.4 23-Jan-2013  yamt sync with head
 1.1.6.3 16-Jan-2013  yamt sync with (a bit old) head
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_emmc.c was added on branch yamt-pagecache on 2012-10-30 17:18:58 +0000
 1.1.4.5 03-Dec-2017  jdolecek update from HEAD
 1.1.4.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.3 23-Jun-2013  tls resync from head
 1.1.4.2 25-Feb-2013  tls resync with head
 1.1.4.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.2.4 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.3 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_emmc.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.8.4.1 18-May-2014  rmind sync with head
 1.9.4.5 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.9.4.4 15-Dec-2014  martin Pull up following revision(s) (requested by mlelstv in ticket #328):
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.21
Don't pipeline any DMA writes to eMMC.
Fixes PR/49463.
 1.9.4.3 25-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #265):
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.20
Only use 128-bit mode when the transfer is a multiple of this.
From Jared (the arm periph guy)
 1.9.4.2 05-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #129):
sys/dev/sdmmc/sdhcvar.h: revision 1.15
sys/dev/sdmmc/sdhc.c: revision 1.51
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.19
Pass sdhc_softc instead of sdhc_host to sc_vendor_transfer_data_dma,
since the vendor specific code has no access to it otherwise,
but can easily do device_private(sdhc_softc->sc_dev).
 1.9.4.1 03-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.
 1.20.2.4 28-Aug-2017  skrll Sync with HEAD
 1.20.2.3 19-Mar-2016  skrll Sync with HEAD
 1.20.2.2 22-Sep-2015  skrll Sync with HEAD
 1.20.2.1 06-Apr-2015  skrll Sync with HEAD
 1.29.10.1 30-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #59):
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.30
Disable SDR50 support, it is not reliable on these boards.
 1.32.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.32.4.1 10-Jun-2019  christos Sync with HEAD
 1.32.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.35.2.1 29-Feb-2020  ad Sync with head.
 1.38.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.38.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 25-Sep-2025  jmcneill bcm283x: add SDHC_FLAG_NO_PWR0 quirk

Add SDHC_FLAG_NO_PWR0 quirk to restore previous behaviour with
SDHC_FLAG_32BIT_ACCESS flag.
 1.1 30-Dec-2019  jmcneill branches: 1.1.6;
Add BCM2835 EMMC acpi glue
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 30-Dec-2019  martin file bcm2835_emmc_acpi.c was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 01-Dec-2020  rin bcm2835-fb seems byte-swapped to CPU when running in big-endian mode.
 1.10 23-Nov-2020  rin Sort headers. No binary changes.
 1.9 01-Apr-2018  ryo branches: 1.9.14;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.8 10-Dec-2017  skrll branches: 1.8.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.7 05-Sep-2014  macallan allow board-specific ioctl() handlers
 1.6 24-Jul-2014  riastradh Add enable/disable polling hooks to genfb_ops.
 1.5 11-May-2013  skrll branches: 1.5.6;
Fix up the VCONS_DRAW_INTR support and DDB.

From reinoud.
 1.4 31-Jan-2013  macallan branches: 1.4.2; 1.4.6;
support WSDISPLAYIO_GET_FBINFO
 1.3 10-Jan-2013  jmcneill branches: 1.3.2;
only print switching to fb message if genfb is console
 1.2 09-Jan-2013  jmcneill If genfb.type=<int> is passed on cmdline, override the wsdisplay type
returned by WSDISPLAYIO_GTYPE ioctl.
 1.1 08-Jan-2013  jmcneill add genfb glue
 1.3.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.3.2.2 23-Jan-2013  yamt sync with head
 1.3.2.1 10-Jan-2013  yamt file bcm2835_genfb.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.4.6.5 03-Dec-2017  jdolecek update from HEAD
 1.4.6.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.3 23-Jun-2013  tls resync from head
 1.4.6.2 25-Feb-2013  tls resync with head
 1.4.6.1 31-Jan-2013  tls file bcm2835_genfb.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.4.2.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.4.2.1 31-Jan-2013  riz file bcm2835_genfb.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.5.6.1 10-Aug-2014  tls Rebase.
 1.8.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.9.14.2 03-Apr-2021  thorpej Sync with HEAD.
 1.9.14.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.24 17-Jan-2022  thorpej Pass the controller devhandle along to the GPIO layer.
 1.23 21-Aug-2021  andvar fix mainly same typos as in my previous commit but outside sys/dev/dm.
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Jul-2021  andvar branches: 1.21.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.20 24-Apr-2021  thorpej branches: 1.20.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.16 12-Oct-2019  mlelstv branches: 1.16.8;
off by one
 1.15 03-Oct-2019  mlelstv remove debug printfs, add more compat strings.
 1.14 01-Oct-2019  jmcneill Add support for devices with separate "init" and "default" pinctrl states.
 1.13 28-Sep-2019  mlelstv Handle BCM2838 (bcm2711) SoC pecularities.
 1.12 10-May-2019  skrll branches: 1.12.2;
Take a lead from sys/dev/gpio/gpio.c:gpio_intr_str and report edge vs
level. etc interrupt type.

From yarl-baudig
 1.11 03-Mar-2019  skrll Trailing whitespace
 1.10 07-Feb-2019  mlelstv Support configuration of alternate functions.
 1.9 26-Jan-2019  thorpej Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.8 28-Sep-2018  jmcneill Fix previous; follow the binding spec for this device when decoding
interrupt specifiers.
 1.7 19-May-2018  thorpej branches: 1.7.2;
Add support for interrupts on GPIO pins. We support both FDT-driven
interrupt registration as well as the new GPIO interrupt interface.

Based on initial work by Brad Spencer.
PR kern/51676
 1.6 10-Dec-2017  skrll branches: 1.6.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.5 09-Nov-2017  skrll Trailing whitespace
 1.4 21-Sep-2017  skrll spaces to tabs
 1.3 02-Feb-2016  skrll Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.2 19-May-2014  skrll branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Build fix for when there is no gpio in the kernel.

PR/48816: Compile fix for src/sys/arch/arm/broadcom/bcm2835_gpio.c
 1.1 22-Apr-2014  kardel branches: 1.1.2;
add a driver for BCM2835 obio gpio
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 22-Apr-2014  rmind file bcm2835_gpio.c was added on branch rmind-smpnet on 2014-05-18 17:44:57 +0000
 1.2.10.1 19-Mar-2016  skrll Sync with HEAD
 1.2.8.3 03-Dec-2017  jdolecek update from HEAD
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 19-May-2014  tls file bcm2835_gpio.c was added on branch tls-maxphys on 2014-08-20 00:02:45 +0000
 1.2.6.1 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.2.4.2 10-Aug-2014  tls Rebase.
 1.2.4.1 19-May-2014  tls file bcm2835_gpio.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.2.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.2.2.1 19-May-2014  yamt file bcm2835_gpio.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.6.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.6.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.6.2.1 21-May-2018  pgoyette Sync with HEAD
 1.7.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.1 10-Jun-2019  christos Sync with HEAD
 1.12.2.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.16.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.19.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.20.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.21.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.5 30-Jul-2017  jmcneill Explicitly configure pin pull-down/up settings for SDIO.
 1.4 02-Feb-2016  skrll Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.3 22-Apr-2014  kardel branches: 1.3.2; 1.3.4;
add a driver for BCM2835 obio gpio
 1.2 09-Jan-2013  jmcneill branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.16;
aprint_verbose -> aprint_debug
 1.1 05-Jan-2013  jakllsch Add a function for adjusting the pin muxer in the GPIO block.
(This should probably be revisited later.)
 1.2.16.1 10-Aug-2014  tls Rebase.
 1.2.8.4 03-Dec-2017  jdolecek update from HEAD
 1.2.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.2 25-Feb-2013  tls resync with head
 1.2.8.1 09-Jan-2013  tls file bcm2835_gpio_subr.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.2.6.1 18-May-2014  rmind sync with head
 1.2.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.2.4.1 09-Jan-2013  riz file bcm2835_gpio_subr.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.2.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.2.2.2 23-Jan-2013  yamt sync with head
 1.2.2.1 09-Jan-2013  yamt file bcm2835_gpio_subr.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.3.4.2 28-Aug-2017  skrll Sync with HEAD
 1.3.4.1 19-Mar-2016  skrll Sync with HEAD
 1.3.2.1 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.4 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 30-Jul-2017  jmcneill Explicitly configure pin pull-down/up settings for SDIO.
 1.2 22-Apr-2014  kardel branches: 1.2.4;
add a driver for BCM2835 obio gpio
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Add a function for adjusting the pin muxer in the GPIO block.
(This should probably be revisited later.)
 1.1.16.1 10-Aug-2014  tls Rebase.
 1.1.8.4 03-Dec-2017  jdolecek update from HEAD
 1.1.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_gpio_subr.h was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_gpio_subr.h was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.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.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_gpio_subr.h was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.2.4.1 28-Aug-2017  skrll Sync with HEAD
 1.6 08-Mar-2021  mlelstv Undocumented register to multiplex emmc2 pins to legacy sdhc
 1.5 28-Sep-2019  mlelstv branches: 1.5.8;
Handle BCM2838 (bcm2711) SoC pecularities.
 1.4 10-Dec-2017  skrll branches: 1.4.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 22-Apr-2014  kardel add a driver for BCM2835 obio gpio
 1.2 14-Apr-2013  skrll branches: 1.2.4; 1.2.8;
Trailing whitespace
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.8;
Add a function for adjusting the pin muxer in the GPIO block.
(This should probably be revisited later.)
 1.1.8.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.3 23-Jun-2013  tls resync from head
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_gpioreg.h was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_gpioreg.h was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.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.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_gpioreg.h was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.2.8.1 10-Aug-2014  tls Rebase.
 1.2.4.1 18-May-2014  rmind sync with head
 1.4.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.46 30-Dec-2024  skrll implementationm -> implementation
 1.45 07-Oct-2024  andvar s/periperal/peripheral/ in comments.
 1.44 19-Nov-2022  yamt branches: 1.44.8;
bcm2835_intr.c: fix !MULTIPROCESSOR

Tested on Raspberry PI 3 model A+.
 1.43 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.42 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.41 12-Sep-2021  nat Fix build for uniprocessor.
 1.40 01-Sep-2021  jmcneill Install IPI handler with non-NULL context.

A side effect of interrupt handlers with NULL context when using armpic
is that the interrupt handler is only called from interrupt context, not
when lowering spl!
 1.39 01-Sep-2021  rin PR port-arm/56264

Register all PICs when bcmicu1 is attached, in order to avoid calling
pic_add() from cpu_hatch(), which blocks for aarch64 kernel on RPI3.
This prevented MP kernel to boot due to KASSERT failure as described
in the PR.

This is a kind of a workaround; the real fix should be to

(a) reorganize cpu_hatch() for aarch64 and arm:
http://mail-index.netbsd.org/port-arm/2021/06/21/msg007320.html

(b) or change MI abstraction of ``MP ready'':
http://mail-index.netbsd.org/port-arm/2021/06/22/msg007327.html

However, still, this fix does not bring about any penalty, and it is
not good to leave RPI3 broken for months...

Tested on RPI3 (aarch64 MP, armv7hf MP) as well as RPI1 (armv6hf UP).
 1.38 08-Mar-2021  mlelstv Move interrupt register definitions to driver.
 1.37 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.36 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.35 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than
matching against multiple sets of compatibility strings.
 1.34 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.33 16-Dec-2020  christos interupt -> interrupt
 1.32 15-Feb-2020  skrll branches: 1.32.6;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.31 20-Jan-2020  mrg use arm_cpu_mpidr() and fix arm64 builds.
 1.30 19-Jan-2020  skrll ci_core_id isn't setup early enough after recent arm_cpu_topology
changes, so use ci_mpidr as a stop gap fix for cpuid
 1.29 26-Dec-2019  skrll branches: 1.29.2;
Use PIC_IRQBASE_ALLOC for all pic_add calls and track/use each cpu irqbase
 1.28 25-Dec-2019  skrll Use PIC_IRQBASE_ALLOC and allow conditional attachment of interrupt
handlers (for RPI4)
 1.27 29-Nov-2019  thorpej Account for the IRQ offset on the bcm2836.
 1.26 28-Nov-2019  thorpej Jared points out that interrupt_distribute(9) assumes that any interrupt
handle can be used as an input to the MD interrupt_distribute implementation
so we are forced to return the handle we got back from intr_establish().
Upshot is that the input to bcm2835_icu_fdt_disestablish() is ambiguous for
shared IRQs, rendering them un-disestablishable.

While here, make sure to actually bump the intr_refcnt, and add an
assertion on the value we get back from bcm2835_icu_fdt_decode_irq().
 1.25 28-Nov-2019  thorpej There are some devices on the bcm283x that share IRQs (notably, the i2c
controllers), but the generic ARM PIC code doesn't support this. Add a
workaround inspired by the GICv3 driver (thanks Jared for pointint it out).
 1.24 25-Sep-2019  skrll Sprinkle KASSERTs
 1.23 25-Sep-2019  skrll Sprinkle static
 1.22 25-Sep-2019  skrll KNF
 1.21 25-Sep-2019  skrll Whitespace
 1.20 27-Mar-2019  ryo Fix to show counters of "bcm2836 pic" by "intrctl list" correctly.
 1.19 01-Mar-2019  skrll Handle processor private interrupts better and add support for the PMU
interrupt.

Thanks to jmcneill for review and suggestions.
 1.18 01-Mar-2019  skrll Sprinkle static
 1.17 10-Feb-2019  skrll Add some more interrupt source names
 1.16 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.15 10-Dec-2017  skrll branches: 1.15.2; 1.15.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.14 07-Nov-2017  ryo on RPI2, fix compile failure without options MULTIPROCESSOR.
 1.13 15-Oct-2017  skrll Simplify array initialisation
 1.12 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.11 01-Aug-2015  skrll Call the correct ipi handlers for IPI_AST and IPI_KPREEMPT
 1.10 25-Jul-2015  skrll IPIs should be IPL_HIGH according to rmind@

Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.

Sprinkle some KASSERTs
 1.9 12-Apr-2015  jmcneill Use a bit per IPI type in local mailbox 0 registers. Ok matt@
 1.8 12-Apr-2015  skrll RPI2 MP support.

Thanks to Matt Thomas for making this possible with his changes to pic.c
 1.7 05-Mar-2015  skrll Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
 1.6 04-Mar-2015  skrll Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.

RPI2 nows works well with only the boot cpu.
 1.5 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.4 07-Sep-2014  skrll branches: 1.4.2;
DMA channel interrupt names
 1.3 08-Jan-2013  skrll branches: 1.3.12;
Whitespace
 1.2 18-Aug-2012  jakllsch branches: 1.2.2; 1.2.4;
Fix two copypasteos that resulted in interrupt strings being wrong for
(among other interrutps) the plcom(4) and the sdhc(4).
 1.1 26-Jul-2012  skrll branches: 1.1.2;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.2.4 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.3 19-Aug-2012  riz Pull up following revision(s) (requested by skrll in ticket #515):
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.2
Fix two copypasteos that resulted in interrupt strings being wrong for
(among other interrutps) the plcom(4) and the sdhc(4).
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_intr.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.2.4.3 23-Jan-2013  yamt sync with head
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 18-Aug-2012  yamt file bcm2835_intr.c was added on branch yamt-pagecache on 2012-10-30 17:18:58 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 25-Feb-2013  tls resync with head
 1.3.12.3 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.3.12.2 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.3.12.1 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.4.2.4 28-Aug-2017  skrll Sync with HEAD
 1.4.2.3 22-Sep-2015  skrll Sync with HEAD
 1.4.2.2 06-Jun-2015  skrll Sync with HEAD
 1.4.2.1 06-Apr-2015  skrll Sync with HEAD
 1.15.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.4.1 10-Jun-2019  christos Sync with HEAD
 1.15.2.1 18-Jan-2019  pgoyette Synch with HEAD
 1.29.2.2 29-Feb-2020  ad Sync with head.
 1.29.2.1 25-Jan-2020  ad Sync with head.
 1.32.6.2 03-Apr-2021  thorpej Sync with HEAD.
 1.32.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.44.8.1 02-Aug-2025  perseant Sync with HEAD
 1.4 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.2 12-Apr-2015  skrll RPI2 MP support.

Thanks to Matt Thomas for making this possible with his changes to pic.c
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18; 1.1.20;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.20.2 22-Sep-2015  skrll Sync with HEAD
 1.1.20.1 06-Jun-2015  skrll Sync with HEAD
 1.1.18.1 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_intr.h was added on branch yamt-pagecache on 2012-10-30 17:18:58 +0000
 1.1.4.1 03-Dec-2017  jdolecek update from HEAD
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_intr.h was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.17 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.16 24-Apr-2021  thorpej branches: 1.16.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.15 22-Feb-2020  jmcneill branches: 1.15.8;
RPi4 UEFI firmware 1.1 reports the wrong IRQ for the VC mailbox. Use
polling mode for now until this is sorted out.
 1.14 30-Dec-2019  jmcneill branches: 1.14.2;
Split bcm2835 mbox driver into separate fdt and acpi frontends.
 1.13 19-Aug-2018  rin Clean up leftover when converting intr_establish() to fdtbus_intr_establish().
The latter accept only flags 0 or FDT_INTR_MPSAFE. For both cases, it add
IST_LEVEL flag for underlying intr_establish() function.

OK skrll
 1.12 10-Dec-2017  skrll branches: 1.12.2; 1.12.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.11 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.10 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.9 15-Oct-2014  skrll branches: 1.9.2;
Whitespace.
 1.8 07-Oct-2014  skrll Mailbox improvements from mlelstv@

Serialise access to the mailbox and use interrupts.

XXX if (cold) should go
 1.7 02-Oct-2014  skrll Ensure correctness of bus_dmamap_sync operations. Shouldn't affect RPI.
 1.6 14-Apr-2013  skrll Trailing whitespace
 1.5 08-Jan-2013  skrll branches: 1.5.2;
Whitespace
 1.4 08-Jan-2013  jmcneill serialize bcmmbox_request
 1.3 07-Jan-2013  jmcneill allow for a single board specific device to attach to the mbox driver
 1.2 22-Aug-2012  jakllsch branches: 1.2.2; 1.2.4;
As we'll soon get boot-time information via the mailbox method, seperate
the actual access code into a seperate file that can be used by itself.
 1.1 20-Aug-2012  skrll First pass at a VC mailbox driver.
 1.2.4.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.4.3 23-Jan-2013  yamt sync with head
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 22-Aug-2012  yamt file bcm2835_mbox.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.2.2.3 03-Dec-2017  jdolecek update from HEAD
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 25-Feb-2013  tls resync with head
 1.5.2.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.5.2.1 08-Jan-2013  riz file bcm2835_mbox.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.9.2.1 22-Sep-2015  skrll Sync with HEAD
 1.12.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.4.1 10-Jun-2019  christos Sync with HEAD
 1.12.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14.2.1 29-Feb-2020  ad Sync with head.
 1.15.8.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.16.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 30-Dec-2019  jmcneill Split bcm2835 mbox driver into separate fdt and acpi frontends.
 1.5 07-Oct-2014  skrll branches: 1.5.20;
Mailbox improvements from mlelstv@

Serialise access to the mailbox and use interrupts.

XXX if (cold) should go
 1.4 07-Jan-2013  jmcneill allow for a single board specific device to attach to the mbox driver
 1.3 13-Oct-2012  skrll branches: 1.3.2; 1.3.4;
Change the mailbox handling so that the data value top 28 bits are used.
 1.2 22-Aug-2012  jakllsch branches: 1.2.2;
As we'll soon get boot-time information via the mailbox method, seperate
the actual access code into a seperate file that can be used by itself.
 1.1 20-Aug-2012  skrll First pass at a VC mailbox driver.
 1.2.2.3 03-Dec-2017  jdolecek update from HEAD
 1.2.2.2 25-Feb-2013  tls resync with head
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.3 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.3.4.2 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.3.4.1 13-Oct-2012  riz file bcm2835_mbox.h was added on branch netbsd-6 on 2012-11-19 19:12:58 +0000
 1.3.2.3 23-Jan-2013  yamt sync with head
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 13-Oct-2012  yamt file bcm2835_mbox.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.5.20.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 22-Feb-2020  jmcneill branches: 1.2.4;
RPi4 UEFI firmware 1.1 reports the wrong IRQ for the VC mailbox. Use
polling mode for now until this is sorted out.
 1.1 30-Dec-2019  jmcneill branches: 1.1.2;
Split bcm2835 mbox driver into separate fdt and acpi frontends.
 1.1.2.1 29-Feb-2020  ad Sync with head.
 1.2.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.1 22-Feb-2020  martin file bcm2835_mbox_acpi.c was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.3 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 30-Dec-2019  jmcneill branches: 1.1.6; 1.1.10;
Split bcm2835 mbox driver into separate fdt and acpi frontends.
 1.1.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 30-Dec-2019  martin file bcm2835_mbox_fdt.c was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.5 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.4 07-Oct-2014  skrll Mailbox improvements from mlelstv@

Serialise access to the mailbox and use interrupts.

XXX if (cold) should go
 1.3 13-Oct-2012  skrll branches: 1.3.2; 1.3.4;
Change the mailbox handling so that the data value top 28 bits are used.
 1.2 13-Oct-2012  skrll Unwrap short line. Other whitespace.
 1.1 22-Aug-2012  jakllsch branches: 1.1.2;
As we'll soon get boot-time information via the mailbox method, seperate
the actual access code into a seperate file that can be used by itself.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.2 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.3.4.1 13-Oct-2012  riz file bcm2835_mbox_subr.c was added on branch netbsd-6 on 2012-11-19 19:12:58 +0000
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 13-Oct-2012  yamt file bcm2835_mbox_subr.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1 20-Aug-2012  skrll branches: 1.1.4; 1.1.6;
First pass at a VC mailbox driver.
 1.1.6.2 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.1.6.1 20-Aug-2012  riz file bcm2835_mboxreg.h was added on branch netbsd-6 on 2012-11-19 19:12:59 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 20-Aug-2012  yamt file bcm2835_mboxreg.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.29 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.28 30-Jul-2017  jmcneill Add support for BCM2835 AUX UART.
 1.27 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.26 21-Nov-2015  mlelstv Add drivers to access the clock manager and pulse width modulator.
 1.25 12-Apr-2015  skrll RPI2 MP support.

Thanks to Matt Thomas for making this possible with his changes to pic.c
 1.24 04-Mar-2015  skrll Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.

RPI2 nows works well with only the boot cpu.
 1.23 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.22 07-Oct-2014  skrll branches: 1.22.2;
Mailbox improvements from mlelstv@

Serialise access to the mailbox and use interrupts.

XXX if (cold) should go
 1.21 07-Sep-2014  jmcneill bcm2835 dma controller driver
 1.20 22-Apr-2014  kardel branches: 1.20.2;
add a driver for BCM2835 obio gpio
 1.19 15-Oct-2013  skrll branches: 1.19.2;
Switch to dwctwo(4) from dotg(4) for the RaspberryPi port. This brings
DMA support and (initial) isoc transfer support.

Remove URTWN_DOTG_WORKAROUND as dwctwo doesn't appear to need it.
 1.18 24-Mar-2013  jmcneill branches: 1.18.4;
add vchiq
 1.17 27-Jan-2013  matt Revert back to one dmarange
 1.16 27-Jan-2013  matt Add a _BUS_DMAMAP_NOALLOC which tells bus_dmamem_alloc to skip that
dmarange when allocating memory.
Add a second dmarange to bcm23xx obio to allow it to map coherently mapped
memory.
 1.15 27-Jan-2013  matt Get rid of _BUS_DMAMAP_MEM_XLATE
 1.14 27-Jan-2013  matt Add a flag to make bus_dmamem_map use the bus/sys transation table when
mapping bus addresses. Make bcm2835 obio use it.
 1.13 26-Jan-2013  skrll Deal with bus addresses better. Switch the DMA bus address base to the
cache coherent range - not that anything uses it yet.
 1.12 25-Jan-2013  jmcneill Add BCM2835 RNG support.
 1.11 09-Jan-2013  skrll Provide dotg(4) - a driver for the Synposys DesignWare OTG USB IP found
in the RaspberryPI. The driver supports host mode and control, interrupt,
and bulk transfers only at this point.

Heavily based on the FreeBSD driver by Hans Petter Selasky.

Thanks to all who helped. Jared McNeill, Michael van Elst and other.
 1.10 08-Jan-2013  jmcneill add fb and dotg devices
 1.9 05-Jan-2013  jakllsch Add driver for BCM2835 SPI0 controller.
 1.8 05-Jan-2013  jakllsch Add driver for Broadcom Serial Control (I²C) master on BCM2835.
 1.7 05-Jan-2013  jakllsch Whitespace style adjustments.
 1.6 04-Jan-2013  jakllsch Use config_stdsubmatch() to enable (optional) use of locators on obio devices.
 1.5 22-Aug-2012  jakllsch branches: 1.5.2; 1.5.4;
... and remove inclusion of defparam-created header.
 1.4 20-Aug-2012  skrll First pass at a VC mailbox driver.
 1.3 17-Aug-2012  skrll Fix thinko in previous.
 1.2 16-Aug-2012  jakllsch Replace use of MEMSIZE with functionally equivilant,
yet perhaps no-more-proper, physmem*PAGE_SIZE.
 1.1 26-Jul-2012  skrll branches: 1.1.2;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.2.3 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_obio.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.5.4.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.5.4.3 23-Jan-2013  yamt sync with head
 1.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 22-Aug-2012  yamt file bcm2835_obio.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.5.2.4 03-Dec-2017  jdolecek update from HEAD
 1.5.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.2 23-Jun-2013  tls resync from head
 1.5.2.1 25-Feb-2013  tls resync with head
 1.18.4.1 18-May-2014  rmind sync with head
 1.19.2.1 10-Aug-2014  tls Rebase.
 1.20.2.3 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.20.2.2 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.20.2.1 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.22.2.4 28-Aug-2017  skrll Sync with HEAD
 1.22.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.22.2.2 06-Jun-2015  skrll Sync with HEAD
 1.22.2.1 06-Apr-2015  skrll Sync with HEAD
 1.5 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.4 06-Jan-2017  skrll Use the VC property mailbox to request the UART clock rate and use it
appropriately

Newer firmwares use 48MHz
 1.3 29-Jul-2015  skrll branches: 1.3.2;
When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.2 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18; 1.1.20;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.20.2 05-Feb-2017  skrll Sync with HEAD
 1.1.20.1 22-Sep-2015  skrll Sync with HEAD
 1.1.18.1 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_plcom.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.4.1 03-Dec-2017  jdolecek update from HEAD
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_plcom.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.3.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5 20-Dec-2017  skrll G/C
 1.4 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 14-Apr-2013  skrll Trailing whitespace
 1.2 10-Jan-2013  jmcneill bcm2835 watchdog timer support
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.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.1.6.3 23-Jan-2013  yamt sync with head
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_pm.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 25-Feb-2013  tls resync with head
 1.1.2.3 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_pm.c was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.3 20-Dec-2017  skrll G/C
 1.2 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_pmvar.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_pmvar.h was added on branch netbsd-6 on 2012-08-09 06:36:49 +0000
 1.3 10-Jun-2024  mlelstv Add support for poweroff.

There is no circuitry to actually remove power from RPI, but you can reboot
into a low power state. Depending on model/firmware release you need a power
cycle or a GPIO signal to leave the low power state again. Add-on hardware
is usually unaffected.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 10-Dec-2017  skrll branches: 1.1.16;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 10-Dec-2017  skrll branches: 1.3.16;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.2 02-Feb-2016  skrll branches: 1.2.16;
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.1 21-Nov-2015  mlelstv branches: 1.1.2;
Add drivers to access the clock manager and pulse width modulator.
 1.1.2.3 19-Mar-2016  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Nov-2015  skrll file bcm2835_pwm.c was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 02-Feb-2016  jdolecek file bcm2835_pwm.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.3.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 19-Oct-2017  skrll branches: 1.2.2;
Fix RCSIds
 1.1 21-Nov-2015  mlelstv branches: 1.1.2;
Add drivers to access the clock manager and pulse width modulator.
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Nov-2015  skrll file bcm2835_pwm.h was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 19-Oct-2017  jdolecek file bcm2835_pwm.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.17 19-Mar-2022  riastradh rnd(9): Omit needless locks in various HWRNG drivers.

Now that the rnd(9) API guarantees serial callbacks, we can simplify
everything a bit more.

(Some drivers like hifn(4) and sun8icrypto(4) still use locks to
coordinate with other parts of the driver to submit requests to and
process responses from the device.)
 1.16 19-Mar-2022  riastradh rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
 1.15 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.14 30-Apr-2020  riastradh branches: 1.14.2;
rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.13 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.12 17-Dec-2016  riastradh Simplify bcm2835, tegra, and am335x hardware RNG drivers.

Tested by nick@.
 1.11 13-Apr-2015  riastradh branches: 1.11.2;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.10 10-Aug-2014  tls branches: 1.10.4;
Merge tls-earlyentropy branch into HEAD.
 1.9 29-Aug-2013  riastradh branches: 1.9.2; 1.9.4;
Make the rpi hwrng feed data to the entropy pool in a softint.

The two-lock scheme here is excessive but will do provisionally until
rnd(9) gets disentangled.

Tested by Aymeric Vincent.
 1.8 28-Aug-2013  riastradh Get some entropy early on bcm2835_rng attach.
 1.7 25-Aug-2013  tls Fix return with mutex held bug in get routine -- thanks Jared.
 1.6 01-Aug-2013  skrll Whitespace.
 1.5 01-Aug-2013  skrll Remove printf
 1.4 13-Jun-2013  tls branches: 1.4.2;
Convert the entropy pool framework from pseudo-callout-driven to
soft interrupt driven operation.

Add a polling mode of operation -- now we can ask hardware random number
generators to top us up just when we need it (bcm2835_rng and amdpm
converted as examples).

Fix a stall noticed with repeated reads from /dev/random while testing.
 1.3 01-Feb-2013  skrll branches: 1.3.2; 1.3.6;
Use bus_space_read_multi_4 and fix copyright year. From Jared.
 1.2 30-Jan-2013  jmcneill discard initial numbers from rng, broadcom says they are "less random"
 1.1 25-Jan-2013  jmcneill Add BCM2835 RNG support.
 1.3.6.5 03-Dec-2017  jdolecek update from HEAD
 1.3.6.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.3 23-Jun-2013  tls resync from head
 1.3.6.2 25-Feb-2013  tls resync with head
 1.3.6.1 01-Feb-2013  tls file bcm2835_rng.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.3.2.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.3.2.1 01-Feb-2013  riz file bcm2835_rng.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 28-Aug-2013  rmind sync with head
 1.9.4.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.9.4.1 29-Aug-2013  yamt file bcm2835_rng.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.9.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.10.4.2 05-Feb-2017  skrll Sync with HEAD
 1.10.4.1 06-Jun-2015  skrll Sync with HEAD
 1.11.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.14.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 01-Dec-2020  rin Data written to bcmdmac(4) should be in little-endian.
 1.5 31-May-2020  thorpej branches: 1.5.2;
Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.4 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 16-Aug-2017  jmcneill branches: 1.3.2; 1.3.4;
Disable sdhost instead of sdhc for non-wifibt boards.
 1.2 30-Jul-2017  jmcneill Cleanup debug messages
 1.1 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 16-Aug-2017  jdolecek file bcm2835_sdhost.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 16-Aug-2017  skrll file bcm2835_sdhost.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.5.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.5.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.8.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.15 22-Jan-2018  skrll branches: 1.15.2;
Pass PMAP_WRITE_COMBINE as appropriate in bcm283x_bs_map.

RPI2 FB console now updates properly again
 1.14 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.13 28-Nov-2017  skrll Sync with armv7_generic_space.c

- BE support (probably not needed)
- a4x subreagion/mmap support
- fix some a4x stream methods
- add UVM_KMF_COLORMATCH in bs_map when allocating KVA
- support BUS_SPACE_MAP_PREFETCHABLE
 1.12 27-Nov-2017  skrll KNF
 1.11 09-Nov-2017  skrll Trailing whitespace
 1.10 02-Feb-2016  skrll branches: 1.10.10;
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.9 19-Dec-2015  skrll Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
 1.8 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.7 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.6 14-Apr-2013  skrll branches: 1.6.10; 1.6.12;
Trailing whitespace
 1.5 26-Jan-2013  skrll Deal with bus addresses better. Switch the DMA bus address base to the
cache coherent range - not that anything uses it yet.
 1.4 23-Jan-2013  macallan support BUS_SPACE_MAP_PREFETCHABLE in bcm2835_bs_mmap()
 1.3 13-Jan-2013  skrll Simplify by using PMAP_NOCACHE
 1.2 10-Jan-2013  jmcneill basic mmap support, ok skrll
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.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.1.6.3 23-Jan-2013  yamt sync with head
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_space.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.4.3 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 25-Feb-2013  tls resync with head
 1.1.2.3 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_space.c was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.6.12.3 19-Mar-2016  skrll Sync with HEAD
 1.6.12.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.12.1 06-Apr-2015  skrll Sync with HEAD
 1.6.10.4 03-Jan-2018  snj Pull up following revision(s) (requested by skrll in ticket #1532):
sys/arch/arm/broadcom/bcm2835_space.c: 1.12-1.13
KNF
--
Sync with armv7_generic_space.c
- BE support (probably not needed)
- a4x subreagion/mmap support
- fix some a4x stream methods
- add UVM_KMF_COLORMATCH in bs_map when allocating KVA
- support BUS_SPACE_MAP_PREFETCHABLE
 1.6.10.3 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.6.10.2 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.6.10.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.10.10.1 16-Jan-2018  martin Pull up the following revisions, requested by skrll in #408:

sys/arch/arm/broadcom/bcm2835_space.c 1.12-1.13

Sync with armv7_generic_space.c
- big endian support (probably not needed)
- a4x subreagion/mmap support
- fix some a4x stream methods
- add UVM_KMF_COLORMATCH in bs_map when allocating KVA
- support BUS_SPACE_MAP_PREFETCHABLE
 1.15.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.14 10-Sep-2025  thorpej Encapsulate what's needed to attach a SPI bus into a spibus_attach()
inline.
 1.13 03-Sep-2023  tnn bcm2835_spi: guard against too large clock divider and clamp if necessary
 1.12 07-May-2022  skrll Remove unnecessary gotos and label. Same code before and after.
 1.11 07-Aug-2021  thorpej branches: 1.11.2;
Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.2; 1.10.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.9 29-Jan-2021  skrll branches: 1.9.2;
fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 04-Aug-2020  kardel branches: 1.7.2;
Use mutex for lwp/interrupt coordination. using splX() simply does not work
on multiprocessor systems.

fixes PR kern/55506
 1.6 13-Aug-2019  tnn ensure spibus_attach_args is zero'ed
 1.5 10-Dec-2017  skrll branches: 1.5.4; 1.5.8;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.4 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.3 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.2 07-Oct-2014  skrll branches: 1.2.2;
IPL_BIO -> IPL_VM

No functional change. No code change... It's the same thing!
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.8;
Add driver for BCM2835 SPI0 controller.
 1.1.8.3 03-Dec-2017  jdolecek update from HEAD
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_spi.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_spi.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_spi.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.2.2.1 22-Sep-2015  skrll Sync with HEAD
 1.5.8.1 11-Aug-2020  martin Pull up following revision(s) (requested by 1043):

sys/dev/spi/spivar.h: revision 1.10
sys/arch/arm/broadcom/bcm2835_spi.c: revision 1.7
sys/dev/spi/spi.c: revision 1.15

Use mutex for lwp/interrupt coordination. using splX() simply does not work
on multiprocessor systems.

fixes PR kern/55506
 1.5.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9.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.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.10.2.1 18-May-2021  thorpej Pass the controller devhandle along to the "spi" instance.
 1.11.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.1 05-Jan-2013  jakllsch branches: 1.1.2; 1.1.4; 1.1.8;
Add driver for BCM2835 SPI0 controller.
 1.1.8.2 25-Feb-2013  tls resync with head
 1.1.8.1 05-Jan-2013  tls file bcm2835_spireg.h was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000
 1.1.4.2 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.4.1 05-Jan-2013  riz file bcm2835_spireg.h was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000
 1.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 05-Jan-2013  yamt file bcm2835_spireg.h was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.12 29-Jan-2021  skrll fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 07-Jun-2019  skrll branches: 1.10.10;
Whitespace
 1.9 10-Dec-2017  skrll branches: 1.9.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.8 21-Sep-2017  skrll spaces to tabs
 1.7 29-Jul-2015  skrll When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish
 1.6 29-Jul-2015  skrll Expand the bcm2835_intr_establish inline.

No functional change.
 1.5 17-Dec-2014  skrll Wrap a long line.
 1.4 16-Dec-2014  nat Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi. This fixes audio playback.

Addresses PR 48805.

This commit was approved by skrll@
 1.3 08-Jan-2013  skrll branches: 1.3.12; 1.3.14;
Trailing whitespace
 1.2 21-Nov-2012  skrll Fix delay.
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.6.4 23-Jan-2013  yamt sync with head
 1.1.6.3 16-Jan-2013  yamt sync with (a bit old) head
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835_tmr.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.4.2 03-Dec-2017  jdolecek update from HEAD
 1.1.4.1 25-Feb-2013  tls resync with head
 1.1.2.5 21-Dec-2014  msaitoh Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi. This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@
 1.1.2.4 13-Feb-2013  riz branches: 1.1.2.4.2;
Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.3 24-Nov-2012  jdc Pull up revision 1.2 (requested by skrll in ticket #704).

Fix delay.
 1.1.2.2 09-Aug-2012  jdc branches: 1.1.2.2.4;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835_tmr.c was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.1.2.4.2.1 21-Dec-2014  msaitoh Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi. This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@
 1.1.2.2.4.1 21-Dec-2014  msaitoh Pull up following revision(s) (requested by nat in ticket #1214):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi. This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@
 1.3.14.2 22-Sep-2015  skrll Sync with HEAD
 1.3.14.1 06-Apr-2015  skrll Sync with HEAD
 1.3.12.1 17-Dec-2014  martin Pull up following revision(s) (requested by nat in ticket #333):
sys/arch/arm/broadcom/bcm2835_tmr.c: revision 1.4
Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2
are used by the VideoCore on Raspberry Pi. This fixes audio playback.
Addresses PR 48805.
This commit was approved by skrll@
 1.9.4.1 10-Jun-2019  christos Sync with HEAD
 1.10.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.20 16-Feb-2024  skrll Trailing whitespace
 1.19 30-Apr-2023  mlelstv codec translates to 16bit slinear_le, not the internal format.
 1.18 24-Apr-2021  thorpej branches: 1.18.16;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 27-Jan-2021  nia branches: 1.17.2;
vcaudio: Do not report recording mode in hardware format
 1.16 23-Jan-2021  nia vcaudio: don't advertise CAPTURE when all functions return EINVAL
 1.15 22-Jan-2020  mlelstv branches: 1.15.6;
Adapt to changed 64bit vchiq interface.
 1.14 08-May-2019  isaki branches: 1.14.2; 1.14.4;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.13 02-Apr-2019  isaki branches: 1.13.2;
Fix indent.
 1.12 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.11 14-Oct-2016  nat branches: 1.11.14; 1.11.16;
Only run interrupt during playback.

OK skrll@
 1.10 28-Jul-2015  skrll branches: 1.10.2;
Reduce latency a bit. From nat@
 1.9 15-Mar-2015  jmcneill port-arm/49057: Raspberry Pi Audio volume control does not work

AUDS server messages expect volume to be expressed in units of 1/256 dB,
where we previously (incorrectly) treated it as as percentage. Map the
NetBSD audio level (0-255) to 20 steps (levels from FreeBSD bcm2835_audio.c)
and provide independent volume knobs for outputs.auto, outputs.hdmi, and
outputs.headphones.
 1.8 13-Mar-2015  jmcneill port-arm/49057: Raspberry Pi Audio volume control does not work

- Use software volume control for outputs.master/inputs.dac
- Previous volume control (for analog output only) is available on new
outputs.headphones mixer control.
- Add an outputs.select enum to choose between "auto", "headphones", and
"hdmi" outputs.
 1.7 06-Oct-2014  skrll branches: 1.7.2;
Some improvements that make playback mostly reliable for me - the final
piece of the jigaw is probably in vchiq:

- prefill vchiq with a number (currently 2) blocks of audio before
starting

- use a kthread as workqueue isn't suited to our usage.

- don't drain on stopping as for some reason it leaves data behind.
 1.6 02-Sep-2014  jmcneill capture peer version; if less than 2, bail out as bulk mode is not supported. report the peer version with "audioctl version"
 1.5 02-Sep-2014  jmcneill improved playback error handling, and get rid of junk+silence insertion at the beginning of playback
 1.4 02-Sep-2014  jmcneill use a fixed frequency (48kHz) and configure the audio server at attach time, instead of at the beginning of playback
 1.3 05-May-2014  skrll branches: 1.3.2; 1.3.4;
Improve locking and kcondvar usage.

The "interrupt" lock doesn't need to be a spin mutex as the vchi
completions we're synchronising with are done in thread context.

Don't share the interrupt lock for the msg_sync done synchronisation.
 1.2 14-Apr-2013  skrll branches: 1.2.4; 1.2.6; 1.2.10;
Trailing whitespace
 1.1 24-Mar-2013  jmcneill add wip videocore4 audio driver
 1.2.10.1 10-Aug-2014  tls Rebase.
 1.2.6.1 18-May-2014  rmind sync with head
 1.2.4.4 03-Dec-2017  jdolecek update from HEAD
 1.2.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 23-Jun-2013  tls resync from head
 1.2.4.1 14-Apr-2013  tls file bcm2835_vcaudio.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.3.4.2 15-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #594):
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.8, 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.25
port-arm/49057: Raspberry Pi Audio volume control does not work
- Use software volume control for outputs.master/inputs.dac
- Previous volume control (for analog output only) is available on new
outputs.headphones mixer control.
- Add an outputs.select enum to choose between "auto", "headphones", and
"hdmi" outputs.
--
port-arm/49057: Raspberry Pi Audio volume control does not work
AUDS server messages expect volume to be expressed in units of 1/256 dB,
where we previously (incorrectly) treated it as as percentage. Map the
NetBSD audio level (0-255) to 20 steps (levels from FreeBSD bcm2835_audio.c)
and provide independent volume knobs for outputs.auto, outputs.hdmi, and
outputs.headphones.
 1.3.4.1 19-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #151):
sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.7
use a fixed frequency (48kHz) and configure the audio server at attach time, instead of at the beginning of playback
improved playback error handling, and get rid of junk+silence insertion at the beginning of playback
expose vchi_get_peer_version
capture peer version; if less than 2, bail out as bulk mode is not supported. report the peer version with "audioctl version"
Some improvements that make playback mostly reliable for me - the final
piece of the jigaw is probably in vchiq:
- prefill vchiq with a number (currently 2) blocks of audio before
starting
- use a kthread as workqueue isn't suited to our usage.
- don't drain on stopping as for some reason it leaves data behind.
 1.3.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.3.2.1 05-May-2014  yamt file bcm2835_vcaudio.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.7.2.3 05-Dec-2016  skrll Sync with HEAD
 1.7.2.2 22-Sep-2015  skrll Sync with HEAD
 1.7.2.1 06-Apr-2015  skrll Sync with HEAD
 1.10.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.11.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.16.1 10-Jun-2019  christos Sync with HEAD
 1.11.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.13.2.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.13.2.1 21-Apr-2019  isaki Adapt to audio2.
 1.14.4.1 25-Jan-2020  ad Sync with head.
 1.14.2.1 25-Jan-2021  martin Pull up following revision(s) (requested by nia in ticket #1188):

sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.16

vcaudio: don't advertise CAPTURE when all functions return EINVAL
 1.15.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.17.2.1 24-Mar-2021  thorpej Don't filter interface attributes in rescan functions for devices that
carry only a single interface attribute. The autoconfiguration machinery
already considers interface attributes when searching for possible parents.
 1.18.16.1 16-Feb-2024  skrll Trailing whitespace
 1.4 22-Jan-2020  mlelstv Adapt to changed 64bit vchiq interface.
 1.3 25-Apr-2014  skrll branches: 1.3.2; 1.3.30; 1.3.36;
Whitespace.
 1.2 14-Apr-2013  skrll branches: 1.2.4; 1.2.6; 1.2.10;
Trailing whitespace
 1.1 24-Mar-2013  jmcneill add wip videocore4 audio driver
 1.2.10.1 10-Aug-2014  tls Rebase.
 1.2.6.1 18-May-2014  rmind sync with head
 1.2.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 23-Jun-2013  tls resync from head
 1.2.4.1 14-Apr-2013  tls file bcm2835_vcaudioreg.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.3.36.1 25-Jan-2020  ad Sync with head.
 1.3.30.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.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.3.2.1 25-Apr-2014  yamt file bcm2835_vcaudioreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.33 06-Oct-2024  andvar Fix couple of typos in comments.
 1.32 08-Mar-2021  mlelstv branches: 1.32.24;
Add comments for 2711 local peripherals
 1.31 08-Mar-2021  mlelstv Move interrupt register definitions to driver.
 1.30 22-Feb-2020  jmcneill branches: 1.30.6;
Translate bus addresses for SCB on BCM2711
 1.29 30-Dec-2019  skrll branches: 1.29.2;
Fix up ARM_LOCAL for 2711 so that it works now.
 1.28 26-Dec-2019  skrll Use PIC_IRQBASE_ALLOC for all pic_add calls and track/use each cpu irqbase
 1.27 26-Dec-2019  skrll Use PIC_IRQBASE_ALLOC and allow conditional attachment of interrupt
handlers (for RPI4)

(missing from previous commit)
 1.26 24-Dec-2019  skrll We follow linux mainline and they're using 2711 and not 2838 for RPI4
 1.25 25-Sep-2019  skrll Add BCM2838_{PERIPHERALS,ARM_LOCAL}_BASE and support macros
 1.24 25-Sep-2019  skrll s/2835/283X/ in BCM2835_PERIPHERALS_BASE_BUS and BCM2835_PERIPHERALS_SIZE
to show they cover all of 283[5678]

NFCI
 1.23 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.22 01-Apr-2018  ryo branches: 1.22.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.21 10-Dec-2017  skrll branches: 1.21.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.20 30-Jul-2017  jmcneill Add support for BCM2835 AUX UART.
 1.19 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.18 02-Feb-2016  skrll Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.17 17-Dec-2015  skrll Provide all the BCM2836_INT_CNT*_CPUN helper macros

No functional change.
 1.16 21-Nov-2015  mlelstv Add drivers to access the clock manager and pulse width modulator.
 1.15 12-Apr-2015  skrll RPI2 MP support.

Thanks to Matt Thomas for making this possible with his changes to pic.c
 1.14 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.13 03-Feb-2015  skrll Use the www.raspberrypi.org URL for the datasheet
 1.12 12-Sep-2014  jakllsch branches: 1.12.2;
Add BCM2835_PERIPHERALS_TO_BUS() macro to convert ARM physical address to
VideoCore bus address, needed when programing the DMA engine with hardware
FIFO register addresses.
 1.11 07-Sep-2014  jmcneill add DMA0 int
 1.10 26-Jan-2013  jmcneill branches: 1.10.12;
add vchiq base and size
 1.9 26-Jan-2013  skrll Deal with bus addresses better. Switch the DMA bus address base to the
cache coherent range - not that anything uses it yet.
 1.8 25-Jan-2013  jmcneill Add BCM2835 RNG support.
 1.7 08-Jan-2013  skrll Fix BCM2835_USB_SIZE.
 1.6 05-Jan-2013  jakllsch The BSC (I²C) interrupt is actually shared between (at least) the BSC0 and
BSC1 units, so don't name it as belonging to only BSC0.
 1.5 20-Nov-2012  skrll Trailing whitespace.
 1.4 20-Nov-2012  skrll Define BCM2835_USB_SIZE
 1.3 26-Aug-2012  jakllsch branches: 1.3.2; 1.3.4;
Add some more peripheral base addresses, mapping sizes, and interrupt bits.
 1.2 20-Aug-2012  skrll First pass at a VC mailbox driver.
 1.1 26-Jul-2012  skrll branches: 1.1.2;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.2.4 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.3 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835reg.h was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.3.4.5 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.4 23-Jan-2013  yamt sync with head
 1.3.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.3.4.2 30-Oct-2012  yamt sync with head
 1.3.4.1 26-Aug-2012  yamt file bcm2835reg.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 25-Feb-2013  tls resync with head
 1.10.12.5 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.10.12.4 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.10.12.3 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.10.12.2 03-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.
 1.10.12.1 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.12.2.5 28-Aug-2017  skrll Sync with HEAD
 1.12.2.4 19-Mar-2016  skrll Sync with HEAD
 1.12.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.12.2.2 06-Jun-2015  skrll Sync with HEAD
 1.12.2.1 06-Apr-2015  skrll Sync with HEAD
 1.21.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.21.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.22.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.2.1 10-Jun-2019  christos Sync with HEAD
 1.29.2.1 29-Feb-2020  ad Sync with head.
 1.30.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32.24.1 02-Aug-2025  perseant Sync with HEAD
 1.5 30-Dec-2019  skrll Add emmc2 clock goop from mlelstv@
 1.4 01-Apr-2018  ryo branches: 1.4.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.3 10-Dec-2017  skrll branches: 1.3.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.2 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18; 1.1.20;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.20.1 06-Apr-2015  skrll Sync with HEAD
 1.1.18.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm2835var.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.4.1 03-Dec-2017  jdolecek update from HEAD
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm2835var.h was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.3.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.4.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4 25-Sep-2025  jmcneill bcm283x: add SDHC_FLAG_NO_PWR0 quirk

Add SDHC_FLAG_NO_PWR0 quirk to restore previous behaviour with
SDHC_FLAG_32BIT_ACCESS flag.
 1.3 06-Feb-2022  jmcneill sdhc: Retire SDHC_FLAG_USE_ADMA2 flag.

ADMA2 support in sdhc is mature now, so no need for it to be opt-in.
 1.2 08-Aug-2021  jmcneill disable DMA for now...
 1.1 08-Aug-2021  jmcneill bcm2838: Add ACPI support for the EMMC2 SDHCI controller.
 1.10 03-Jan-2025  skrll whitespace
 1.9 31-Dec-2024  skrll Whitespace. (mainly spaces to tabs)
 1.8 30-Dec-2024  skrll KNF
 1.7 16-Feb-2024  skrll branches: 1.7.2;
Trailing whitespace
 1.6 15-Oct-2022  jmcneill branches: 1.6.2;
Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 12-May-2021  thorpej branches: 1.4.4;
Pass along our device handle to the PCI bus instance we attach.
 1.3 03-May-2021  tnn branches: 1.3.2;
bcm2838_pcie: match brcm,bcm2711-pcie
 1.2 24-Apr-2021  thorpej branches: 1.2.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.1 08-Mar-2021  mlelstv branches: 1.1.2; 1.1.4;
RPI4 PCIe driver, based on pcihost_fdt.c
 1.1.4.2 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.1 08-Mar-2021  thorpej file bcm2838_pcie.c was added on branch thorpej-futex on 2021-04-03 22:28:16 +0000
 1.1.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.2.2.1 13-May-2021  thorpej Sync with HEAD.
 1.3.2.1 31-May-2021  cjep sync with head
 1.4.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6.2.1 16-Feb-2024  skrll Trailing whitespace
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 08-Mar-2021  mlelstv branches: 1.1.4;
RPI4 PCIe driver, based on pcihost_fdt.c
 1.1.4.2 03-Apr-2021  thorpej Sync with HEAD.
 1.1.4.1 08-Mar-2021  thorpej file bcm2838_pcie.h was added on branch thorpej-futex on 2021-04-03 22:28:16 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 01-Sep-2019  mlelstv branches: 1.1.8; 1.1.10;
Attachment for RNG200
 1.1.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.8.1 01-Sep-2019  martin file bcm2838_rng.c was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.52 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.51 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.50 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.49 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.48 24-Apr-2021  thorpej 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.47 04-Feb-2021  thorpej branches: 1.47.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.46 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.45 01-Dec-2020  rin Data written to and read from bcm283x UART registers should be in little-endian.
 1.44 01-Dec-2020  rin Data written to and read from bcmmbox(4) should be in little-endian.
 1.43 23-Nov-2020  rin Support EARLYCONS and VERBOSE_INIT_ARM for Raspberry Pi Zero W, for
which mini UART should be used instead of PL011 UART.
 1.42 23-Nov-2020  rin Factor out bcm283x_aux_platform_early_putchar() from
bcm{2837,2711}_platform_early_putchar(), for which output goes to
AUX UART (aka mini UART).

No functional changes.
 1.41 28-Sep-2020  jmcneill branches: 1.41.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.40 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.39 26-Jun-2020  skrll Avoid large stack usage with kmem_alloc - we're in device_register so
there is no problem doing this.
 1.38 21-Jun-2020  skrll Update to new proplib api
 1.37 22-Feb-2020  jmcneill Add support for Broadcom GENET v5 ethernet controller as found on the
Raspberry Pi 4 (BCM2711).
 1.36 22-Feb-2020  jmcneill Translate bus addresses for SCB on BCM2711
 1.35 20-Feb-2020  jmcneill Remove custom bus dma tag handling.
 1.34 01-Jan-2020  skrll branches: 1.34.2;
Provide a single generic bcm283x_platform_uart_freq which checks for
"brcm,bcm2835-aux-uart" and returns the appropriate core clock based
results; otherwise it returns the uart clock from firmware.

Should fix early console output on the rpi0w.

Based on a diff from mlelstv
 1.33 01-Jan-2020  skrll The DMA range doesn't cover all of memory on the bcm2711 (rpi4) - it
covers (most of) the first 1GB.
 1.32 31-Dec-2019  skrll Add another cache invalidation before reading memory for firmware query
results.
 1.31 30-Dec-2019  skrll Fix up ARM_LOCAL for 2711 so that it works now.
 1.30 30-Dec-2019  skrll Invalidate the cache just before trying to read the results from the
firmware as RPI4 A72s can fill the cache with speculation
 1.29 30-Dec-2019  skrll Add emmc2 clock goop from mlelstv@
 1.28 24-Dec-2019  skrll We follow linux mainline and they're using 2711 and not 2838 for RPI4
 1.27 22-Dec-2019  skrll Add brcm,bcm2711 as an alias for brcm,bcm2838
 1.26 28-Sep-2019  skrll Fix build on SOC_BCM2835 kernels
 1.25 27-Sep-2019  skrll BCM2838 (RPI4) support.

Based on a diff from mlelstv
 1.24 25-Sep-2019  skrll s/2835/283X/ in BCM2835_PERIPHERALS_BASE_BUS and BCM2835_PERIPHERALS_SIZE
to show they cover all of 283[5678]

NFCI
 1.23 03-Jan-2019  jmcneill branches: 1.23.4;
Add a link set for cpu enable methods.
 1.22 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.21 20-Oct-2018  ryo - fix AP spinup on bcm283x
- "brcm,bcm2836-smp" is a enable-method for only 32bit bcm2836.
 1.20 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.19 06-Oct-2018  skrll Use __BIT. NFC.
 1.18 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.17 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.16 28-Aug-2018  skrll Fix arm non-MULTIPROCESSOR build for RPI2
 1.15 26-Aug-2018  ryo add support multiple cpu clusters.
* pass cpu index as an argument to secondary processors when hatching.
* keep cpu cache confituration per cpu clusters.

Hello big.LITTLE!
 1.14 25-Aug-2018  rin Set mac-address property to mue(4).
 1.13 21-Aug-2018  rin Correctly report memory size, not clock rate when VERBOSE_INIT_ARM.
 1.12 10-Aug-2018  rin * Convert bus address to physical address in xxx_bs_mmap(), as done in
xxx_bs_map().

* Reuse bs_map and bs_mmap in arm_generic_bs_tag in order to
- set pmap flags properly for aarch64
- dedup codes

OK ryo
 1.11 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.10 03-Aug-2018  skrll Provide and use kern_vtopdiff in KERN_{VTOPHYS,PHYSTOV}. A step towards
generic arm.
 1.9 03-Aug-2018  skrll Provide and use a evbarm/fdt/machdep.h
 1.8 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.7 09-Jul-2018  ryo hatch secondary processors (aarch64)
 1.6 27-Jun-2018  ryo branches: 1.6.2;
on evbarm/RPI,RPI2, VERBOSE_INIT_ARM had broken.

XPUTC() of evbarm/rpi/rpi*_start.S uses bcm283[567]_platform_early_putchar() and it requires stack.
fixed to allocate stack when starting from rpi*_start.S and a9_mpsubr.S if needed.

to work XPUTC(), need to define VERBOSE_INIT_ARM and EARLYCONS option.
 1.5 08-Jun-2018  jmcneill Provide bs_mmap implementations for bcm283x based boards.

PR: port-arm/53283
Submitted by: Nick Hudson
 1.4 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.3 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 20-Dec-2017  skrll branches: 1.2.2;
G/C
 1.1 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.2.2.9 18-Jan-2019  pgoyette Synch with HEAD
 1.2.2.8 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.7 20-Oct-2018  pgoyette Sync with head
 1.2.2.6 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.5 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.4 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.3 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.6.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.2.1 10-Jun-2019  christos Sync with HEAD
 1.23.4.1 02-Jan-2020  martin Pull up following revision(s) (requested by skrll in ticket #599):

sys/arch/arm/broadcom/bcm283x_platform.c: revision 1.34 (patch)

Provide a single generic bcm283x_platform_uart_freq which checks for
"brcm,bcm2835-aux-uart" and returns the appropriate core clock based
results; otherwise it returns the uart clock from firmware.

Should fix early console output on the rpi0w.

Based on a diff from mlelstv
 1.34.2.1 29-Feb-2020  ad Sync with head.
 1.41.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.41.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.47.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.5 30-Dec-2019  skrll Fix up ARM_LOCAL for 2711 so that it works now.
 1.4 24-Dec-2019  skrll We follow linux mainline and they're using 2711 and not 2838 for RPI4
 1.3 27-Sep-2019  skrll BCM2838 (RPI4) support.

Based on a diff from mlelstv
 1.2 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.1 01-Apr-2018  ryo branches: 1.1.2; 1.1.4;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 01-Apr-2018  pgoyette file bcm283x_platform.h was added on branch pgoyette-compat on 2018-04-07 04:12:11 +0000
 1.28 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.27 16-Feb-2024  skrll Retire BCM53XX_CONSOLE_EARLY in favour of EARLYCONS
 1.26 16-Feb-2024  skrll Trailing whitespace
 1.25 31-Jul-2018  skrll branches: 1.25.30;
Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.24 05-Jun-2018  hkenken branches: 1.24.2;
Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.23 20-Oct-2016  skrll branches: 1.23.14;
Fix regisers typo
 1.22 14-Sep-2014  skrll branches: 1.22.2; 1.22.4;
Typo
 1.21 26-Mar-2014  matt Allow SRAB to be optional.
 1.20 19-Feb-2014  matt fix typo.
 1.19 19-Feb-2014  matt Fix coherent range for BCM563XX
 1.18 19-Feb-2014  matt Conditionalize call to arml2cc_init
 1.17 28-Oct-2013  matt branches: 1.17.2;
Add support for the BCM56340 iProc based switch
 1.16 29-Aug-2013  riz Fix typo: VERBOSE_INIT_ARM, not VERBOSE_ARM_INIT. From
Dennis Ferguson in PR#48163.
 1.15 19-Feb-2013  matt branches: 1.15.2;
Use the coherent dma_ranges in the bounce dmatag but only use the first one.
 1.14 19-Feb-2013  matt Add a bounce dmatag which only has the coherent memory region.
The coherent dmatag now always has all of memory (both coherent and normal
memory).
 1.13 13-Feb-2013  matt Fix two fencepoint errors.
 1.12 12-Feb-2013  matt fix inverted ifdefs
 1.11 08-Feb-2013  matt Properly deal with the non-coherent dma tag too.
 1.10 08-Feb-2013  matt If _ARM32_NEED_BUS_DMA_BOUNCE is defined, only define one dma_range
for the coherent dma tag.
 1.9 10-Jan-2013  matt Use the clk_info in cpu_softc.
 1.8 21-Oct-2012  matt branches: 1.8.2; 1.8.4;
Use static initializer for bus dma tag initialization
 1.7 18-Oct-2012  matt Rearrange some code.
 1.6 17-Oct-2012  matt Add a coherent bus dma tag which marks the first 256MB as having coherent
dma (but only for PCIe and ethernet). Make the ethernet and PCIe attachments
use this tag instead of the default non-coherent one.
 1.5 07-Oct-2012  matt Add bcm53xx_dma_bootstrap which, if there is more than 256MB of RAM, add two
ranges to the default dma tag. This has the side effect of making most initial
bus_dmamem_allocs trying to get memory from the first 256MB which is coherent
on this platform.
 1.4 03-Oct-2012  matt Add code to init the SRAB (the switch robot). Don't configure eth3 by default.
 1.3 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.2 07-Sep-2012  matt branches: 1.2.2;
Include the PCI outbound windows in the BCM53XX IO space.
Call arml2cc_init from bcm53xx_bootstrap to fill in arm_cache info.
 1.1 01-Sep-2012  matt Add initial device support for the Broadcom BCM5301x family.
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 25-Feb-2013  tls resync with head
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.4.6 19-Feb-2013  matt Sync with HEAD.
 1.8.4.5 19-Feb-2013  matt Sync with HEAD.
 1.8.4.4 13-Feb-2013  matt Sync with HEAD
 1.8.4.3 07-Feb-2013  matt Sync bcm53xx support to HEAD.
 1.8.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.8.4.1 21-Oct-2012  matt file bcm53xx_board.c was added on branch matt-nb6-plus on 2012-11-28 22:40:21 +0000
 1.8.2.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.8.2.3 23-Jan-2013  yamt sync with head
 1.8.2.2 30-Oct-2012  yamt sync with head
 1.8.2.1 21-Oct-2012  yamt file bcm53xx_board.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.15.2.1 18-May-2014  rmind sync with head
 1.17.2.4 26-Mar-2014  matt Allow SRAB to be optional
 1.17.2.3 19-Feb-2014  matt Fix dmaranges for BCM563XX
Conditionalize call to arml2cc_init
 1.17.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.17.2.1 28-Oct-2013  matt file bcm53xx_board.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.22.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.22.2.1 05-Dec-2016  skrll Sync with HEAD
 1.23.14.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.23.14.1 25-Jun-2018  pgoyette Sync with HEAD
 1.24.2.1 10-Jun-2019  christos Sync with HEAD
 1.25.30.1 16-Feb-2024  skrll Trailing whitespace
 1.6 16-Feb-2024  skrll Trailing whitespace
 1.5 03-Mar-2022  riastradh branches: 1.5.4;
arm: Use device_set_private for various drivers.
 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 08-Dec-2018  thorpej branches: 1.2.14;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.1 01-Sep-2012  matt branches: 1.1.4; 1.1.6; 1.1.16; 1.1.44; 1.1.46;
Add initial device support for the Broadcom BCM5301x family.
 1.1.46.1 10-Jun-2019  christos Sync with HEAD
 1.1.44.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.16.4 26-Mar-2014  matt Only 5301X has GPIO via CCA
 1.1.16.3 26-Mar-2014  matt For non-BCM5301X, set frequency to 1/4 of the apb clock.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file bcm53xx_cca.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcm53xx_cca.c was added on branch matt-nb6-plus on 2012-11-28 22:40:21 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcm53xx_cca.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.2.14.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.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5.4.1 16-Feb-2024  skrll Trailing whitespace
 1.9 03-Mar-2022  riastradh arm: Use device_set_private for various drivers.
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 26-Mar-2014  matt branches: 1.6.44;
Allow SRAB to be optional.
 1.5 17-Dec-2013  joerg branches: 1.5.2;
Mark bcmrng_write_4, bcmccb_write_4 and bcmccb_read_4 as unused
 1.4 28-Oct-2013  matt Add support for the BCM56340 iProc based switch
 1.3 03-Oct-2012  matt branches: 1.3.2; 1.3.4; 1.3.6;
Add code to init the SRAB (the switch robot). Don't configure eth3 by default.
 1.2 22-Sep-2012  matt PCIE each have 6 interrupts
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.6.1 18-May-2014  rmind sync with head
 1.3.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.4.1 03-Oct-2012  matt file bcm53xx_ccb.c was added on branch matt-nb6-plus on 2012-11-28 22:40:22 +0000
 1.3.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.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 03-Oct-2012  yamt file bcm53xx_ccb.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.5.2.3 26-Mar-2014  matt Allow SRAB to be optional
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 17-Dec-2013  matt file bcm53xx_ccb.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.6.44.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.6.44.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.6.44.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.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.47 26-Oct-2025  andvar s/creat /create/ in few more comments and error log messages.
 1.46 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.45 04-Dec-2024  andvar s/transmite/transmitte/ in comments.
 1.44 16-Feb-2024  skrll branches: 1.44.2;
Test sc->sc_soft_ih (not sc->sc_ih) to see if the soft interrupt got
established correctly.

From Mori Hiroki.

Fix some error recovery while I'm here.
 1.43 16-Feb-2024  skrll Fix non-DIAGNOSTIC build
 1.42 17-Sep-2022  thorpej branches: 1.42.4;
Eliminate use of IFF_OACTIVE.
 1.41 16-Jun-2021  riastradh if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
 1.40 03-Feb-2020  skrll branches: 1.40.10;
Adopt <net/if_stats.h>
 1.39 30-Oct-2019  msaitoh branches: 1.39.2;
ether_input() automatically add input bytes to if_ibytes, so it's not
required to do in the driver who use ether_input().
 1.38 29-May-2019  msaitoh branches: 1.38.2;
Remove unused variable.
 1.37 29-May-2019  msaitoh Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.36 29-May-2019  msaitoh KNF. No functional change.
 1.35 26-Apr-2019  msaitoh No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.34 08-Mar-2019  msaitoh s/ the the / the /
 1.33 22-Dec-2018  maxv Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.
 1.32 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.31 26-Jun-2018  msaitoh branches: 1.31.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.30 23-Oct-2017  msaitoh branches: 1.30.2;
If error occured in bcmeth_ccb_attach(), free resources and return.
 1.29 15-Dec-2016  ozaki-r branches: 1.29.8;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.28 10-Jun-2016  ozaki-r branches: 1.28.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.26 23-Feb-2014  matt branches: 1.26.6;
#include <arm/locore.h>
 1.25 28-Oct-2013  matt branches: 1.25.2;
Add support for the BCM56340 iProc based switch
 1.24 19-Feb-2013  matt branches: 1.24.2;
As with pax, use cf_flags 2 to indicate to use the bounce dma tag.
 1.23 19-Jan-2013  matt Remove a KASSERT that is no longer valid (no restricted to only coherent
memory).
Fix c&p error for a !RCVMAGIC bus_dmamap_sync PREREAD.
 1.22 10-Jan-2013  matt Don't hard code the frequency used for INTRCVLAZY but grab the correct
frequency from the cpu_softc.
 1.21 09-Jan-2013  matt Don't rely on PKTTYPE in the rxsts since it becomes unreliable.
 1.20 25-Dec-2012  matt Change the way rx are consumed. Only consume a 1/4 of the receive buffers
before refilling with new buffers. Don't stop until there are no packets
left to receive.
 1.19 19-Dec-2012  matt Use max_linkhdr to determine what rcvoffset to program.
 1.18 07-Dec-2012  matt Make evcnt'ers optional.
 1.17 08-Nov-2012  matt branches: 1.17.2;
Reduce burstlen for RCV/XMT from 128bits to 96bits.
 1.16 08-Nov-2012  matt Make sure to 0 sc_work_flags in ifstop.
return immediately in ifstart if IFF_RUNNING is not set.
Make RCVMAGIC checks conditional
Release softc lock when calling if_input.
 1.15 01-Nov-2012  matt If IFF_LINK2 is set, copy all transmitted packets into a single mbuf to
avoid DMA corruption problems with chained buffers.
Fix various conditions with setting INTMASK.
 1.14 26-Oct-2012  matt branches: 1.14.2;
When writing intmask from a softint/workqueue thread, make sure to do so
only with the hwlock locked.
 1.13 26-Oct-2012  matt Use atomic_ops to manipulate sc_intmask
 1.12 18-Oct-2012  matt Make an ASSERT more "flexible".
 1.11 17-Oct-2012  matt Add a coherent bus dma tag which marks the first 256MB as having coherent
dma (but only for PCIe and ethernet). Make the ethernet and PCIe attachments
use this tag instead of the default non-coherent one.
 1.10 12-Oct-2012  matt Add some defensive code to deal with "issues" of this interface.
Seems it can't do DMA updates of the rxsts for mbufs with addresses
>= 256MB. It can't also seem to properly read from the descriptor rings
if they are < 256MB. And I have no idea why either should matter.
 1.9 08-Oct-2012  matt Initialize the workqueue to use IPL_NET for its mutex.
Prefer softints if the current lwp is the idle lwp.
 1.8 07-Oct-2012  matt Don't just rely on softints for handling rx traffic since that can starve
the system and eventually cause a watchdog timer to reset. Instead use
softints for "small" number of packets and use a workqueue thread for large
numbers. This allows receive processing to be handling at normal priorities
and won't starve out other parts of the system.
 1.7 06-Oct-2012  matt Always set IC for each receive descriptor.
Make sure to produce rx descriptors even if you stop at the end of the ring.
 1.6 05-Oct-2012  matt Modify setting of PROMISC flag.
 1.5 05-Oct-2012  matt Fix setting of ethernet address.
Don't set HASFCS
 1.4 05-Oct-2012  matt Set IC after clearing flags.
Insert RCVOFFSET correctly.
 1.3 05-Oct-2012  matt Make sure to set IC in receive descritors. Initial ET at end of ring.
Set INTRCVLAZY to collesce 10 packets or 1ms delay.
 1.2 04-Oct-2012  matt Ethernet driver for BCM53XXX (not quite working).
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.4 03-Dec-2017  jdolecek update from HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.5 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.14.2.4 23-Jan-2013  yamt sync with head
 1.14.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.14.2.2 30-Oct-2012  yamt sync with head
 1.14.2.1 26-Oct-2012  yamt file bcm53xx_eth.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.17.2.5 19-Feb-2013  matt Sync with HEAD.
 1.17.2.4 07-Feb-2013  matt Sync bcm53xx support to HEAD.
 1.17.2.3 07-Dec-2012  matt Sync with HEAD.
 1.17.2.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.17.2.1 08-Nov-2012  matt file bcm53xx_eth.c was added on branch matt-nb6-plus on 2012-11-28 22:40:22 +0000
 1.24.2.1 18-May-2014  rmind sync with head
 1.25.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.25.2.1 28-Oct-2013  matt file bcm53xx_eth.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.26.6.3 05-Feb-2017  skrll Sync with HEAD
 1.26.6.2 09-Jul-2016  skrll Sync with HEAD
 1.26.6.1 19-Mar-2016  skrll Sync with HEAD
 1.28.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.29.8.2 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1427):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.29.8.1 10-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
 1.30.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.30.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.30.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.31.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.2.1 10-Jun-2019  christos Sync with HEAD
 1.38.2.1 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #403):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.39.2.1 29-Feb-2020  ad Sync with head.
 1.40.10.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.42.4.2 18-Feb-2024  martin Pull up following revision(s) (requested by skrll in ticket #599):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.44

Test sc->sc_soft_ih (not sc->sc_ih) to see if the soft interrupt got
established correctly.

From Mori Hiroki.

Fix some error recovery while I'm here.
 1.42.4.1 18-Feb-2024  martin Pull up following revision(s) (requested by skrll in ticket #597):

sys/arch/evbarm/conf/std.bcm53xx: revision 1.21
sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.43
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.23

Define KERNEL_VOFFSET_RUNTIME=1 to fix build of BCM5301X and BCM56340

Fix non-DIAGNOSTIC build
 1.44.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 19-Feb-2014  matt #include <sys/param.h>
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Add initial device support for the Broadcom BCM5301x family.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file bcm53xx_i2c.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcm53xx_i2c.c was added on branch matt-nb6-plus on 2012-11-28 22:40:22 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcm53xx_i2c.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 16-Feb-2024  skrll Trailing whitespace
 1.3 12-Dec-2012  matt branches: 1.3.10; 1.3.70;
When initializing the ethernet, make sure the IO_CONTROL_DIRECT IDM register
is set properly.
 1.2 26-Oct-2012  matt branches: 1.2.2; 1.2.4;
For the AMACs, turn off read-allocate/write-allocate when doing DMA.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.3 07-Feb-2013  matt Sync bcm53xx support to HEAD.
 1.2.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.4.1 26-Oct-2012  matt file bcm53xx_idm.c was added on branch matt-nb6-plus on 2012-11-28 22:40:22 +0000
 1.2.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 26-Oct-2012  yamt file bcm53xx_idm.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.3.70.1 16-Feb-2024  skrll Trailing whitespace
 1.3.10.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.10.1 12-Dec-2012  matt file bcm53xx_idm.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2 28-Oct-2013  matt branches: 1.2.2;
Add support for the BCM56340 iProc based switch
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add initial device support for the Broadcom BCM5301x family.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcm53xx_intr.h was added on branch matt-nb6-plus on 2012-11-28 22:40:22 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcm53xx_intr.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.2.1 28-Oct-2013  matt file bcm53xx_intr.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2 19-Feb-2014  matt #include <sys/param.h>
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Add initial device support for the Broadcom BCM5301x family.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file bcm53xx_mdio.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcm53xx_mdio.c was added on branch matt-nb6-plus on 2012-11-28 22:40:23 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcm53xx_mdio.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 19-Feb-2014  matt branches: 1.2.4; 1.2.6; 1.2.10;
#include <sys/param.h>
 1.1 28-Oct-2013  matt branches: 1.1.2;
Add support for the BCM56340 iProc based switch
 1.1.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.2.1 28-Oct-2013  matt file bcm53xx_nand.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 19-Feb-2014  tls file bcm53xx_nand.c was added on branch tls-maxphys on 2014-08-20 00:02:45 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 19-Feb-2014  yamt file bcm53xx_nand.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 19-Feb-2014  rmind file bcm53xx_nand.c was added on branch rmind-smpnet on 2014-05-18 17:44:57 +0000
 1.24 16-Feb-2024  skrll Trailing whitespace
 1.23 16-Feb-2024  skrll Fix non-DIAGNOSTIC build
 1.22 07-Aug-2021  thorpej branches: 1.22.6;
Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.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.20 30-Oct-2020  skrll branches: 1.20.4;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.19 07-Jul-2020  thorpej 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.18 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.17 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.16 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.15 02-Oct-2015  msaitoh branches: 1.15.16; 1.15.18;
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.14 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.13 30-Mar-2014  matt branches: 1.13.4; 1.13.6;
Update to use new pci_intr_string semantics.
 1.12 23-Feb-2014  matt #include <arm/locore.h>
 1.11 19-Feb-2014  matt #include <sys/param.h>
 1.10 21-Apr-2013  msaitoh branches: 1.10.4; 1.10.8;
Delete "PCI_" from PCIX and PICE capability registers.
 1.9 19-Feb-2013  matt Add a bounce dmatag which only has the coherent memory region.
The coherent dmatag now always has all of memory (both coherent and normal
memory).
 1.8 19-Feb-2013  matt Use a bit in cf_flags to decide whether to use bounce buffers or not.
 1.7 17-Oct-2012  matt branches: 1.7.2; 1.7.4;
Add a coherent bus dma tag which marks the first 256MB as having coherent
dma (but only for PCIe and ethernet). Make the ethernet and PCIe attachments
use this tag instead of the default non-coherent one.
 1.6 12-Oct-2012  matt Add a way to force PCI to negotiate gen1 (setting flags 1 in the config file).
 1.5 27-Sep-2012  matt Don't initialize PCIe inbound windows. This avoids the 256MB limitation
on DMAs.
 1.4 22-Sep-2012  matt Add interrupt/iwin/owin / netbsd_configure code.
 1.3 16-Sep-2012  he Be consistent with applying __HAVE_PCI_CONF_HOOK around bcmpax_conf_hook
implementation as well. Fixes build for BCM5301X evbarm kernel.
 1.2 14-Sep-2012  matt Beginnings of PCI support. Interrupts still need to be done.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.5 03-Dec-2017  jdolecek update from HEAD
 1.1.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.3 23-Jun-2013  tls resync from head
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.4.3 19-Feb-2013  matt Sync with HEAD.
 1.7.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.4.1 17-Oct-2012  matt file bcm53xx_pax.c was added on branch matt-nb6-plus on 2012-11-28 22:40:23 +0000
 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-Oct-2012  yamt file bcm53xx_pax.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.10.8.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.10.8.1 21-Apr-2013  matt file bcm53xx_pax.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.10.4.1 18-May-2014  rmind sync with head
 1.13.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.13.6.1 06-Apr-2015  skrll Sync with HEAD
 1.13.4.1 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.15.18.1 10-Jun-2019  christos Sync with HEAD
 1.15.16.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.15.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.21.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.22.6.2 18-Feb-2024  martin Pull up following revision(s) (requested by skrll in ticket #597):

sys/arch/evbarm/conf/std.bcm53xx: revision 1.21
sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.43
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.23

Define KERNEL_VOFFSET_RUNTIME=1 to fix build of BCM5301X and BCM56340

Fix non-DIAGNOSTIC build
 1.22.6.1 16-Feb-2024  skrll Trailing whitespace
 1.20 16-Feb-2024  skrll Trailing whitespace
 1.19 24-Mar-2022  andvar branches: 1.19.4;
s/interupt/interrupt/ in comments.
also add missing RCS ID in bcm53xx_reg.h and fix one more typo in there.
 1.18 18-May-2019  skrll Convert remaining armv7 kernels to generic start and remove a bunch of
code including a9_mpsubr.S.

Thanks to Lwazi Dube for testing PANDABOARD and BEAGLEBONE.
 1.17 16-Sep-2018  skrll interrupt has two 'r's

fix another typo while I'm here (flsah)
 1.16 26-Mar-2014  matt branches: 1.16.28; 1.16.30;
Correct BCM563XX values.
 1.15 26-Mar-2014  matt Be consistent and use #define<space>
 1.14 28-Oct-2013  matt branches: 1.14.2;
Add support for the BCM56340 iProc based switch
 1.13 25-Jan-2013  matt branches: 1.13.2;
Fix a few c&p errors.
 1.12 12-Dec-2012  matt Add IO_CONTROL_DIRECT register values.
 1.11 29-Nov-2012  matt Make sure to bring the ULPI ports out of reset.
 1.10 01-Nov-2012  matt branches: 1.10.2;
Add PCIE_RC_AXI_CONFIG definitions
 1.9 26-Oct-2012  matt branches: 1.9.2;
Add A*CACHE values for AMAC.
 1.8 12-Oct-2012  matt Add a way to force PCI to negotiate gen1 (setting flags 1 in the config file).
 1.7 05-Oct-2012  matt Add fields for GMAC_INTRCVLAZY
 1.6 03-Oct-2012  matt Add code to init the SRAB (the switch robot). Don't configure eth3 by default.
 1.5 22-Sep-2012  matt Add a few more PCIE registers
 1.4 14-Sep-2012  matt Fix CFG_ADDR_REG
 1.3 07-Sep-2012  matt branches: 1.3.2;
Include the PCI outbound windows in the BCM53XX IO space.
Call arml2cc_init from bcm53xx_bootstrap to fill in arm_cache info.
 1.2 05-Sep-2012  matt Fix CFG_IND_ADDR_FUNC definition.
 1.1 01-Sep-2012  matt Add initial device support for the Broadcom BCM5301x family.
 1.3.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.2 25-Feb-2013  tls resync with head
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.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.9.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.9.2.2 30-Oct-2012  yamt sync with head
 1.9.2.1 26-Oct-2012  yamt file bcm53xx_reg.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.10.2.4 07-Feb-2013  matt Sync bcm53xx support to HEAD.
 1.10.2.3 29-Nov-2012  matt Sync with HEAD.
 1.10.2.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.10.2.1 01-Nov-2012  matt file bcm53xx_reg.h was added on branch matt-nb6-plus on 2012-11-28 22:40:23 +0000
 1.13.2.1 18-May-2014  rmind sync with head
 1.14.2.3 26-Mar-2014  matt Sync with HEAD.
 1.14.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.14.2.1 28-Oct-2013  matt file bcm53xx_reg.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.16.30.1 10-Jun-2019  christos Sync with HEAD
 1.16.28.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.19.4.1 16-Feb-2024  skrll Trailing whitespace
 1.10 08-Jan-2017  christos fix typo
 1.9 08-Jan-2017  christos Limit number of words we read..
 1.8 13-Apr-2015  riastradh branches: 1.8.2;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.7 10-Aug-2014  tls branches: 1.7.4;
Merge tls-earlyentropy branch into HEAD.
 1.6 19-Feb-2014  matt branches: 1.6.2;
#include <sys/param.h>
 1.5 17-Dec-2013  joerg branches: 1.5.2;
Mark bcmrng_write_4, bcmccb_write_4 and bcmccb_read_4 as unused
 1.4 01-Feb-2013  matt branches: 1.4.2;
Use bus_space_read_multi_4 to drain the RNG's FIFO.
 1.3 27-Oct-2012  matt branches: 1.3.2; 1.3.4;
Reenable NO_ESTIMATE now that rnd has been fixed.
 1.2 26-Oct-2012  matt For now, until rnd is fixed, don't use NO_ESTIMATE.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.4 03-Dec-2017  jdolecek update from HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.3 07-Feb-2013  matt Sync bcm53xx support to HEAD.
 1.3.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.4.1 27-Oct-2012  matt file bcm53xx_rng.c was added on branch matt-nb6-plus on 2012-11-28 22:40:23 +0000
 1.3.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.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 27-Oct-2012  yamt file bcm53xx_rng.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.4.2.1 18-May-2014  rmind sync with head
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 17-Dec-2013  matt file bcm53xx_rng.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.6.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.7.4.2 05-Feb-2017  skrll Sync with HEAD
 1.7.4.1 06-Jun-2015  skrll Sync with HEAD
 1.8.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2 19-Feb-2014  matt #include <sys/param.h>
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Add initial device support for the Broadcom BCM5301x family.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file bcm53xx_sdhc.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcm53xx_sdhc.c was added on branch matt-nb6-plus on 2012-11-28 22:40:24 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcm53xx_sdhc.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11 03-Jul-2025  andvar s/ochi/ohci and s/echi/ehci/ in few more places (logs, comments, intr desc).
 1.10 07-Aug-2021  thorpej branches: 1.10.12;
Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 09-Apr-2018  jakllsch branches: 1.8.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.7 23-Apr-2016  skrll branches: 1.7.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.6 24-Jun-2014  skrll branches: 1.6.2; 1.6.4; 1.6.8;
If [eo]hci_init fail then bail out and don't try and attach devices.
 1.5 19-Feb-2014  matt branches: 1.5.2;
#include <sys/param.h>
 1.4 28-Oct-2013  matt branches: 1.4.2;
Add support for the BCM56340 iProc based switch
 1.3 29-Nov-2012  matt branches: 1.3.2;
Make sure to bring the ULPI ports out of reset.
 1.2 27-Sep-2012  matt branches: 1.2.2; 1.2.4;
Add vendor name.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.4 03-Dec-2017  jdolecek update from HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.3 29-Nov-2012  matt Sync with HEAD.
 1.2.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.4.1 27-Sep-2012  matt file bcm53xx_usb.c was added on branch matt-nb6-plus on 2012-11-28 22:40:24 +0000
 1.2.2.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.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 27-Sep-2012  yamt file bcm53xx_usb.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.3.2.1 18-May-2014  rmind sync with head
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 28-Oct-2013  matt file bcm53xx_usb.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.6.8.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.6.4.3 12-Feb-2016  skrll Don't check ehci_init against USBD_NORMAL_COMPLETION as it returns int
and not usb_status_t
 1.6.4.2 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.6.4.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.6.2.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.7.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.8.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.10.12.1 02-Aug-2025  perseant Sync with HEAD
 1.7 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.6 28-Oct-2013  matt branches: 1.6.2;
Add support for the BCM56340 iProc based switch
 1.5 19-Feb-2013  matt branches: 1.5.2;
Add a bounce dmatag which only has the coherent memory region.
The coherent dmatag now always has all of memory (both coherent and normal
memory).
 1.4 17-Oct-2012  matt branches: 1.4.2; 1.4.4;
Add a coherent bus dma tag which marks the first 256MB as having coherent
dma (but only for PCIe and ethernet). Make the ethernet and PCIe attachments
use this tag instead of the default non-coherent one.
 1.3 07-Oct-2012  matt Add bcm53xx_dma_bootstrap which, if there is more than 256MB of RAM, add two
ranges to the default dma tag. This has the side effect of making most initial
bus_dmamem_allocs trying to get memory from the first 256MB which is coherent
on this platform.
 1.2 03-Oct-2012  matt Add code to init the SRAB (the switch robot). Don't configure eth3 by default.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.4.3 19-Feb-2013  matt Sync with HEAD.
 1.4.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.4.4.1 17-Oct-2012  matt file bcm53xx_var.h was added on branch matt-nb6-plus on 2012-11-28 22:40:24 +0000
 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-Oct-2012  yamt file bcm53xx_var.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.5.2.1 18-May-2014  rmind sync with head
 1.6.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.2.1 28-Oct-2013  matt file bcm53xx_var.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.1 26-Jul-2012  skrll branches: 1.1.2; 1.1.6;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.6.2 30-Oct-2012  yamt sync with head
 1.1.6.1 26-Jul-2012  yamt file bcm_amba.h was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file bcm_amba.h was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.8 21-Apr-2023  skrll Trailing whitespace
 1.7 30-Oct-2020  skrll Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.6 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.5 25-Feb-2015  joerg branches: 1.5.16;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.4 28-Oct-2013  matt branches: 1.4.2; 1.4.6; 1.4.8;
Add support for the BCM56340 iProc based switch
 1.3 12-Aug-2013  matt add mmap
 1.2 09-Jan-2013  matt branches: 1.2.2;
Handle BUS_SPACE_MAP_PREFETCHABLE like BUS_SPACE_MAP_CACHEABLE.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6;
Add initial device support for the Broadcom BCM5301x family.
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file bcmgen_space.c was added on branch matt-nb6-plus on 2012-11-28 22:40:24 +0000
 1.1.4.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.1.4.3 23-Jan-2013  yamt sync with head
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file bcmgen_space.c was added on branch yamt-pagecache on 2012-10-30 17:18:59 +0000
 1.1.2.3 03-Dec-2017  jdolecek update from HEAD
 1.1.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1 25-Feb-2013  tls resync with head
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 28-Aug-2013  rmind sync with head
 1.4.8.1 06-Apr-2015  skrll Sync with HEAD
 1.4.6.1 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 28-Oct-2013  matt file bcmgen_space.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.5.16.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.45 10-Sep-2025  thorpej Put the fdt_spi attribute on bcmspi @ fdt.

Thx to Andrius V for pointing out the oversight.
 1.44 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.43 22-Apr-2022  skrll Remove stale comment
 1.42 08-Aug-2021  jmcneill broadcom: ACPI: Add support for mini UART in ACPI mode.
 1.41 08-Aug-2021  jmcneill bcm2838: Add ACPI support for the EMMC2 SDHCI controller.
 1.40 10-Mar-2021  mlelstv Add PCIe driver to build.

You still need:

bcm2838pcie* at fdt? # STB PCIe host controller

in kernel config, and DTB entries like:

pci@7d500000 {
compatible = "brcm,bcm2711-pcie\0brcm,pci-plat-dev";
device_type = "pci";
#address-cells = <0x03>;
#size-cells = <0x02>;
bus-range = <0x00 0x01>;
reg = <0x00 0x7d500000 0x80000>;
ranges = <0x2000000 0x00 0xf8000000 0x06 0x00 0x00 0x4000000>;
#interrupt-cells = <0x01>;
interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0x8f 0x04>;
interrupt-map-mask = <0x00 0x00 0x00 0x07>;
linux,pci-domain = <0x00>;
phandle = <0x90>;
};

and
pcie0 = "/scb/pci@7d500000";

in __symbols__
 1.39 31-Mar-2020  jmcneill branches: 1.39.4;
Add ACPI support.
 1.38 31-Dec-2019  jmcneill acpi glue is conditional on acpinodebus
 1.37 30-Dec-2019  jmcneill Add BCM2835 EMMC acpi glue
 1.36 30-Dec-2019  jmcneill Split bcm2835 mbox driver into separate fdt and acpi frontends.
 1.35 04-Sep-2019  mlelstv RNG200 attachment
 1.34 22-Jun-2019  skrll Rename watchdog -> bcmpmwdog and sdhost to bcmsdhost
 1.33 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.32 18-Oct-2018  skrll branches: 1.32.2;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.31 01-Apr-2018  ryo branches: 1.31.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.30 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.29 10-Dec-2017  skrll branches: 1.29.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.28 30-Jul-2017  jmcneill Add support for BCM2835 AUX UART.
 1.27 30-Jul-2017  jmcneill Add driver for the bcm2835 internal SD controller. On boards with SDIO
Wi-Fi, the internal SD controller is used for the SD card slot and the
Arasan SDHCI controller is used for SDIO.
 1.26 21-Nov-2015  mlelstv Add drivers to access the clock manager and pulse width modulator.
 1.25 13-Mar-2015  jmcneill port-arm/49057: Raspberry Pi Audio volume control does not work

- Use software volume control for outputs.master/inputs.dac
- Previous volume control (for analog output only) is available on new
outputs.headphones mixer control.
- Add an outputs.select enum to choose between "auto", "headphones", and
"hdmi" outputs.
 1.24 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.23 13-Sep-2014  skrll branches: 1.23.2;
Make emmc use of dma controller optional and disable the bcmdmac for now.

It doesn't work for me.
 1.22 07-Sep-2014  jmcneill bcm2835 dma controller driver
 1.21 22-Apr-2014  kardel branches: 1.21.2;
add a driver for BCM2835 obio gpio
 1.20 01-Nov-2013  skrll branches: 1.20.2;
PR/48342. Add aurateconv as a dependency for vcaudio.
 1.19 15-Oct-2013  skrll Switch to dwctwo(4) from dotg(4) for the RaspberryPi port. This brings
DMA support and (initial) isoc transfer support.

Remove URTWN_DOTG_WORKAROUND as dwctwo doesn't appear to need it.
 1.18 15-Oct-2013  skrll Small cleanup
 1.17 21-Sep-2013  skrll Some dwc2 glue.
 1.16 24-Mar-2013  jmcneill branches: 1.16.4;
add wip videocore4 audio driver
 1.15 24-Mar-2013  jmcneill pull in vchiq
 1.14 25-Jan-2013  jmcneill Add BCM2835 RNG support.
 1.13 10-Jan-2013  jmcneill bcm2835 watchdog timer support
 1.12 09-Jan-2013  skrll Provide dotg(4) - a driver for the Synposys DesignWare OTG USB IP found
in the RaspberryPI. The driver supports host mode and control, interrupt,
and bulk transfers only at this point.

Heavily based on the FreeBSD driver by Hans Petter Selasky.

Thanks to all who helped. Jared McNeill, Michael van Elst and other.
 1.11 08-Jan-2013  jmcneill add genfb glue
 1.10 08-Jan-2013  skrll Sprinkle needs-flag
 1.9 07-Jan-2013  jmcneill allow for a single board specific device to attach to the mbox driver
 1.8 05-Jan-2013  jakllsch Add driver for BCM2835 SPI0 controller.
 1.7 05-Jan-2013  jakllsch Add driver for Broadcom Serial Control (I²C) master on BCM2835.
 1.6 05-Jan-2013  jakllsch Add a function for adjusting the pin muxer in the GPIO block.
(This should probably be revisited later.)
 1.5 22-Aug-2012  jakllsch branches: 1.5.2; 1.5.4;
Fix typo in previous.
 1.4 22-Aug-2012  jakllsch As we'll soon get boot-time information via the mailbox method, seperate
the actual access code into a seperate file that can be used by itself.
 1.3 22-Aug-2012  jakllsch Remove defparam MEMSIZE, MEMSIZE is no longer used.
 1.2 20-Aug-2012  skrll First pass at a VC mailbox driver.
 1.1 26-Jul-2012  skrll branches: 1.1.2;
Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.
 1.1.2.4 13-Feb-2013  riz Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]
 1.1.2.3 19-Nov-2012  riz sys/arch/arm/broadcom/bcm2835_emmc.c patch
sys/arch/arm/broadcom/bcm2835reg.h patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox_subr.c 1.1-1.3 via patch
sys/arch/arm/broadcom/bcm2835_mboxreg.h 1.1 via patch
sys/arch/arm/broadcom/files.bcm2835 patch
sys/arch/evbarm/rpi/rpi_machdep.c patch
sys/arch/evbarm/rpi/rpi_start.S patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.1-1.2 via patch

Improve Raspberry PI support: memory layout and clock for the
sdhc(4) controller are queried via the mailbox properties
channel.
[skrll, ticket #660]
 1.1.2.2 09-Aug-2012  jdc Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.1.2.1 26-Jul-2012  jdc file files.bcm2835 was added on branch netbsd-6 on 2012-08-09 06:36:50 +0000
 1.5.4.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.5.4.3 23-Jan-2013  yamt sync with head
 1.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 22-Aug-2012  yamt file files.bcm2835 was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.5.2.4 03-Dec-2017  jdolecek update from HEAD
 1.5.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.2 23-Jun-2013  tls resync from head
 1.5.2.1 25-Feb-2013  tls resync with head
 1.16.4.1 18-May-2014  rmind sync with head
 1.20.2.1 10-Aug-2014  tls Rebase.
 1.21.2.4 15-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #594):
sys/arch/arm/broadcom/bcm2835_vcaudio.c: revision 1.8, 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.25
port-arm/49057: Raspberry Pi Audio volume control does not work
- Use software volume control for outputs.master/inputs.dac
- Previous volume control (for analog output only) is available on new
outputs.headphones mixer control.
- Add an outputs.select enum to choose between "auto", "headphones", and
"hdmi" outputs.
--
port-arm/49057: Raspberry Pi Audio volume control does not work
AUDS server messages expect volume to be expressed in units of 1/256 dB,
where we previously (incorrectly) treated it as as percentage. Map the
NetBSD audio level (0-255) to 20 steps (levels from FreeBSD bcm2835_audio.c)
and provide independent volume knobs for outputs.auto, outputs.hdmi, and
outputs.headphones.
 1.21.2.3 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.21.2.2 03-Oct-2014  martin Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.
 1.21.2.1 11-Sep-2014  martin Pull up the following changes (requested by skrll, #83):
sys/arch/arm/broadcom/bcm2835_dmac.c 1.1-1.2
sys/arch/arm/broadcom/bcm2835_dmac.h 1.1
sys/arch/arm/broadcom/bcm2835_intr.c 1.4
sys/arch/arm/broadcom/bcm2835_obio.c 1.21
sys/arch/arm/broadcom/bcm2835reg.h 1.11
sys/arch/arm/broadcom/files.bcm2835 1.22
sys/arch/evbarm/conf/RPI 1.51
sys/arch/evbarm/rpi/rpi_machdep.c 1.46

Add bcm2835 dma controller driver.
 1.23.2.3 28-Aug-2017  skrll Sync with HEAD
 1.23.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.23.2.1 06-Apr-2015  skrll Sync with HEAD
 1.29.2.3 20-Oct-2018  pgoyette Sync with head
 1.29.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.29.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.31.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.2.1 10-Jun-2019  christos Sync with HEAD
 1.32.2.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.39.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 16-Feb-2024  skrll Retire BCM53XX_CONSOLE_EARLY in favour of EARLYCONS
 1.5 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.4 28-Oct-2013  matt branches: 1.4.2; 1.4.30; 1.4.32;
Add support for the BCM56340 iProc based switch
 1.3 07-Dec-2012  matt branches: 1.3.2;
Add BCMETH_COUNTERS
 1.2 23-Oct-2012  matt branches: 1.2.2; 1.2.4;
Add MEMSIZE as an option.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add initial device support for the Broadcom BCM5301x family.
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.3 07-Dec-2012  matt Sync with HEAD.
 1.2.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.4.1 23-Oct-2012  matt file files.bcm53xx was added on branch matt-nb6-plus on 2012-11-28 22:40:24 +0000
 1.2.2.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.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 23-Oct-2012  yamt file files.bcm53xx was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.3.2.1 18-May-2014  rmind sync with head
 1.4.32.1 10-Jun-2019  christos Sync with HEAD
 1.4.30.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.4.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.2.1 28-Oct-2013  matt file files.bcm53xx was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12; 1.1.38;
Add support SoC CL PS-711x.
 1.1.38.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clps711x_space.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clps711x_space.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12;
Add support SoC CL PS-711x.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clps711xreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clps711xreg.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.11 01-Sep-2023  andvar fix typo in the type krandsource_t -> krndsource_t.

fixes RND_COM enabled build for epoc32.
 1.10 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.9 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.8 10-Nov-2019  chs branches: 1.8.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.7 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.6 13-Apr-2015  riastradh branches: 1.6.16; 1.6.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.5 15-Nov-2014  christos branches: 1.5.2;
centralize the call unit / dialout macros
 1.4 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.3 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.2 16-Mar-2014  dholland branches: 1.2.2; 1.2.4;
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.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.6;
Add support SoC CL PS-711x.
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.4 03-Dec-2017  jdolecek update from HEAD
 1.1.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clpscom.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 16-Mar-2014  yamt file clpscom.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.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.5.2.1 06-Jun-2015  skrll Sync with HEAD
 1.6.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.18.1 10-Jun-2019  christos Sync with HEAD
 1.6.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12; 1.1.54;
Add support SoC CL PS-711x.
 1.1.54.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.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clpslcd.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clpslcd.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 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.2 07-Sep-2025  thorpej Remove unnecessary NULL-initialization of TODR handle fields.
 1.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12;
Add support SoC CL PS-711x.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clpsrtc.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clpsrtc.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12; 1.1.54;
Add support SoC CL PS-711x.
 1.1.54.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.1.54.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clpssoc.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clpssoc.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12;
Add support SoC CL PS-711x.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file clpssocvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file clpssocvar.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.1 28-Apr-2013  kiyohara branches: 1.1.4; 1.1.12;
Add support SoC CL PS-711x.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 28-Apr-2013  yamt file files.clps711x was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 28-Apr-2013  tls file files.clps711x was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.58 18-Feb-2024  mrg if we're building with GCC and MACHINE_CPU is aarch64, error out since
that isn't going to work.

doing this better in config(1) is difficult, but at least we can
detect and give a useful error message for this case instead of just
erroring out with some compiler options aren't supported. if we have
a good solution for config(1) we can remove this hack here..

might want to copy this hack for riscv too.
 1.57 28-Jul-2023  rin Simplify fix for PR toolchain/57146

Introduce ARCH_STRIP_SYMBOLS variable to centralize logic for debug
symbols from MD Makefile's to Makefile.kern.inc.
 1.56 26-Jul-2023  rin Fix kernel size inflation for arm and aarch64 (PR toolchain/57146)

For some conditions, SYSTEM_LD_TAIL is set for arm and aarch64.
Then, ctfmerge(1) in default SYSTEM_LD_TAIL is unintentionally
skipped, which results in the catastrophic kernel size inflation,
as reported in the PR.

Also, introduce and use OBJCOPY_STRIPFLAGS variable instead of
STRIPFLAGS, as strip(1) is replaced by objcopy(1) during MI
kernel build procedure.

XXX
For Makefile.{arm,aarch64}, weird logic is used to determine how
to handle debug symbols; MKDEBUG{,KERNEL} are taken into account
later in sys/conf/Makefile.kern.inc.
 1.55 10-Jul-2020  skrll branches: 1.55.20;
Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.54 05-Feb-2020  skrll Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.

armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO

bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.

XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.53 06-Jan-2020  skrll branches: 1.53.2;
Use CFLAGS instead of COPTS for -mapcs-frame when using DDB.

Discussed with mrg@
 1.52 02-Jan-2020  skrll gcc 8 needs -mapcs-frame when DDB is specified for backtrace to work
 1.51 11-Nov-2019  joerg Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)
 1.50 26-Aug-2019  rin PR kern/54486

Workaround for alignment faults on ARMv6+, at least occur with
axe(4) and athn(4) drivers.

For ARMv6+, unaligned access is enabled by default. However, it
cannot be used for non-cacheable memory, which is used as DMA
buffers. This results in alignment faults above. A real fix is
to use cacheable memory as DMA buffers. However, it breaks some
drivers, awge(4) and vchiq(4) at least.

Until we figure out problems and fix them, we choose a fail-safe
workaround here; forbid unaligned memory access for whole kernel.
Affects on performance is negligibly small as far as we can see.

XXX
pullup netbsd-9
 1.49 22-Sep-2018  rin branches: 1.49.4;
- Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
 1.48 01-May-2015  nat branches: 1.48.16; 1.48.18;
Include splash with genfb.
splash.o is only included with options SPLASHSCREEN.
splash_image.o target moved to Makefile.kern.inc.

This commit was approved by matt@
 1.47 30-Apr-2015  nat Remove unintended whitespace.
 1.46 30-Apr-2015  nat Added a new option for embedding a splash screen into kernel.
Add: options SPLASHSCREEN
makeoptions SPLASHSCREEN_IMAGE="path/to/image"
to your config file. So far it will work on amd64 and RPI/RPI2.

This commit was with ideas, help, and OK from jmcneill@.
 1.45 17-Aug-2014  joerg branches: 1.45.2;
Reorganize symbol table embedding. The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
 1.44 14-Aug-2014  joerg Do the wildcard symbol dance for the debug case as well.
 1.43 14-Aug-2014  joerg Use wildcards for stripping/preserving the mapping symbols on ARM and
AArch64. LLVM creates unique symbols in each file of the form $a.n etc.
 1.42 02-Mar-2014  joerg branches: 1.42.4;
Explicitly enable VFP support for vfp_init.c. Fixes build of
INTEGRATOR_CP with clang.
 1.41 23-Jan-2014  martin Compile the armv4 cpufunc file with -mcpu=arm8 instead of arm9, to avoid
an armv4t marked object file which causes failure in the shark objcopy
step when creating the a.out version of the kernel.
 1.40 04-Jan-2014  joerg Explicitly force a CPU for the assembler for the compatibility
cpu_func_* files. LLVM complains about the use of deprecated
instructions when -march=armv7 or equivalent is in use.
 1.39 27-Dec-2013  matt Pass -mfpu=vfp so GAS won't complain about vmsrne
 1.38 28-Oct-2013  matt Make sure certain files are always assembled with -marm
 1.37 03-Feb-2013  skrll branches: 1.37.2;
Fix typo in option name
 1.36 03-Feb-2013  matt Always compile the kernel with -mfloat=soft
 1.35 05-Oct-2012  matt Make arm32_kvminit.o is complied with -fno-stack-protector
 1.34 18-May-2012  skrll branches: 1.34.2;
Remove an '@' to hopefully see what's going on with the daily builds.
 1.33 19-Mar-2012  bsh adjust the size of db_symtab space automatically.
proposed on tech-toolchain@, and got no objections.
 1.32 27-Apr-2008  tsutsui branches: 1.32.20; 1.32.36; 1.32.40; 1.32.44;
Remove local -fno-strict-aliasing hack.
sys/conf/Makefile.kern.inc has it for gcc4.
 1.31 26-Jan-2008  chris branches: 1.31.6; 1.31.8;
Add arm version of cpu_in_cksum. Based on previous in_cksum4 code.

In fact it's mostly the same code, with a different stub on it.

On a cats the regress/sys/net/in_cksum tests show that it takes around
50-60% of the time the C version takes. In some cases it takes as low as
20%.
 1.30 25-Jan-2008  joerg Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
They call a backend function cpu_in_cksum after possibly
computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
The default implementation is moderate fast on most platforms
and provides a 32bit accumulator with 16bit addends for L32 platforms
and a 64bit accumulator with 32bit addends for L64 platforms.
It handles edge cases like very large mbuf chains (could happen with
native IPv6 in the future) and provides a good base for new native
implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
 1.29 04-Mar-2007  bjh21 branches: 1.29.16; 1.29.20; 1.29.22; 1.29.28;
src/sys/arch/arm32 is long gone, so stop referring to it.
 1.28 10-Dec-2006  scw branches: 1.28.2;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.27 10-Nov-2005  dbj branches: 1.27.22; 1.27.24;
partially revert previous commit stripping arm mapping symbols
it broke ddb when DEBUG wasn't set to -g.
 1.26 21-Oct-2005  dbj strip arm mapping symbols for ddb using STRIPFLAGS instead of SYSTEM_LD_TAIL
this works even for kernels compiled with -g and doesn't interfere with gdb
 1.25 20-Jun-2005  scw branches: 1.25.2; 1.25.4;
Use objcopy (as suggested by Richard Earnshaw) to strip ARM mapping symbols
from the kernel image, as they interfere with ddb. But only do this if
'makeoptions DEBUG="-g"' was not specified, in case they're needed by gdb.
 1.24 31-May-2005  christos s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
 1.23 11-Jan-2005  simonb Add isa_irq.o and spl.o to the list of files that depend on assym.h so
that "make -j<bignum>" works without a "make depend" beforehand.
 1.22 20-Aug-2004  simonb Add dependancies on assym.h for some assembly files so that
"make -j <bignum>" works without having to do a "make depend" first.
 1.21 04-Jun-2004  thorpej Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
 1.20 30-Oct-2003  skrll branches: 1.20.4;
Fix a typo so that hack actually takes effect.
 1.19 28-Oct-2003  skrll Compile sys/kern/uipc_socket.c -fno-strict-aliasing for now. PR 23044.
 1.18 03-Jan-2003  thorpej branches: 1.18.2;
Don't define -D${MACHINE} in Makefile.arm. Instead, let platforms
that care define it themselves. Note that evbarm NO LONGER defines
-D${MACHINE}.
 1.17 05-Oct-2002  chs add missing protos, clean up includes.
 1.16 31-Jan-2002  chris Set LOOSE_PROTOTYPES to no for cats. This means cats now uses stricter prototype checking.
 1.15 09-Dec-2001  atatat Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
 1.14 26-Nov-2001  thorpej Allow port-specific Makefile fragments to specify a list of additional
genassym.cf fragments, if desired.
 1.13 25-Nov-2001  thorpej End the "new ARM includes strategy" experiment. The new strategy
broke too many assumptions makde by other parts of the source tree,
and the strategy and how it was supposed to work was never discussed
on tech-userlevel, nor was it applied consistently (to all ARM ports
and to other ports which have common MACHINE_ARCH code, such as MIPS,
m68k, powerpc).

Verified to complete a full "make build" on cats, dnard, evbarm,
and netwinder.
 1.12 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.11 06-Nov-2001  thorpej branches: 1.11.2;
Make it possible for Makefile.${MACHINE}.inc to provide extra
stuff at the end of SYSTEM_LD_TAIL.
 1.10 26-Oct-2001  jmc Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
 1.9 23-Oct-2001  thorpej branches: 1.9.2;
Use MACHINE, not TARGET_MACHINE.
 1.8 23-Oct-2001  thorpej Pull in <bsd.own.mk> to get the correct toolchain definitions for
the USE_NEW_TOOLCHAIN case.
 1.7 17-Oct-2001  matt Workaround "../../../.."
 1.6 28-Jul-2001  chris finish moving common arm32 bits out into arm/arm32.
 1.5 28-Jul-2001  chris Change -x into -X for linking, it makes traces more meaningful.
 1.4 12-Jul-2001  matt Gah!. Use the variable name (LINKENTRY).
 1.3 12-Jul-2001  matt Fix a few things for NetWinder. NetWinder needs to override the
std entry point so add a hook for that. Also pick up the port
specific .inc file from the right directory.
 1.2 11-Jun-2001  matt branches: 1.2.2; 1.2.4;
Only include dependency on include-dirs if the include directory doesn't
exist.
 1.1 11-Jun-2001  matt Add common Makefile for arm ports. Only include (for now) machine/io.h
if arm32 is defined. io.h is RISCPC specific and isn't needed for other
ports.
 1.2.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 03-Aug-2001  lukem update to -current
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.11.2.5 03-Jan-2003  thorpej Sync with HEAD.
 1.11.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.11.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.11.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.2.1 06-Nov-2001  nathanw file Makefile.arm was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.18.2.7 11-Dec-2005  christos Sync with head.
 1.18.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.18.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.4.1 06-Feb-2005  jmc Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
 1.25.4.1 26-Oct-2005  yamt sync with head
 1.25.2.4 04-Feb-2008  yamt sync with head.
 1.25.2.3 03-Sep-2007  yamt sync with head.
 1.25.2.2 30-Dec-2006  yamt sync with head.
 1.25.2.1 21-Jun-2006  yamt sync with head.
 1.27.24.1 18-Dec-2006  yamt sync with head.
 1.27.22.1 12-Jan-2007  ad Sync with head.
 1.28.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.29.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.29.22.1 23-Mar-2008  matt sync with HEAD
 1.29.20.1 27-Jan-2008  chris Sync to HEAD.
 1.29.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.31.8.1 18-May-2008  yamt sync with head.
 1.31.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.32.44.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.32.40.2 02-Jun-2012  mrg sync to latest -current.
 1.32.40.1 05-Apr-2012  mrg sync to latest -current.
 1.32.36.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.32.36.3 30-Oct-2012  yamt sync with head
 1.32.36.2 23-May-2012  yamt sync with head.
 1.32.36.1 17-Apr-2012  yamt sync with head
 1.32.20.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.34.2.4 03-Dec-2017  jdolecek update from HEAD
 1.34.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.2.2 25-Feb-2013  tls resync with head
 1.34.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.37.2.1 18-May-2014  rmind sync with head
 1.42.4.1 05-Jan-2016  snj Pull up following revision(s) (requested by martin in ticket #1058):
sys/arch/arm/conf/Makefile.arm: revision 1.43
sys/arch/aarch64/conf/Makefile.aarch64: revision 1.2
share/mk/bsd.sys.mk: revision 1.243, 1.244
Use wildcards for stripping/preserving the mapping symbols on ARM and
AArch64. LLVM creates unique symbols in each file of the form $a.n etc.
--
Fix typo in OBJCOPYLIBFLAGS_EXTRA for aarch64eb.
 1.45.2.1 06-Jun-2015  skrll Sync with HEAD
 1.48.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.48.18.1 10-Jun-2019  christos Sync with HEAD
 1.48.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.49.4.2 27-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #742):

sys/arch/arm/arm32/pmap.c: revision 1.388
sys/arch/arm/arm32/armv7_generic_space.c: revision 1.11
sys/arch/arm/arm/cpufunc.c: revision 1.176
sys/arch/arm/conf/Makefile.arm: revision 1.54 (via patch)
sys/arch/arm/include/arm32/pmap.h: revision 1.161

Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.
armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO
bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.
XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.49.4.1 01-Sep-2019  martin Pull up following revision(s) (requested by rin in ticket #146):

sys/arch/arm/conf/Makefile.arm: revision 1.50
sys/dev/usb/if_axe.c: revision 1.120

PR kern/54486

Workaround for alignment faults on ARMv6+, at least occur with
axe(4) and athn(4) drivers.

For ARMv6+, unaligned access is enabled by default. However, it
cannot be used for non-cacheable memory, which is used as DMA
buffers. This results in alignment faults above. A real fix is
to use cacheable memory as DMA buffers. However, it breaks some
drivers, awge(4) and vchiq(4) at least.

Until we figure out problems and fix them, we choose a fail-safe
workaround here; forbid unaligned memory access for whole kernel.
Affects on performance is negligibly small as far as we can see.

XXX
pullup netbsd-9

-

PR kern/54486
Revert workaround introduced in rev 1.94:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/if_axe.c#rev1.94

This is a problem specific to ARMv6+, and addressed by
arch/arm/conf/Makefile.arm rev 1.50:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/conf/Makefile.arm#rev1.50

XXX
pullup netbsd-9
 1.53.2.1 29-Feb-2020  ad Sync with head.
 1.55.20.1 11-Sep-2023  martin Pull up following revision(s) (requested by rin in ticket #363):

sys/arch/aarch64/conf/Makefile.aarch64: revision 1.24
sys/arch/aarch64/conf/Makefile.aarch64: revision 1.25
sys/arch/shark/conf/Makefile.shark.inc: revision 1.28
sys/arch/alpha/conf/Makefile.alpha: revision 1.88
sys/arch/mips/conf/Makefile.mips: revision 1.73
sys/conf/Makefile.kern.inc: revision 1.298
sys/conf/Makefile.kern.inc: revision 1.299
sys/arch/cats/conf/Makefile.cats.inc: revision 1.37
sys/arch/arm/conf/Makefile.arm: revision 1.56
sys/arch/arm/conf/Makefile.arm: revision 1.57
sys/arch/riscv/conf/Makefile.riscv: revision 1.10

Always use arm-elf2aout; no a.out support both for binutils{,.old}

Fix kernel size inflation for arm and aarch64 (PR toolchain/57146)

For some conditions, SYSTEM_LD_TAIL is set for arm and aarch64.
Then, ctfmerge(1) in default SYSTEM_LD_TAIL is unintentionally
skipped, which results in the catastrophic kernel size inflation,
as reported in the PR.

Also, introduce and use OBJCOPY_STRIPFLAGS variable instead of
STRIPFLAGS, as strip(1) is replaced by objcopy(1) during MI
kernel build procedure.

For Makefile.{arm,aarch64}, weird logic is used to determine how
to handle debug symbols; MKDEBUG{,KERNEL} are taken into account
later in sys/conf/Makefile.kern.inc.

Use OBJCOPY_STRIPFLAGS instead of STRIPFLAGS.
Simplify fix for PR toolchain/57146

Introduce ARCH_STRIP_SYMBOLS variable to centralize logic for debug
symbols from MD Makefile's to Makefile.kern.inc.
 1.5 21-Nov-2002  thorpej Remove, with extreme prejudice.
 1.4 05-Mar-2002  thorpej branches: 1.4.8;
Fix size/padding of .data. From Nick.
 1.3 20-Feb-2002  skrll branches: 1.3.2;
Use shell arithmetic as much as possible and reduce the number of times
that awk is used to one.

No functional change.
 1.2 09-Feb-2002  chris branches: 1.2.2;
Update elf2aout to cope with infile and outfile being the same.
Make the cats a.out kernel be called netbsd. This means that make install installs the correct kernel
 1.1 06-Feb-2002  thorpej A slightly cleaned up version of chris/nick's elf2aout.sh for ARM
platforms.
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 09-Feb-2002  jdolecek file elf2aout.sh was added on branch kqueue on 2002-02-11 20:07:20 +0000
 1.3.2.4 11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.1 20-Feb-2002  nathanw file elf2aout.sh was added on branch nathanw_sa on 2002-02-28 04:07:26 +0000
 1.4.8.1 03-Feb-2003  jmc Apply hand patch (from chris in ticket #1144)
Include the .rodata area into the .text area. Fixes PR#20171
 1.168 20-Apr-2023  skrll Provide a shared pmap_devmap implementation and convert all pmap_devmap
arrays to use DEVMAP_ENTRY{,_END}
 1.167 28-Oct-2022  skrll MI PMAP EFI_RUNTIME support
 1.166 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.165 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.164 21-Oct-2020  christos make process_machdep.c included always since it provides register i/o used by
sys_process_getlwpstatus.c which is always included.
 1.163 20-Oct-2020  christos harmonize process_machdep.c inclusion.
 1.162 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.161 02-Aug-2020  maxv Add support for Privileged Access Never (ARMv8.1-PAN).

PAN provides the same functionality as SMAP on x86: it forbids kernel
access to userland pages when PSTATE.PAN=1, and allows such accesses when
PSTATE.PAN=0.

We clear SCTLR_SPAN, to guarantee that PAN=1 each time the kernel is
entered. We catch PAN faults and panic right away without further
processing. In copyin, copyout, etc, we temporarily authorize access to
userland pages.

PAN is a very useful exploit mitigation. Reviewed by ryo@, thanks. Tested
on Qemu. Enabled by default.
 1.160 27-Jul-2020  riastradh Enable ChaCha NEON code on armv7 too.

The 4-blocks-at-a-time assembly helper is disabled for now; adapting
it to armv7 is going to be a little annoying with only 16 128-bit
vector registers.

(Should also do a fifth block in the integer registers for 320 bytes
at a time.)
 1.159 27-Jul-2020  riastradh Fix outdated comment.
 1.158 29-Jun-2020  riastradh New permutation-based AES implementation using ARM NEON.

Also derived from Mike Hamburg's public-domain vpaes code.
 1.157 18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.156 13-Apr-2020  maxv Add KASAN-DMA support on aarch64, same as amd64. Discussed with skrll@.
 1.155 13-Apr-2020  maxv Add support for Branch Target Identification (BTI).

On the executable pages that have the GP (Guarded Page) bit, the semantic
of the "br" and "blr" instructions is changed: the CPU expects the first
instruction of the jump/call target to be "bti", and faults if it isn't.

We add the GP bit on the kernel .text pages (and incidentally the .rodata
pages, but we don't care). The compiler adds a "bti c" instruction at the
beginning of each C function. We modify the ENTRY() macros to manually add
"bti c" in the asm functions.

cpuswitch.S needs a specific change: with "br x27" the CPU expects "bti j",
which is bad because the functions begin with "bti c"; switch to "br x16",
for the CPU to accept "bti c".

BTI helps defend against JOP/COP. Tested on Qemu.
 1.154 12-Apr-2020  maxv Add support for Pointer Authentication (PAC).

We use the "pac-ret" option, to sign the return instruction pointer on
function entry, and authenticate it on function exit. This acts as a
mitigation against ROP.

The authentication uses a per-lwp (secret) I-A key stored in the 128bit
APIAKey register and part of the lwp context. During lwp creation, the
kernel generates a random key, and during context switches, it installs
the key of the target lwp on the CPU.

Userland cannot read the APIAKey register directly. However, it can sign
its pointers with it, because the register is architecturally shared
between userland and the kernel. Although part of the CPU design, it is
a bit of an undesired behavior, because it allows to forge valid kernel
pointers from userland. To avoid that, we don't share the key with
userland, and rather switch it in EL0<->EL1 transitions. This means that
when userland executes, a different key is loaded in APIAKey than the one
the kernel uses. For now the userland key is a fixed 128bit zero value.

The DDB stack unwinder is changed to strip the authentication code from
the pointers in lr.

Two problems are known:

* Currently the idlelwps' keys are not really secret. This is because
the RNG is not yet available when we spawn these lwps. Not overly
important, but would be nice to fix with UEFI RNG.
* The key switching in EL0<->EL1 transitions is not the most optimized
code on the planet. Instead of checking aarch64_pac_enabled, it would
be better to hot-patch the code at boot time, but there currently is
no hot-patch support on aarch64.

Tested on Qemu.
 1.153 15-Feb-2020  skrll branches: 1.153.4;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.152 21-Jan-2020  skrll Sort a bit
 1.151 21-Jan-2020  skrll Trailing whitespace
 1.150 15-Jan-2020  mrg port the arm64 cpu topology setup for big.little to arm.

rename arm64 cpu_do_topology() to arm_cpu_do_topology() and
call it from both arm cpu_attach().

replace both aarch64_set_topology() inline code in arm
cpu_attach() with new arm_cpu_do_topology(), which is called
by the arm64 locore as well (possibly not needed, which would
allow it to become static.)

not yet tested on a real big.little armv7 system. tested
on rockpro64 and pinebook pro.
 1.149 20-Nov-2019  pgoyette branches: 1.149.2;
Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation. Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !
 1.148 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.147 05-Dec-2018  jmcneill Split armv7/armv8 tprof backend config logic from the fdt bus glue.
 1.146 28-Oct-2018  jmcneill Add support for EFI runtime services on aarch64.
 1.145 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.144 06-Oct-2018  skrll Whitespace
 1.143 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.142 16-Sep-2018  skrll Whitespace
 1.141 10-Aug-2018  maxv remove reference to CPU_ARMV2, suggested by jmcneill@
 1.140 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.139 01-Apr-2018  ryo branches: 1.139.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.138 24-Jan-2018  skrll branches: 1.138.2;
Remove port-acorn26

OK core@
 1.137 17-Jan-2018  skrll G/C ARM32_NEW_VM_LAYOUT
 1.136 10-Nov-2017  matt Add CPU_CORTEXA35
 1.135 08-Oct-2017  jmcneill defflag CPU_CORTEXA53
 1.134 24-Aug-2017  jmcneill Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.133 28-Jun-2017  jmcneill Add support for ARM Power State Coordination Interface (PSCI).
 1.132 26-May-2017  jmcneill branches: 1.132.2;
Recognize Cortex-A57 FPU, GIC, and Generic Timer.
 1.131 11-Nov-2015  skrll Support pmap_pv_track and friends
 1.130 07-Feb-2015  jmcneill According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
 1.129 01-Dec-2014  matt Add CPU_CORTEXA17
 1.128 26-Nov-2014  matt branches: 1.128.2;
Add option ARM_HAS_LPAE
 1.127 14-Apr-2014  matt branches: 1.127.2;
Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.126 30-Mar-2014  matt branches: 1.126.2;
Make the ARM pmap use ASIDs, split TTBRs, and MP safe. This only happens for
ARMv6 or later CPUs. This means that on context switch that the TLBs and
caches no longer to cleaned/flushed. Also, eXecute Never (XN) protection has
been added so non-exec pages can not be run. Change the page size for ARMv6+
to be 8KB while allows a L1PT to be a normal page. This means that the L1PT
is not special. Use the XN support to only sync pages that are executed from.
 1.125 18-Mar-2014  matt defflag VERBOSE_INIT_ARM
 1.124 20-Feb-2014  matt cpu_cortex doesn't need the arm11 cpufuncs any more
 1.123 12-Nov-2013  matt CPU_ARMV[67] imply ARM32_DISABLE_ALIGNMENT_FAULTS
Make it explicit.
 1.122 17-Aug-2013  matt Nuke atomic.S since we have MI defined atomic ops
 1.121 02-Jul-2013  matt Rework to have CPU_PREARMV6, CPU_ARMV6, as well as CPU_ARMV7
 1.120 22-Jun-2013  matt branches: 1.120.2;
File VBAR option
 1.119 12-Jun-2013  matt Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.118 12-Jun-2013  matt Add CPU_ARMV7 and make CPU_PJ4B and CPU_CORTEX instantiate it.
 1.117 19-May-2013  rkujawa Make PJ4B support code compilable.

Obtained from Marvell, Semihalf.
 1.116 14-Feb-2013  matt Add BUSDMA_COUNTERS option
 1.115 28-Jan-2013  matt Disable bzero_page_vfp and bcopy_page_vfp since it really isn't any faster
than memcpy.
 1.114 10-Dec-2012  matt Add code to use VFP(or Neon) instructions to zero or copy a page via
pmap_zero_page and pmap_copy_page. (Not hooked into vfp_init yet).
Requires FPU_VFP
 1.113 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.112 17-Oct-2012  matt Add a PMAP_NEEDS_ALLOC_POOLPAGE / PMAP_ALLOC_POOLPAGE hook so systems can
allocate pool pages from a specific VM freelist.
 1.111 18-Sep-2012  matt add _ARM32_NEED_BUS_DMA_BOUNCE to opt_arm_bus_space.h (It's not really a
bus_space option but it's close enough).
 1.110 29-Aug-2012  matt branches: 1.110.2;
Add core locator to mainbus. Add support for attaching multiple CPUs
 1.109 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.108 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.107 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.106 21-Jul-2012  skrll Add support for the ARM1176JZS
 1.105 14-Jul-2012  matt Add intrbase locator to mainbus.
 1.104 13-Jul-2012  matt Begin support for Cortex A5, A7, A15 and expand A8 and A9 definitions.
Instead of testing all possible CPUids for a cortex, we know what range
a cortex will be so mask out the insignificant parts and do a single test.
 1.103 11-Dec-2011  kiyohara branches: 1.103.2;
Require arm3_cache_flush for ARM2/ARM250.
 1.102 12-Jun-2011  rmind branches: 1.102.2; 1.102.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.101 10-Mar-2011  bsh branches: 1.101.2;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.100 02-Oct-2010  kiyohara branches: 1.100.2;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.99 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.98 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.97 27-Dec-2009  uebayasi branches: 1.97.2; 1.97.4;
Add write-through cache work-around for ARM11 as well as ARM9/ARM10. Analyzed
& tested on i.MX35 with help from Tsubai Masanari.
 1.96 18-Jan-2009  bjh21 Adapt the arm32 fusu implementation for use on PROG26 configurations
and use it on acorn26.
 1.95 18-Jan-2009  bjh21 Move arch/arm/arm32/fusu.S to arch/arm/arm/fusu.S in preparation for making
it usable on acorn26 as well.
 1.94 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.93 14-Oct-2008  matt branches: 1.93.2; 1.93.8;
Add FA526 support (compile tested only)
 1.92 27-Aug-2008  matt Add CPU_CORTEXA8
 1.91 27-Apr-2008  matt branches: 1.91.2; 1.91.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.90 15-Mar-2008  rearnsha branches: 1.90.2; 1.90.4;
VFP support.
 1.89 26-Jan-2008  chris branches: 1.89.2; 1.89.6;
Add arm version of cpu_in_cksum. Based on previous in_cksum4 code.

In fact it's mostly the same code, with a different stub on it.

On a cats the regress/sys/net/in_cksum tests show that it takes around
50-60% of the time the C version takes. In some cases it takes as low as
20%.
 1.88 25-Jan-2008  joerg Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
They call a backend function cpu_in_cksum after possibly
computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
The default implementation is moderate fast on most platforms
and provides a 32bit accumulator with 16bit addends for L32 platforms
and a 64bit accumulator with 32bit addends for L64 platforms.
It handles edge cases like very large mbuf chains (could happen with
native IPv6 in the future) and provides a good base for new native
implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
 1.87 06-Jan-2008  ad Add MODULAR option. Include kernel linker stuff if MODULAR.
 1.86 17-Oct-2007  garbled branches: 1.86.2; 1.86.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.85 07-Jul-2007  tsutsui branches: 1.85.6; 1.85.10; 1.85.12;
Remove leftover netns stuff.
 1.84 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.83 09-Mar-2007  thorpej branches: 1.83.2; 1.83.4; 1.83.8; 1.83.10;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.82 06-Jan-2007  christos branches: 1.82.2;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.81 11-Dec-2005  christos branches: 1.81.20; 1.81.24;
merge ktrace-lwp.
 1.80 13-Sep-2005  christos split compat_16 functions to their own file and make this compile again.
 1.79 04-Jul-2005  bsh branches: 1.79.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.78 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.77 03-Apr-2004  bsh add an option to force ARM9 dcache to write-through mode.
 1.76 05-Nov-2003  scw Add "options ARM32_DISABLE_ALIGNMENT_FAULTS" to forcibly disable
alignment fault checking if necessary.

This option gets the acorn32 port working again.

XXX: Richard Earnshaw suggested enabling alignment faults for
XXX: userland only on acorn32. Need to investigate this.
 1.75 23-Oct-2003  scw Add a defflag for __BUS_SPACE_HAS_STREAM_METHODS, and add the
appropriate glue in bus.h, contingent on the option being defined.

This allows stream methods to be available on a port-by-port basis.
 1.74 11-Sep-2003  scw Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
 1.73 06-Sep-2003  rearnsha Add build-system support for ARM10.
 1.72 23-May-2003  ichiro branches: 1.72.2;
support IXP425 Intel Network Processor
running on BigEndian
 1.71 21-May-2003  thorpej Move the new pmap from arm32/pmap_new.c to arm32/pmap.c, fully replacing
the old.
 1.70 03-May-2003  thorpej ARM32_PMAP_NEEDS_PTE_SYNC no longer exists.
 1.69 28-Apr-2003  briggs Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.68 21-Apr-2003  thorpej Defflag XSCALE_CACHE_READ_WRITE_ALLOCATE and XSCALE_NO_COALESCE_WRITES.
 1.67 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.66 29-Mar-2003  bsh put options XSCALE_CACHE_WRITE_THROUGH into opt_cpuoptions.h.
add XSCALE_CACHE_WRITE_BACK.
 1.65 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.64 19-Oct-2002  bsh make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
 1.63 11-Aug-2002  bjh21 branches: 1.63.2;
Move the arm32 copystr.S from arch/arm/arm32 to arch/arm/arm and add support
for 26-bit modes (basically saving R14 when we might get a page fault).
Use it on all ARM architectures now.
 1.62 11-Aug-2002  bjh21 New, improved version of copyin(), copyout(), and kcopy() by Allen Briggs.
This version works on both 26-bit and 32-bit machines. For large copies,
it's up to three times as fast as the old arm32 version and five times as
fast as the old arm26 version. For small copies it seems to be even faster
(getrusage() is apparently over ten times faster on an ARM610).

Hooray for Allen!
 1.61 15-Jul-2002  ichiro add support for ixp12x0
 1.60 03-May-2002  rjs branches: 1.60.2; 1.60.4;
Add correct use of cpu types for SA1100 and SA1110.
 1.59 03-May-2002  thorpej Add the CPU_XSCALE_PXA2X0 option. From Hiroyuki Bessho, PR 16617.
 1.58 12-Apr-2002  thorpej Add some generic bus_space ops, which are pulled in by the
"bus_space_generic" configuration attribute.
 1.57 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.56 26-Mar-2002  thorpej Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.55 24-Mar-2002  bjh21 arm26->acorn26 transition.
 1.54 30-Jan-2002  thorpej Add a sleep routine for the SA-11x0.
 1.53 24-Jan-2002  briggs Two changes for XScale:
1) Add defparam XSCALE_CCLKCFG to define a parameter for the
CCLKCFG register. Default it to '9' on the IQ80310.
2) Add a sleep call to the xscale CPU function vector (replacing
the nullop) which should drop the CPU into "idle" mode when
cpu_switch finds nothing on the run queues.
 1.52 17-Jan-2002  bjh21 Separate out syscall() out into three parts:
swi_handler() does stuff that all SWIs will need, then calls
curproc->p_emul->e_syscall.
syscall() handles native NetBSD system calls.
linux_syscall() handles Linux system calls.
 1.51 14-Jan-2002  bjh21 Crude first cut at ARMLinux binary compatibility. Successfully runs
"/emul/linux/bin/echo hello, world", dynamically linked.
 1.50 12-Jan-2002  bjh21 Combined syscall handler for all ARM ports. This is basically the arm32
version, made readable and compatible with arm26. In addition, this adds
support for NetBSD/arm's newly allocated SWI range.
 1.49 07-Jan-2002  bjh21 On arm26, vectors.S needs to be at the start of the kernel text, so that it's
on a page boundary and can be mapped straight into zero page. This means it
has to be in MD_SFILES on arm26, and not in SFILES.

This probably leaves kernel_text in the wrong place, but it at least leaves the system bootable.
 1.48 21-Dec-2001  bjh21 Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
 1.47 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.46 28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.45 26-Nov-2001  thorpej Move the interrupt-related file declarations into port-specific
config descriptions so that each port choose whether or not to
use it.
 1.44 24-Nov-2001  thorpej Make the ARM, Ltd. floating point emulator work w/ ELF.
 1.43 24-Nov-2001  thorpej Move the ARM, Ltd. floating point emulator to arch/arm.
 1.42 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.41 20-Nov-2001  lukem cleanup:
options SPACE TAB
makeoptions TAB
psuedo-device TAB
remove trailing whitespace
replace multiple spaces -> tabs
options "FOO" -> options FOO
options "FOO=bar" -> options FOO=bar
options "FOO=\"bar\"" -> options FOO="\"bar\""
 1.40 10-Nov-2001  thorpej branches: 1.40.2;
Split all the model/version-specific cpufuncs into separate files
corresponding to the model/version.
 1.39 18-Oct-2001  rearnsha branches: 1.39.2;
Add CPU_ARM9 to opt_cputypes.h
 1.38 05-Sep-2001  matt Don't compile SPL/INTR stuff if NEWINTR is defined.
 1.37 05-Aug-2001  chris Share procfs_machdep.c across arm.
 1.36 31-Jul-2001  matt Add a CPU_XSCALE defopt (for eventual support).
 1.35 28-Jul-2001  chris Move the generic arm32 files into arm/arm32 from arm32/arm32, tested kernel builds on cats and riscpc.
 1.34 10-Jul-2001  bjh21 Purge CPU_ARM7500. Thanks to Reinoud's work, it's no longer needed.
 1.33 08-Jul-2001  rjs branches: 1.33.2;
Initial copy of SA11x0 support from hpcarm.
 1.32 18-Jun-2001  bjh21 Merge arm32/dev/bus_space_notimpl.S and hpcarm/hpcarm/bus_space_notimpl.S
into arm/arm/bus_space_notimpl.S. They were identical anyway.

This file has no excuse for being in assembler, but I'll leave that for another
day.
 1.31 05-Jun-2001  bjh21 Replace arm/arm32/db_trace.c and arm26/arm26/db_trace.c with a unified version
in arm/arm. This version is based on the arm26 version, and includes dumping
the contents of stack frames, with automatic determination of the save code
pointer offset.
 1.30 03-Jun-2001  chris Add support for ARM7TDMI, as provided in a patch from John Fremlin to port-arm32.

Shouldn't effect any currently in tree ports.
 1.29 29-May-2001  bjh21 Move blockio.S from sys/arch/arm32/arm32 to sys/arch/arm/arm, since I want to
start using it on arm26.

hpcarm gets to keep its own version, since it's not identical and I haven't
got an hpcarm box to test.
 1.28 23-May-2001  chris Create an asm based version of in4_cksum based on the sparc version.

Also don't compute psuedo header for nxt == 0
 1.27 13-May-2001  bjh21 strstr() is no longer used in the kernel. G/C it.
 1.26 13-May-2001  bjh21 Move get_bootconf_option() into a new file, sys/arch/arm/arm/bootconfig.c,
since it's in no way machine-dependent. It's not really ARM-specific either,
but I don't think it's useful enough to be made part of the MI kernel.
 1.25 06-May-2001  bjh21 Move "defopt PMAP_DEBUG" into files.arm, since it's used by code in arch/arm.
 1.24 06-May-2001  bjh21 Move cpufunc stuff from arm32/arm32 to arm/arm. The only change involved is
to add recognition of the SA-1100 and SA-1110 for compatibility with hpcarm
(which is now using this code as well).
 1.23 20-Apr-2001  matt Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.22 14-Mar-2001  toshii Move references to arm/arm/disksubr*.c from files.arm to
files.{arm26,arm32,dnard}.
 1.21 11-Mar-2001  bjh21 "needs-flag" for cpu is no longer needed.
 1.20 08-Mar-2001  bjh21 Use the same undefined-instuction handler on both arm26 and arm32. The handler
is derived mostly from the arm32 version, but with a check for an obscure ARM2
bug thrown in.

arm26 fpu and cpu drivers use the new interface for catching undefined
instructions.
 1.19 06-Mar-2001  matt Move arm32/arm32/ast.c to arm/arm32/ast.c
 1.18 05-Mar-2001  bjh21 Move undefined.c from sys/arch/{arm32/arm32,hpcarm/hpcarm} to sys/arch/arm/arm
in preparation for making it usable on arm26 as well.
 1.17 04-Mar-2001  bjh21 branches: 1.17.2;
Merge setregs() from sys/arch/arm32/arm32/machdep.c,
sys/arch/hpcarm/hpcarm/machdep.c and sys/arch/arm26/arm26/vm_machdep.c
into sys/arch/arm/arm/arm_machdep.c.
 1.16 04-Mar-2001  bjh21 Make compat_13_sys_sigreturn() work on arm26, and move it from
arch/arm/arm32/compat_13_machdep.c to arch/arm/arm/compat_13_machdep.c.
 1.15 04-Mar-2001  matt Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
 1.14 04-Mar-2001  matt disksubr*.c are now shared. Start moving files from ../../arm32/arm32
 1.13 27-Feb-2001  bjh21 Move "options ARMFPE" to files.arm, so generic ARM files can use it.
 1.12 25-Feb-2001  bjh21 Add PROG32 and PROG26 options.

These are intended to indicate what size of program space is in use, and hence
how to get at the PSR bits. They're currently set automatically by the CPU
type options.
 1.11 25-Feb-2001  bjh21 Allow "cpu" to have children. In the long term, this may be the best way to
handle co-processors. In the short term, it's a necessary hack to get arm26
kernels to configure.
 1.10 24-Feb-2001  reinoud Moved the mainbus files to the arm/conf/file.arm from the arm32 and the
hpcarm/conf/files.hpcarm
 1.9 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.8 13-Feb-2001  bjh21 Move cpu_coredump() from arm32/arm32/vm_machdep.c to arm/arm/vm_machdep_arm.c.
Also ANSIfy it and use it on arm26.
 1.7 13-Feb-2001  bjh21 Move sendsig() and sys___sigreturn14() from arm26/arm26/vm_machdep.c and
arm32/arm32/machdep.c into arm/arm/sig_machdep.c, merging and ANSIfying in
the process.

The code is based on the arm32 version, so I don't think anything should break
there.
 1.6 11-Feb-2001  bjh21 branches: 1.6.2;
Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it. This should
reduce code size a little.
 1.5 13-Jan-2001  bjh21 Separate out sigcode into its own file, since it's shared by arm26 and arm32.
 1.4 12-Jan-2001  bjh21 Move db_disasm.c into sys/arch/arm/arm. Use arm26 version, since it should
generate smaller compiled code.
 1.3 12-Jan-2001  bjh21 Move the generic ARM disassembler from arm32/arm32 to arm/arm.
 1.2 11-Jan-2001  bjh21 Start merging actual code in arm32 and arm26:
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c

Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
 1.1 10-Jan-2001  bjh21 Empty file to keep config happy.
 1.6.2.4 23-Apr-2001  bouyer Sync with HEAD.
 1.6.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.6.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.6.2.1 11-Feb-2001  bouyer file files.arm was added on branch thorpej_scsipi on 2001-03-12 13:27:21 +0000
 1.17.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.17.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.33.2.7 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.33.2.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.33.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.33.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.33.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.33.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.33.2.1 03-Aug-2001  lukem update to -current
 1.39.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.40.2.11 03-Jan-2003  thorpej Sync with HEAD.
 1.40.2.10 11-Nov-2002  nathanw Catch up to -current
 1.40.2.9 13-Aug-2002  nathanw Catch up to -current.
 1.40.2.8 01-Aug-2002  nathanw Catch up to -current.
 1.40.2.7 20-Jun-2002  nathanw Catch up to -current.
 1.40.2.6 17-Apr-2002  nathanw Catch up to -current.
 1.40.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.40.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.40.2.3 11-Jan-2002  nathanw More catchup.
 1.40.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.40.2.1 10-Nov-2001  nathanw file files.arm was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.60.4.1 18-Nov-2002  he Pull up revision 1.62 (requested by bjh21 in ticket #689):
New and much improved version of copyin(), copyout(), and
kcopy() which works on both 26-bit and 32-bit machines.
 1.60.2.2 30-Aug-2002  gehenna catch up with -current.
 1.60.2.1 21-Jul-2002  gehenna catch up with -current.
 1.63.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.72.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.72.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.72.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.72.2.1 03-Aug-2004  skrll Sync with HEAD
 1.79.2.6 17-Mar-2008  yamt sync with head.
 1.79.2.5 04-Feb-2008  yamt sync with head.
 1.79.2.4 21-Jan-2008  yamt sync with head
 1.79.2.3 03-Sep-2007  yamt sync with head.
 1.79.2.2 26-Feb-2007  yamt sync with head.
 1.79.2.1 21-Jun-2006  yamt sync with head.
 1.81.24.1 21-Feb-2007  snj branches: 1.81.24.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.81.24.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.81.20.1 12-Jan-2007  ad Sync with head.
 1.82.2.2 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.82.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.83.10.2 03-Oct-2007  garbled Sync with HEAD
 1.83.10.1 22-May-2007  matt Update to HEAD.
 1.83.8.2 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.83.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.83.4.1 11-Jul-2007  mjf Sync with head.
 1.83.2.2 15-Jul-2007  ad Sync with head.
 1.83.2.1 27-May-2007  ad Sync with head.
 1.85.12.5 23-Mar-2008  matt sync with HEAD
 1.85.12.4 28-Jan-2008  matt Add arm/arm/softintr.c back. Contents conditionalized on __HAVE_FAST_SOFTINTS
 1.85.12.3 09-Jan-2008  matt sync with HEAD
 1.85.12.2 12-Oct-2007  matt arm11/armv6 changes.
 1.85.12.1 29-Aug-2007  matt Add CPU_ARM11[37]6 which force CPU_ARM11 on. Add cpufunc_asm_armv6.S
 1.85.10.4 21-Mar-2008  chris Sync with head.
 1.85.10.3 27-Jan-2008  chris Sync to HEAD.
 1.85.10.2 20-Jan-2008  chris Sync to HEAD.
 1.85.10.1 01-Jan-2008  chris Sync with HEAD.
 1.85.6.1 28-Feb-2008  rjs Sync with HEAD.
 1.86.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.86.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.89.6.4 17-Jan-2009  mjf Sync with HEAD.
 1.89.6.3 28-Sep-2008  mjf Sync with HEAD.
 1.89.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.89.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.89.2.1 24-Mar-2008  keiichi sync with head.
 1.90.4.5 09-Oct-2010  yamt sync with head
 1.90.4.4 11-Aug-2010  yamt sync with head.
 1.90.4.3 11-Mar-2010  yamt sync with head
 1.90.4.2 04-May-2009  yamt sync with head.
 1.90.4.1 16-May-2008  yamt sync with head.
 1.90.2.1 18-May-2008  yamt sync with head.
 1.91.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.91.6.1 19-Oct-2008  haad Sync with HEAD.
 1.91.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.93.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.93.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.97.4.4 21-Apr-2011  rmind sync with head
 1.97.4.3 05-Mar-2011  rmind sync with head
 1.97.4.2 03-Jul-2010  rmind sync with head
 1.97.4.1 18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.97.2.5 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.97.2.4 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.97.2.3 28-Aug-2010  uebayasi xmd(4) glue for arm.
 1.97.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.97.2.1 28-Apr-2010  uebayasi Initial implemention of bus_space_physload(9) for NetBSD/arm (only i.MX31
for now).
 1.100.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.101.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.102.6.1 18-Feb-2012  mrg merge to -current.
 1.102.2.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.102.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.102.2.2 30-Oct-2012  yamt sync with head
 1.102.2.1 17-Apr-2012  yamt sync with head
 1.103.2.1 09-Aug-2012  jdc branches: 1.103.2.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.103.2.1.2.2 14-Feb-2013  matt Add BUSDMA_COUNTERS option
 1.103.2.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.110.2.5 03-Dec-2017  jdolecek update from HEAD
 1.110.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.110.2.3 23-Jun-2013  tls resync from head
 1.110.2.2 25-Feb-2013  tls resync with head
 1.110.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.120.2.2 18-May-2014  rmind sync with head
 1.120.2.1 28-Aug-2013  rmind sync with head
 1.126.2.1 10-Aug-2014  tls Rebase.
 1.127.2.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.128.2.3 28-Aug-2017  skrll Sync with HEAD
 1.128.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.128.2.1 06-Apr-2015  skrll Sync with HEAD
 1.132.2.1 18-Jul-2017  snj branches: 1.132.2.1.2;
Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.132.2.1.2.1 13-Dec-2017  matt Add a few more Cortex (A35, etc.)
 1.138.2.8 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.138.2.7 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.138.2.6 20-Oct-2018  pgoyette Sync with head
 1.138.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.138.2.4 27-Sep-2018  pgoyette WIP - clean up some of the Makefiles and conf/files stuff for the
netbsd32 modules.
 1.138.2.3 27-Sep-2018  pgoyette (Try to) move the arm-specific compat_netbsd32_machdep stuff to the
arm directory, not in acorn32!

XXX We still need to come back and hook up the _13 and _16 code!
 1.138.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.138.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.139.2.3 21-Apr-2020  martin Sync with HEAD
 1.139.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.139.2.1 10-Jun-2019  christos Sync with HEAD
 1.149.2.3 29-Feb-2020  ad Sync with head.
 1.149.2.2 25-Jan-2020  ad Sync with head.
 1.149.2.1 17-Jan-2020  ad Sync with head.
 1.153.4.1 20-Apr-2020  bouyer Sync with HEAD
 1.13 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.12 19-Sep-2006  he branches: 1.12.8; 1.12.24; 1.12.26; 1.12.28; 1.12.30; 1.12.36;
Convert the NetBSD/cats port to use generic TODR.

This gets rid of the now-unneded "todclock" and "todservice" attributes
from the footbridge device files, which should allow netwinder to build
again after its conversion to generic TODR.

Resulting kernel verified to boot up OK on gxemul (after my recent
fixes of the gxemul package to emulate free-running timers).
 1.11 03-Jan-2003  thorpej branches: 1.11.18; 1.11.48; 1.11.50;
Use the generic irq_dispatch.S
 1.10 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.9 18-Oct-2002  thorpej branches: 1.9.2;
Make sure the footbridge device has the interface attribute.
 1.8 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.7 10-Apr-2002  thorpej G/c FOOTBRIDGE option.
 1.6 28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.5 20-Jun-2001  chris branches: 1.5.2; 1.5.4; 1.5.10;
Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.4 12-Jun-2001  matt Move netwinder_machdep.c to files.netwinder. Eliminate opt_netwinder.h and
use #ifdef netwinder insead. XXX ebsa285_machdep.c should move to the cats
directory and files.cats
 1.3 11-Jun-2001  chris Move defopt FOOTBRIDGE to where it really should be in files.footbridge, which is where I should have left it.
 1.2 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.1 23-May-2001  chris Add a files.footbridge for inclusion by cats and netwinder. This is to make moving of the footbridge dir easier (when it eventually moves from arm32)

Also remove EBSA285 defopt from the netwinder file as the netwinder isn't an eval board.
 1.5.10.6 03-Jan-2003  thorpej Sync with HEAD.
 1.5.10.5 11-Nov-2002  nathanw Catch up to -current
 1.5.10.4 18-Oct-2002  thorpej Sync with HEAD.
 1.5.10.3 17-Apr-2002  nathanw Catch up to -current.
 1.5.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.10.1 20-Jun-2001  nathanw file files.footbridge was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.5.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.11.50.1 22-Oct-2006  yamt sync with head
 1.11.48.1 18-Nov-2006  ad Sync with head.
 1.11.18.2 07-Dec-2007  yamt sync with head
 1.11.18.1 30-Dec-2006  yamt sync with head.
 1.12.36.1 08-Dec-2007  mjf Sync with HEAD.
 1.12.30.1 09-Jan-2008  matt sync with HEAD
 1.12.28.3 01-Jan-2008  chris Make branch build again following sync to head.
 1.12.28.2 01-Jan-2008  chris Sync with HEAD.
 1.12.28.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.12.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.12.24.1 26-Dec-2007  rjs Sync with HEAD.
 1.12.8.1 03-Dec-2007  ad Sync with HEAD.
 1.6 08-Jan-2007  ichiro branches: 1.6.20;
move devices entry to MD/conf/files.*
catch up to current kernel configuration
 1.5 14-Apr-2003  rjs branches: 1.5.18; 1.5.48;
Remove membase and memsize device config parameters.
 1.4 19-Jul-2002  ichiro make compile "IPAQ"
 1.3 16-Apr-2002  thorpej branches: 1.3.2;
* Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
the magic "files include order" dance in N machine-dependent
configuration definitions.
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Remove unused LCD definitions.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.3 01-Aug-2002  nathanw Catch up to -current.
 1.2.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.6.1 30-Jul-2001  nathanw file files.sa11x0 was added on branch nathanw_sa on 2002-06-20 03:38:07 +0000
 1.3.2.1 21-Jul-2002  gehenna catch up with -current.
 1.5.48.1 12-Jan-2007  ad Sync with head.
 1.5.18.1 26-Feb-2007  yamt sync with head.
 1.6.20.1 06-Oct-2007  rjs Switch to new interrupt code.
 1.3 10-Nov-2001  thorpej branches: 1.3.2;
This file is not used.
 1.2 05-Sep-2001  matt branches: 1.2.4; 1.2.6;
Add an obio bus.
 1.1 26-Aug-2001  matt files file for xscale (i80312 aka iopxs)
 1.2.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.4.1 05-Sep-2001  thorpej file files.xscale was added on branch kqueue on 2001-09-13 01:13:08 +0000
 1.3.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.5 23-Aug-2015  uebayasi Don't need to specify OUTPUT_FORMAT/OUTPUT_ARCH.
 1.4 01-Sep-2012  matt branches: 1.4.2; 1.4.16;
Add missing ;
 1.3 29-Aug-2012  matt Add __stub_start and __stub_end symbols.
 1.2 11-Dec-2005  christos branches: 1.2.98; 1.2.114; 1.2.122;
merge ktrace-lwp.
 1.1 13-Sep-2004  chs branches: 1.1.2; 1.1.4;
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.4.4 22-Sep-2004  skrll Fix.
 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 13-Sep-2004  skrll file kern.ldscript.head was added on branch ktrace-lwp on 2004-09-18 14:32:23 +0000
 1.1.2.2 13-Sep-2004  tron Pull up revision 1.1 (requested by chs in ticket #843):
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.2.1 13-Sep-2004  tron file kern.ldscript.head was added on branch netbsd-2-0 on 2004-09-13 17:32:39 +0000
 1.2.122.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.114.1 30-Oct-2012  yamt sync with head
 1.2.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.16.1 22-Sep-2015  skrll Sync with HEAD
 1.4.2.1 03-Dec-2017  jdolecek update from HEAD
 1.4 30-Jan-2014  matt Put EHABI exception tables at the end of text.
provide __exidx_start and __exidx_end symbols.
 1.3 24-Dec-2013  matt Make sure _edata is aligned to a 8-byte boundary.
 1.2 11-Dec-2005  christos branches: 1.2.98; 1.2.114; 1.2.124; 1.2.130;
merge ktrace-lwp.
 1.1 13-Sep-2004  chs branches: 1.1.2; 1.1.4;
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.4.4 22-Sep-2004  skrll Fix.
 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 13-Sep-2004  skrll file kern.ldscript.tail was added on branch ktrace-lwp on 2004-09-18 14:32:23 +0000
 1.1.2.2 13-Sep-2004  tron Pull up revision 1.1 (requested by chs in ticket #843):
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.2.1 13-Sep-2004  tron file kern.ldscript.tail was added on branch netbsd-2-0 on 2004-09-13 17:32:39 +0000
 1.2.130.1 18-May-2014  rmind sync with head
 1.2.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.114.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.42 29-Jun-2021  nia Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
 1.41 04-Apr-2020  jdolecek branches: 1.41.8;
mark nsmb major obsolete
 1.40 29-Jan-2020  maya remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.
 1.39 28-Jan-2019  dholland branches: 1.39.6;
Systematize handling of removed drivers.

- Every driver that was removed and whose number hasn't already been
reused is now listed with a commented-out "obsolete" line.
- The format of these has been systematized. Future format changes can
probably be safely done with a script.
- This does not include a few cases of assignments that only lasted a
couple days, or stuff from before major reorgs. Some of these may
be included nonetheless, because there was a lot of ground to cover
and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
 1.38 23-Sep-2018  maxv Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
 1.37 23-Apr-2015  pgoyette branches: 1.37.16; 1.37.18;
Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components.
 1.36 23-Jan-2015  hkenken Initial Zynq (Xilinx) support
Add support for ZedBoard evaluation board and Parallella board.
* cemac(4) Cadence EMAC/GEM(Gigabit) Ethernet Controller driver
based on at91emac
 1.35 16-Apr-2014  matt branches: 1.35.2; 1.35.4;
Add ctcom
 1.34 28-Jan-2013  jmcneill branches: 1.34.2; 1.34.10;
reserve char 111 for vchiq
 1.33 30-Jun-2011  wiz branches: 1.33.2; 1.33.12;
dependant -> dependent
 1.32 30-Nov-2010  bsh define major device number for UARTs on i.MX SoCs
 1.31 06-Mar-2010  plunky branches: 1.31.2;
use a MI major number for uhso(4) driver
(requested by mrg)
 1.30 06-Mar-2010  plunky add major device for usho(4) driver
 1.29 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.28 31-Dec-2007  ad branches: 1.28.6; 1.28.10; 1.28.16; 1.28.18; 1.28.24;
Remove systrace. Ok core@.
 1.27 24-Nov-2006  wiz branches: 1.27.24; 1.27.28; 1.27.30; 1.27.36; 1.27.38; 1.27.44;
s/independant/independent/, from Zafer.
 1.26 28-Feb-2006  scw branches: 1.26.14; 1.26.16;
Include "device-major sysmon" when sysmon_power is defined.
 1.25 11-Dec-2005  christos branches: 1.25.2; 1.25.4; 1.25.6;
merge ktrace-lwp.
 1.24 17-Sep-2005  yamt make VMSWAP optional again.
 1.23 31-Jul-2005  yamt revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
 1.22 30-Jul-2005  yamt defflag VMSWAP.
 1.21 10-May-2005  jdolecek branches: 1.21.2;
assign major for nsmb(4)
 1.20 14-Feb-2005  briggs twe doesn't get a block device.
 1.19 12-Feb-2005  briggs Add twe.
 1.18 08-Jan-2005  joff branches: 1.18.2; 1.18.4;
Add tslcd device
 1.17 22-Dec-2004  joff char major 107 to ep93xx processor UART driver epcom
 1.16 25-Jan-2004  bjh21 Remove mentions of "beep" driver.
 1.15 10-Dec-2003  jmc Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
 1.14 24-Oct-2003  jdolecek add necessary majors for miscellaneous devices, such as missing
wscons/scsi/isdn devices
 1.13 10-Oct-2003  jdolecek reassing majors for crypto and pf to use the newly defined MI major
range
 1.12 10-Oct-2003  jdolecek update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
 1.11 05-Oct-2003  jdolecek Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
 1.10 30-Sep-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.
 1.9 22-Aug-2003  itojun create /dev/crypto
 1.8 27-Jul-2003  itojun reserve cdev major # for PF. ok'ed by technical-exec
 1.7 25-Apr-2003  ragge branches: 1.7.2;
Add ksyms device major.
 1.6 31-Dec-2002  thorpej Fix sysmon entry.
 1.5 20-Nov-2002  bsh add a device.

sscom is a driver for built-in UART of Samsung S3C2800/24[01]0 CPU.
driver code is arch/arm/s3c2xx0/sscom.c
 1.4 04-Oct-2002  elric branches: 1.4.2;
assign majors for raw and cooked cgd's.
 1.3 16-Sep-2002  manu branches: 1.3.2;
Initial APM support (enough to get battery level)
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 16-May-2002  gehenna branches: 1.1.2;
file majors.arm32 was initially added on branch gehenna-devsw.
 1.1.2.6 29-Aug-2002  gehenna catch up with -current. (change char major ixpcom, add sysmon, dmoverio).
 1.1.2.5 21-Jul-2002  gehenna catch up with -current.
 1.1.2.4 16-Jul-2002  gehenna catch up with -current.
 1.1.2.3 14-Jul-2002  gehenna catch up with -current.
 1.1.2.2 30-May-2002  gehenna Add $NetBSD$
 1.1.2.1 16-May-2002  gehenna Add the list of block/character majors.
 1.3.2.5 03-Jan-2003  thorpej Sync with HEAD.
 1.3.2.4 11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.3.2.1 16-Sep-2002  nathanw file majors.arm32 was added on branch nathanw_sa on 2002-09-17 21:13:25 +0000
 1.4.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.1 04-Oct-2002  jdolecek file majors.arm32 was added on branch kqueue on 2002-10-10 18:31:46 +0000
 1.7.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.5 15-Feb-2005  skrll Sync with HEAD.
 1.7.2.4 17-Jan-2005  skrll Sync with HEAD.
 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.18.4.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.18.4.1 12-Feb-2005  yamt sync with head.
 1.18.2.1 29-Apr-2005  kent sync with -current
 1.21.2.3 21-Jan-2008  yamt sync with head
 1.21.2.2 30-Dec-2006  yamt sync with head.
 1.21.2.1 21-Jun-2006  yamt sync with head.
 1.25.6.1 22-Apr-2006  simonb Sync with head.
 1.25.4.1 09-Sep-2006  rpaulo sync with head
 1.25.2.1 01-Mar-2006  yamt sync with head.
 1.26.16.1 10-Dec-2006  yamt sync with head.
 1.26.14.1 12-Jan-2007  ad Sync with head.
 1.27.44.1 02-Jan-2008  bouyer Sync with HEAD
 1.27.38.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.27.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.27.30.1 09-Jan-2008  matt sync with HEAD
 1.27.28.1 01-Jan-2008  chris Sync with HEAD.
 1.27.24.1 28-Feb-2008  rjs Sync with HEAD.
 1.28.24.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.28.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.28.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.28.10.1 04-May-2009  yamt sync with head.
 1.28.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.31.2.1 05-Mar-2011  rmind sync with head
 1.33.12.3 03-Dec-2017  jdolecek update from HEAD
 1.33.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.12.1 25-Feb-2013  tls resync with head
 1.33.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.34.10.1 10-Aug-2014  tls Rebase.
 1.34.2.1 18-May-2014  rmind sync with head
 1.35.4.2 06-Jun-2015  skrll Sync with HEAD
 1.35.4.1 06-Apr-2015  skrll Sync with HEAD
 1.35.2.1 11-May-2015  msaitoh Pull up following revision(s) (requested by nonaka in ticket #751):
sys/arch/arm/zynq/zynq_axi.c: revision 1.1
sys/arch/evbarm/conf/files.zynq: revision 1.1
sys/arch/arm/zynq/zynq_uart.c: revision 1.1
sys/arch/evbarm/zynq/genassym.cf: revision 1.1
sys/arch/evbarm/zynq/zynq_start.S: revision 1.1
sys/arch/arm/zynq/zynq_slcrreg.h: revision 1.1
sys/arch/arm/zynq/zynq_usbreg.h: revision 1.1
sys/arch/arm/zynq/zynq7000_uart.c: revision 1.1
sys/arch/arm/zynq/zynq7000_sdhc.c: revision 1.1
sys/arch/arm/zynq/zynq_slcrvar.h: revision 1.1
sys/arch/arm/zynq/zynq_usbvar.h: revision 1.1
sys/arch/evbarm/conf/PARALLELLA_INSTALL: revision 1.1
sys/arch/arm/zynq/zynq_uartreg.h: revision 1.1
sys/arch/evbarm/zynq/platform.h: revision 1.1
sys/arch/evbarm/conf/mk.zynq: revision 1.1
sys/arch/evbarm/conf/files.zedboard: revision 1.1
sys/arch/arm/zynq/zynq7000_usb.c: revision 1.1
sys/dev/cadence/if_cemacvar.h: revision 1.1
sys/arch/arm/zynq/files.zynq: revision 1.1
sys/arch/arm/zynq/zynq_slcr.c: revision 1.1
sys/arch/arm/zynq/zynq7000_intr.h: revision 1.1
sys/arch/arm/conf/majors.arm32: revision 1.36
sys/arch/arm/zynq/zynq_uartvar.h: revision 1.1
sys/arch/evbarm/conf/files.parallella: revision 1.1
sys/arch/arm/zynq/zynq_space.c: revision 1.1
sys/dev/cadence/if_cemac.c: revision 1.1
sys/arch/evbarm/conf/PARALLELLA: revision 1.1
sys/arch/arm/zynq/zynq7000_board.c: revision 1.1
sys/arch/evbarm/Makefile: revision 1.10
sys/arch/evbarm/zynq/zynq_machdep.c: revision 1.1
sys/arch/arm/zynq/zynq7000_reg.h: revision 1.1
sys/arch/evbarm/conf/ZEDBOARD: revision 1.1
sys/dev/cadence/cemacreg.h: revision 1.1
sys/arch/evbarm/conf/std.zynq: revision 1.1
sys/arch/arm/zynq/zynq_dma.c: revision 1.1
sys/arch/arm/zynq/zynq_cemac.c: revision 1.1
sys/arch/arm/zynq/zynq7000_var.h: revision 1.1
sys/arch/evbarm/conf/ZEDBOARD_INSTALL: revision 1.1
sys/arch/arm/zynq/zynq_usb.c: revision 1.1
Initial Zynq (Xilinx) support
Add support for ZedBoard evaluation board and Parallella board.
* cemac(4) Cadence EMAC/GEM(Gigabit) Ethernet Controller driver
based on at91emac
 1.37.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.37.18.1 10-Jun-2019  christos Sync with HEAD
 1.37.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.39.6.1 29-Feb-2020  ad Sync with head.
 1.41.8.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3 04-Mar-2007  tsutsui Move mkldscript.sh, which is used to create ldscript dynamically to
merge link_set_* sections into the text section for a.out kernels,
from sys/arch/arm/conf/ to sys/conf/ since there is no ARM specific
stuff in it and other ports would share it.
 1.2 11-Dec-2005  christos branches: 1.2.26;
merge ktrace-lwp.
 1.1 13-Sep-2004  chs branches: 1.1.2; 1.1.4; 1.1.16;
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.16.1 03-Sep-2007  yamt sync with head.
 1.1.4.4 22-Sep-2004  skrll Fix.
 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 13-Sep-2004  skrll file mkldscript.sh was added on branch ktrace-lwp on 2004-09-18 14:32:23 +0000
 1.1.2.2 13-Sep-2004  tron Pull up revision 1.1 (requested by chs in ticket #843):
work around a binutils bug where converting ELF kernels to a.out with objcopy
produces corrupted binaries when the link_set_* sections extend into another
page after the end of the .text section by using a generated an ldscript that
puts all the link_set_* data into the .text section in the first place.
 1.1.2.1 13-Sep-2004  tron file mkldscript.sh was added on branch netbsd-2-0 on 2004-09-13 17:32:39 +0000
 1.2.26.2 17-May-2007  yamt fix a merge botch.
 1.2.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.5 18-Dec-2017  skrll Generalise FDT and OFW
 1.4 15-Dec-2017  christos we always need the fdt option now, defined or not.
 1.3 16-Feb-2015  skrll Re-enable CPI_IN_CKSUM now the bugs are fixed.
 1.2 30-Jan-2015  joerg Disable ARM's CPU_IN_CKSUM until the bugs are fixed.
 1.1 27-Jan-2008  chris branches: 1.1.2; 1.1.4; 1.1.6; 1.1.14; 1.1.16; 1.1.82; 1.1.84;
Add an arm/conf/std.arm file which contains common arm options, initially
just options CPU_IN_CKSUM.

Include std.arm in all arm platform std files.

This should reenable the asm in_cksum code for all arm platforms.

Also remove the now unused in_cksum_arm.S.
 1.1.84.1 06-Apr-2015  skrll Sync with HEAD
 1.1.82.2 16-Feb-2015  martin Pull up following revision(s) (requested by skrll in ticket #522):
sys/arch/arm/conf/std.arm: revision 1.3
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.9
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.10
sys/arch/arm/arm/cpu_in_cksum.S: revision 1.11
Fix conditional; makes 0 len mbuf, 0 offset, 0 len test work.
-
Correct arm_cksumdata for <4 bytes of data
Really fix arm_cksumdata for <4 bytes of data
-
Re-enable CPU_IN_CKSUM now the bugs are fixed.
 1.1.82.1 04-Feb-2015  snj Pull up following revision(s) (requested by joerg in ticket #475):
sys/arch/arm/conf/std.arm: revision 1.2
Disable ARM's CPU_IN_CKSUM until the bugs are fixed.
 1.1.16.2 23-Mar-2008  matt sync with HEAD
 1.1.16.1 27-Jan-2008  matt file std.arm was added on branch matt-armv6 on 2008-03-23 02:03:55 +0000
 1.1.14.2 28-Feb-2008  rjs Sync with HEAD.
 1.1.14.1 27-Jan-2008  rjs file std.arm was added on branch hpcarm-cleanup on 2008-02-28 21:58:52 +0000
 1.1.6.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.6.1 27-Jan-2008  mjf file std.arm was added on branch mjf-devfs on 2008-02-18 21:04:22 +0000
 1.1.4.2 04-Feb-2008  yamt sync with head.
 1.1.4.1 27-Jan-2008  yamt file std.arm was added on branch yamt-lazymbuf on 2008-02-04 09:21:45 +0000
 1.1.2.2 27-Jan-2008  chris Sync to HEAD.
 1.1.2.1 27-Jan-2008  chris file std.arm was added on branch chris-arm-intr-rework on 2008-01-27 13:08:37 +0000
 1.59 18-May-2019  skrll Convert remaining armv7 kernels to generic start and remove a bunch of
code including a9_mpsubr.S.

Thanks to Lwazi Dube for testing PANDABOARD and BEAGLEBONE.
 1.58 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.57 27-Jun-2018  ryo branches: 1.57.2;
on evbarm/RPI,RPI2, VERBOSE_INIT_ARM had broken.

XPUTC() of evbarm/rpi/rpi*_start.S uses bcm283[567]_platform_early_putchar() and it requires stack.
fixed to allocate stack when starting from rpi*_start.S and a9_mpsubr.S if needed.

to work XPUTC(), need to define VERBOSE_INIT_ARM and EARLYCONS option.
 1.56 27-Jun-2018  ryo keep stack pointer even if chainging CPU mode.
 1.55 18-Jan-2018  skrll branches: 1.55.2;
Use r0 in the tlbiall instruction to avoid confusion.

From Ramakrishna Rao Desetti
 1.54 10-Dec-2017  skrll FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.53 10-Nov-2017  matt Add #define CPU_CORTEDVIRT to reduce copied complex ifdef.
Shrink HYP test
 1.52 04-Nov-2017  skrll Ensure CNTVOFF is 0 before dropping out of Hyp mode
CVS ----------------------------------------------------------------------
 1.51 22-Sep-2017  skrll Typo
 1.50 06-Sep-2017  jmcneill Clear TEX Remap Enable in SCTLR. U-Boot with CONFIG_ARMV8_SWITCH_TO_EL1
sets it since it is RES1 when TTBCR.EAE=1, but we are still using the
short descriptor format and don't currently support TEX remap.

ok skrll@
 1.49 24-Jul-2017  joerg Replace assembler flags with .arch* annotation.
 1.48 05-Jul-2017  skrll Make fp 0 on entry to idle_stack to ensure we mark that we're top of
stack
 1.47 04-Oct-2016  kiyohara branches: 1.47.8;
Don't touch ACTLR on CORTEX A9, if ACTLR.SMP=1. like Linux.
Tested on Gumstix DuoVero(OMAP 4430).
 1.46 19-Dec-2015  skrll branches: 1.46.2;
Deal with kernel builds where virtualisation isn't available
 1.45 17-Dec-2015  skrll Check for hypervisor mode in cortex_init and exit if the cpu started
there.

Needed by latest RPI firmware.
 1.44 25-Nov-2015  skrll G/C TEGRAK1_PMAP_WORKAROUND.

Using XN (eXecute Never) properly means speculative reads from devices
aren't done. Pretty sure this was the cause of the wedges.
 1.43 15-Oct-2015  skrll Setting actlr.bit15=1 (Force in order issue in the branch execution unit)
makes my jetson tk1 stable. Apply this workaround until we figure out
what the real problem is.
 1.42 09-Jun-2015  skrll Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@
 1.41 31-May-2015  matt Add CALL macro to hide ugliness of calling when KERNEL_BASE_VOFFSET is non-0
 1.40 30-May-2015  matt Call armv7_dcache_l1inv_all in mpstart
Make sure ACTRL<31> is set on A15 with 3+ cores.
 1.39 28-May-2015  matt A15 change for > 2 cores.
 1.38 17-May-2015  matt Add a missing defined(CORTEX_A15)
 1.37 15-May-2015  skrll Make sure TLB is invalidated and ACTLR.SMP is set on ARM A15. ACTLR.SMP
enables the processor to receive instruction cache, BTB and TLB main-
tenance operations from other processors
 1.36 03-May-2015  matt On secondary cores, invalidate the caches to make them clean.
 1.35 27-Apr-2015  skrll Remove unused label
 1.34 27-Apr-2015  skrll ARM spells the System Control Register SCTLR
 1.33 26-Apr-2015  jmcneill isb between TTBCR write and TLBIALL
 1.32 20-Apr-2015  jmcneill Restore "#if !defined(CPU_CORTEXA5)" accidentally removed in previous
commit -- hi skrll@
 1.31 18-Apr-2015  skrll Use character constants instead of ascii values for readability
 1.30 04-Mar-2015  skrll Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.

RPI2 nows works well with only the boot cpu.
 1.29 27-Feb-2015  jmcneill skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
 1.28 07-Feb-2015  jmcneill According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
 1.27 07-Feb-2015  jmcneill make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
 1.26 02-Dec-2014  matt Fix CORTEXA17 support
 1.25 02-Dec-2014  matt Add Cortex-A17 support
 1.24 25-Sep-2014  ryo branches: 1.24.2;
Always set CORTEXA9_AUXCTL_SMP on the CortexA9 as well as A7
 1.23 16-Sep-2014  matt Always set SMP on the A7 since it's needed for ldrex/strex
 1.22 16-Sep-2014  matt Enable L2 prefetch on A9 if MP
 1.21 15-Sep-2014  skrll Don't set CORTEXA9_AUXCTL_FW on A7. It's undefined.

Misc. cleanup while I'm here.
 1.20 15-Sep-2014  ryo fix to invalidate all way of own processor
 1.19 15-Sep-2014  matt Make sure to read SCTRL no matter way CPU we are on.
 1.18 21-May-2014  ozaki-r branches: 1.18.2;
Fix wrong instruction; mrc => mcr
 1.17 11-Apr-2014  matt whitespace cleanup
 1.16 11-Apr-2014  matt Simplify calls into .text by using KERNEL_BASE_VOFFSET.
 1.15 10-Apr-2014  skrll Fix a typo - it's "#define". Use defined(foo) rather than just foo in
preprocessor conditional.

ok matt@
 1.14 30-Mar-2014  matt branches: 1.14.2;
Improve MP startup code. We now use a two stage startup, after creating
the initial L1PT and turning on the MMU/caches, we spinup the secondary CPUs
waiting for them to get the same state as the boot processor. Once the
real L1PT is initialized and used, the secondary CPUs are kicked so they can
use it (and the initial L1PT is discarded). Finally, wait until NetBSD
kicks the secondary CPUs then load the stack from the idlelwp and then hatch
the cpu and then jump to idle_loop.
 1.13 21-Feb-2014  matt Rework PIC method to be simplier. Change be more cortex neutral.
 1.12 24-Jan-2014  matt branches: 1.12.2;
Deal with writing bswapped com registers at COM_MULT register widths.
 1.11 26-Dec-2013  joerg dsb is preferred for post-armv7 CPUs.
 1.10 12-Nov-2013  matt Deal with ARM32_DISABLE_ALIGNMENT_FAULTS
 1.9 07-Sep-2013  matt Remove brain fart with TTBCR
 1.8 05-Aug-2013  matt Turn on CPU_CONTROL_EX_BEND for big endian in exceptions,
not CPU_CONTROL_BEND_ENABLE.
 1.7 04-Aug-2013  matt Make sure CPU_CONTROL_BEND_ENABLE is set on BE systems.
 1.6 20-Jun-2013  matt branches: 1.6.2;
Set caching bits on the TTBR for ARMv7
Make sure TTCR is 0
 1.5 17-Jun-2013  matt Make this a little more generic.
Make sure to turn on branch prediction.
 1.4 28-Nov-2012  matt Make these compile with gcc4.1 and binutils 2.16
 1.3 05-Sep-2012  matt branches: 1.3.2; 1.3.4; 1.3.6;
Force TTBCR to 0
 1.2 02-Sep-2012  matt Cleanup and bring forwards from bcm53xx_start.S
Use more symbolic names ...
 1.1 01-Sep-2012  matt Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.3.6.3 12-Mar-2013  matt Busy wait in a WFI loop until told to exit.
 1.3.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.6.1 05-Sep-2012  matt file a9_mpsubr.S was added on branch matt-nb6-plus on 2012-11-28 22:40:25 +0000
 1.3.4.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.3.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.3.4.2 30-Oct-2012  yamt sync with head
 1.3.4.1 05-Sep-2012  yamt file a9_mpsubr.S was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.3.2.4 03-Dec-2017  jdolecek update from HEAD
 1.3.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.2 23-Jun-2013  tls resync from head
 1.3.2.1 25-Feb-2013  tls resync with head
 1.6.2.2 18-May-2014  rmind sync with head
 1.6.2.1 28-Aug-2013  rmind sync with head
 1.12.2.6 27-Mar-2014  matt Don't = since that isn't BE8 friendly
 1.12.2.5 26-Mar-2014  matt flush the icache after enabling the SCU
 1.12.2.4 24-Mar-2014  matt Allow A7 to use this.
 1.12.2.3 20-Feb-2014  matt Use right register when setting ttbr
 1.12.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.2.1 24-Jan-2014  matt file a9_mpsubr.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.18.2.6 03-Dec-2017  snj Pull up following revision(s) (requested by skrll in ticket #1524):
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.52
Ensure CNTVOFF is 0 before dropping out of Hyp mode
 1.18.2.5 08-Jul-2017  snj Pull up following revision(s) (requested by skrll in ticket #1444):
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.48
Make fp 0 on entry to idle_stack to ensure we mark that we're top of
stack
 1.18.2.4 26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.18.2.3 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.18.2.2 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.18.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.24.2.6 28-Aug-2017  skrll Sync with HEAD
 1.24.2.5 05-Dec-2016  skrll Sync with HEAD
 1.24.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.24.2.3 22-Sep-2015  skrll Sync with HEAD
 1.24.2.2 06-Jun-2015  skrll Sync with HEAD
 1.24.2.1 06-Apr-2015  skrll Sync with HEAD
 1.46.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.47.8.3 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.47.8.2 17-Nov-2017  martin Pull up following revision(s) (requested by skrll in ticket #351):
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.52
Ensure CNTVOFF is 0 before dropping out of Hyp mode
 1.47.8.1 06-Jul-2017  martin branches: 1.47.8.1.2;
Pull up following revision(s) (requested by skrll in ticket #99):
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.48
Make fp 0 on entry to idle_stack to ensure we mark that we're top of
stack
 1.47.8.1.2.1 13-Dec-2017  matt Add Cortex-A35 and make VIRT support simplier
 1.55.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.55.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.57.2.1 10-Jun-2019  christos Sync with HEAD
 1.3 05-Nov-2022  jmcneill Handle speed change events
 1.2 14-Aug-2019  skrll branches: 1.2.2; 1.2.10;
Various fixes / changes

- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!

Thanks to jmcneill@ for proving I'm an idiot
 1.1 10-Aug-2019  skrll Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 14-Aug-2019  martin file a9ptmr.c was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.2.2.2 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.2.2.1 14-Aug-2019  martin file a9ptmr.c was added on branch netbsd-9 on 2019-08-15 09:49:49 +0000
 1.2 05-Nov-2022  jmcneill Handle speed change events
 1.1 10-Aug-2019  skrll branches: 1.1.2; 1.1.10;
Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 10-Aug-2019  martin file a9ptmr_var.h was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.1.2.2 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.1.2.1 10-Aug-2019  martin file a9ptmr_var.h was added on branch netbsd-9 on 2019-08-15 09:49:49 +0000
 1.22 03-Mar-2022  riastradh arm: Use device_set_private for various drivers.
 1.21 02-Dec-2020  wiz comparision -> comparison
 1.20 11-Jun-2019  skrll branches: 1.20.10;
Trailing whitespace
 1.19 22-Nov-2018  aymeric Switch the DE0 Nano SoC to the GENERIC kernel.
 1.18 28-Oct-2018  aymeric Enable the global timer at attach time, it ensures that delay() works.
 1.17 14-Oct-2018  aymeric Remove comment that the peripherals clock should be half of the cpu clock.
NFC
 1.16 20-Jun-2018  hkenken branches: 1.16.2;
Use mpcaa_off1 parameter for mapping subregion.
 1.15 05-Jun-2018  hkenken Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.14 24-Jul-2015  ryo branches: 1.14.16;
KNF
 1.13 24-Jul-2015  ryo - fix sc_ev_missing_ticks over-counting.
- don't use 64bit division, because it has expensive cost on gcc/arm
whether it is a constant or not.

'delta' is usually taken a value around sc_autoinc depending on timing
of read. therefore 'delta / sc->sc_autoinc' would be count too much.
 1.12 04-Mar-2015  jmcneill print "A5" instead of "A9" at attach time if running on a Cortex-A5
 1.11 27-Feb-2015  jmcneill match on Cortex-A5
 1.10 08-Jan-2015  hkenken fix typo
 1.9 02-Jan-2015  jmcneill detach and re-attach timecounter when updating freq, and reinit timer on each cpu
 1.8 02-Jan-2015  jmcneill add a helper to update a9tmr frequency
 1.7 28-Mar-2014  matt branches: 1.7.4; 1.7.6;
Mark interrupt as MPSAFE.
 1.6 20-Jun-2013  matt branches: 1.6.2; 1.6.6;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.5 12-Jun-2013  matt Don't attach a9tmr if the CPU supports the generic timer.
 1.4 29-Nov-2012  matt Make sure we enable the timer since CFE doesn't enable it by default.
 1.3 27-Sep-2012  matt branches: 1.3.2; 1.3.4;
Don't bother dealing with "extra" ticks, just count them.
 1.2 14-Sep-2012  matt Set dv_private, use a9tmr_private.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.2.5 03-Dec-2017  jdolecek update from HEAD
 1.1.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.3 23-Jun-2013  tls resync from head
 1.1.2.2 25-Feb-2013  tls resync with head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.3 29-Nov-2012  matt Sync with HEAD.
 1.3.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.4.1 27-Sep-2012  matt file a9tmr.c was added on branch matt-nb6-plus on 2012-11-28 22:40:25 +0000
 1.3.2.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.3.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 27-Sep-2012  yamt file a9tmr.c was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.6.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.6.1 20-Jun-2013  matt file a9tmr.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.6.2.1 18-May-2014  rmind sync with head
 1.7.6.2 22-Sep-2015  skrll Sync with HEAD
 1.7.6.1 06-Apr-2015  skrll Sync with HEAD
 1.7.4.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.14.16.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.14.16.2 20-Oct-2018  pgoyette Sync with head
 1.14.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.16.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.2.1 10-Jun-2019  christos Sync with HEAD
 1.20.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1 01-Sep-2012  matt branches: 1.1.4; 1.1.6; 1.1.16;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file a9tmr_intr.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file a9tmr_intr.h was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file a9tmr_intr.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.3 02-Oct-2021  skrll Trailing whitespace
 1.2 27-Jul-2019  skrll Rename a register define to make it more obvious it's watchdog only
 1.1 01-Sep-2012  matt branches: 1.1.4; 1.1.6; 1.1.16; 1.1.46;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file a9tmr_reg.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file a9tmr_reg.h was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file a9tmr_reg.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.7 10-Aug-2019  skrll Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.6 20-Jun-2018  hkenken branches: 1.6.2; 1.6.6;
Use mpcaa_off1 parameter for mapping subregion.
 1.5 05-Jun-2018  hkenken Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.4 02-Jan-2015  jmcneill branches: 1.4.16;
add a helper to update a9tmr frequency
 1.3 20-Jun-2013  matt branches: 1.3.6; 1.3.10; 1.3.12;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.2 27-Sep-2012  matt branches: 1.2.2; 1.2.4;
Don't bother dealing with "extra" ticks, just count them.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.2.3 03-Dec-2017  jdolecek update from HEAD
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.4.1 27-Sep-2012  matt file a9tmr_var.h was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.2.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.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 27-Sep-2012  yamt file a9tmr_var.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.3.12.1 06-Apr-2015  skrll Sync with HEAD
 1.3.10.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.3.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.6.1 20-Jun-2013  matt file a9tmr_var.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.4.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.6.6.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.6.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 10-Aug-2019  skrll Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.9 10-Aug-2019  skrll spaces to tab
 1.8 30-Jul-2019  skrll branches: 1.8.2;
Fix loop to calculate prescaler divisor.
 1.7 29-Dec-2017  skrll branches: 1.7.4;
Trailing whitespace
 1.6 29-Dec-2017  skrll Set attached to true when attach completes.

Reported by Ramakrishna Rao Desetti on port-arm
 1.5 04-Oct-2016  kiyohara Register sysmon_wdog.
 1.4 04-Mar-2015  jmcneill branches: 1.4.2;
print "A5" instead of "A9" at attach time if running on a Cortex-A5
 1.3 27-Feb-2015  jmcneill match on Cortex-A5
 1.2 13-Apr-2014  matt branches: 1.2.2; 1.2.4;
write correct register.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16; 1.1.18;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.18.1 10-Aug-2014  tls Rebase.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file a9wdt.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file a9wdt.c was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file a9wdt.c was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 05-Dec-2016  skrll Sync with HEAD
 1.2.4.1 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.4.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.7.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.2.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.20 19-Jun-2025  andvar Add missing RCSIDs.
Fix typo s/btyes/bytes/ in comment.
 1.19 07-Aug-2021  thorpej branches: 1.19.12;
Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 28-Nov-2020  skrll branches: 1.17.2;
Fix build
 1.16 29-Sep-2020  jmcneill branches: 1.16.2;
Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.15 25-Sep-2018  skrll Cortex A5 also uses PPI 27 for timer.

ODROID-C1 boots again.
 1.14 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.13 05-Jun-2018  hkenken branches: 1.13.2;
Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.12 29-Dec-2017  skrll branches: 1.12.2;
Set attached to true when attach completes.

Reported by Ramakrishna Rao Desetti on port-arm
 1.11 26-May-2017  jmcneill branches: 1.11.6;
Recognize Cortex-A57 FPU, GIC, and Generic Timer.
 1.10 02-Apr-2015  matt need to include <sys/lwp.h>
 1.9 28-Feb-2015  skrll Make this compile where gtmr isn't used.
 1.8 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.7 27-Feb-2015  jmcneill allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
 1.6 27-Feb-2015  jmcneill match on Cortex-A5
 1.5 05-Dec-2014  jmcneill Let the "cbar" device property override the cbar value, to work around broken bootloaders
 1.4 20-Jun-2013  matt branches: 1.4.6; 1.4.10; 1.4.12;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.3 16-Jun-2013  matt Add generic timer support (untested)
 1.2 02-Sep-2012  matt branches: 1.2.2; 1.2.4; 1.2.6;
Add driver to attach ARM PL210 L2 Cache Controller
arml2cc0 at armperiph0: ARM PL310 L2 r3p2 Cache Controller
arml2cc0: 256KB/32B 16-way L2 Unified cache
 1.1 01-Sep-2012  matt Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.2.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.1 02-Sep-2012  matt file armperiph.c was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.2.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.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 02-Sep-2012  yamt file armperiph.c was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 23-Jun-2013  tls resync from head
 1.4.12.2 28-Aug-2017  skrll Sync with HEAD
 1.4.12.1 06-Apr-2015  skrll Sync with HEAD
 1.4.10.2 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.4.10.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.4.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.6.1 20-Jun-2013  matt file armperiph.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.11.6.1 13-Dec-2017  matt Add Cortex-A35 devices
 1.12.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.12.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.13.2.1 10-Jun-2019  christos Sync with HEAD
 1.16.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.17.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.19.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 05-Jun-2017  skrll Removed unused file
 1.1 25-Nov-2015  marty branches: 1.1.2; 1.1.12;
something temporary that will go away once odroid xu4 works
 1.1.12.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 25-Nov-2015  skrll file cortex_init.S was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.6 02-Oct-2025  riastradh cpu_in_cksum_asm_neon.S: Nix trailing whitespace.

No functional change intended.
 1.5 19-Jun-2025  andvar Add missing RCSIDs.
Fix typo s/btyes/bytes/ in comment.
 1.4 02-Oct-2021  skrll branches: 1.4.10;
Trailing whitespace
 1.3 22-Dec-2012  matt branches: 1.3.2; 1.3.6; 1.3.14;
Rework considerably. Use alternating sets of registers.
(Still not faster than normal ARM code).
 1.2 18-Dec-2012  matt Tighten up cpu_in_cksum_neon_v4hdr by 3 instructions.
Swap the doubles on a partial qword load on BE platforms.
 1.1 17-Dec-2012  matt Add preliminary version of a NEON based in_cksum routine.
 1.3.14.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.14.1 22-Dec-2012  matt file cpu_in_cksum_asm_neon.S was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.3.6.2 25-Feb-2013  tls resync with head
 1.3.6.1 22-Dec-2012  tls file cpu_in_cksum_asm_neon.S was added on branch tls-maxphys on 2013-02-25 00:28:26 +0000
 1.3.2.2 23-Jan-2013  yamt sync with head
 1.3.2.1 22-Dec-2012  yamt file cpu_in_cksum_asm_neon.S was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.4.10.1 02-Aug-2025  perseant Sync with HEAD
 1.2 19-Jun-2025  andvar Add missing RCSIDs.
Fix typo s/btyes/bytes/ in comment.
 1.1 17-Dec-2012  matt branches: 1.1.2; 1.1.6; 1.1.14; 1.1.80;
Add preliminary version of a NEON based in_cksum routine.
 1.1.80.1 02-Aug-2025  perseant Sync with HEAD
 1.1.14.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.14.1 17-Dec-2012  matt file cpu_in_cksum_neon.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 17-Dec-2012  tls file cpu_in_cksum_neon.c was added on branch tls-maxphys on 2013-02-25 00:28:26 +0000
 1.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 17-Dec-2012  yamt file cpu_in_cksum_neon.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000
 1.17 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.16 10-Aug-2021  jmcneill Make gic_splfuncs optional and disable it by default until it has had
more testing.
 1.15 10-Aug-2021  jmcneill Use custom spl funcs for GIC and avoid unnecessary pmr register accesses
in splx.
 1.14 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.13 14-Oct-2019  jmcneill Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.12 10-Aug-2019  skrll Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.11 12-Nov-2018  jmcneill branches: 1.11.4;
Support building kernels with ACPI and no PCI.
 1.10 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.9 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.8 08-Aug-2018  jmcneill Add GICv3 support.
 1.7 05-Jun-2018  hkenken branches: 1.7.2;
Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.6 28-May-2017  jmcneill branches: 1.6.8;
Move children of armperiph to the "mpcorebus" interface attribute and have
armperiph declare support for it.
 1.5 19-Feb-2014  matt branches: 1.5.6;
Add needs-flag to arml2cc
 1.4 16-Jun-2013  matt branches: 1.4.2; 1.4.6;
Add generic timer support (untested)
 1.3 17-Dec-2012  matt Add preliminary version of a NEON based in_cksum routine.
 1.2 02-Sep-2012  matt branches: 1.2.2; 1.2.4; 1.2.6;
Add driver to attach ARM PL210 L2 Cache Controller
arml2cc0 at armperiph0: ARM PL310 L2 r3p2 Cache Controller
arml2cc0: 256KB/32B 16-way L2 Unified cache
 1.1 01-Sep-2012  matt Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.2.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.1 02-Sep-2012  matt file files.cortex was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.2.4.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.4.3 23-Jan-2013  yamt sync with head
 1.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 02-Sep-2012  yamt file files.cortex was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 25-Feb-2013  tls resync with head
 1.4.6.3 19-Feb-2014  matt arml2cc -> needs-flag
 1.4.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.6.1 16-Jun-2013  matt file files.cortex was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.4.2.1 18-May-2014  rmind sync with head
 1.5.6.1 28-Aug-2017  skrll Sync with HEAD
 1.6.8.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.6.8.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.6.8.1 25-Jun-2018  pgoyette Sync with HEAD
 1.7.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.4.2 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.11.4.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.57 05-Oct-2023  riastradh arm/gic: Check l_blcnt, not l_biglocks.

l_biglocks is a now-defunct temporary storage used only when
sleeping; l_blcnt is the number of kernel locks held by the lwp when
not sleeping.

Should fix arm builds.
 1.56 26-Jun-2022  jmcneill build fix: remove includes of opt_gic.h
 1.55 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.54 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.53 03-Mar-2022  riastradh arm: Use device_set_private for various drivers.
 1.52 02-Jan-2022  riastradh arm: Remove #ifdef DIAGNOSTIC now wrong after KASSERT change.

Objects in question aren't volatile here so access is flushable.
 1.51 21-Oct-2021  skrll Fix some conditionals to match gicv3 and add some comments to describe
what's going on.

Fixes PR port-evbarm/56420
 1.50 26-Sep-2021  jmcneill If an SGI or PPI is established after interrupts are enabled, make sure
we unblock the source on _all_ CPUs and not just the CPU that is
establishing the interrupt.
 1.49 10-Aug-2021  jmcneill Make gic_splfuncs optional and disable it by default until it has had
more testing.
 1.48 10-Aug-2021  jmcneill Use custom spl funcs for GIC and avoid unnecessary pmr register accesses
in splx.
 1.47 28-Mar-2021  skrll Only target the boot cpu for real with SPI interrupts. I tried to do
this back in 2014, but somehow I missed a spot.

This is a quick-and-dirty fix for the USB stack which expects transfer
completions to be in-order. If interrupts happen across the CPUs then
this isn't guaranteed (yet).

kern/55243 panic at usb_transfer_complete() on raspberry pi 4
 1.46 23-Feb-2021  jmcneill branches: 1.46.2;
If we are committing a deferred splhigh() to hardware, no need to continue.
 1.45 21-Feb-2021  jmcneill Apply PMR optimizations from gicv3
 1.44 09-Feb-2021  jakllsch Avoid an extra daif read when dispatching interrupts by using
ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie() / cpsid() macros.
 1.43 03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.42 26-Sep-2020  skrll branches: 1.42.2;
G/C arm/atomic.h
 1.41 27-Jul-2020  jmcneill Remove CPU ID test in armgic_match. Perfectly normal to have GIC in
non-Cortex cores.
 1.40 12-Jul-2020  skrll Avoid undefined behaviour. Detected by KUBSAN.
 1.39 13-Apr-2020  jmcneill Fix "left shift of 255 by 24 places cannot be represented in type 'int'"
warning from UBSan.
 1.38 16-Nov-2018  jmcneill branches: 1.38.4; 1.38.10;
Use intr_establish_xname
 1.37 10-Sep-2018  jmcneill armgic_ipi_send: use GIC interface number, not CPU index, when setting
the target(s) for an IPI.
 1.36 10-Sep-2018  jmcneill Update sc_mptargets atomically, as PEs will be started up in parallel w/o locking here
 1.35 15-Jul-2018  jmcneill Support pic_set_affinity and pic_get_affinity
 1.34 28-Apr-2018  jakllsch branches: 1.34.2;
Cover all pic_maxsources lines for armgic_cpu_init_priorities() and
armgic_cpu_update_priorities().

Previously only the first 32 lines were covered, which is significantly
less than the 1000-some interrupt lines possible.

Only relevant to MULTIPROCESSOR configurations.
 1.33 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.32 07-Feb-2018  jmcneill branches: 1.32.2;
PR# port-evbarm/49468: Cortex GIC assertion triggered on Allwinner A80 SoC

The priority level is changed by writing to GICC_PMR with interrupts
disabled. However, interrupts are enabled/disabled downstream of the GICC
at the CPU. When raising priority level, there is a window between the time
that interrupts are disabled and the GICC_PMR register is written. If an
interrupt occurs at a previously allowed priority before GICC_PMR is
changed, the CPU will receive the signal when interrupts are re-enabled.
At this time, GICC_PMR is now the new priority level, so reads of
GICC_IAR will report a spurious IRQ.

Move the "old_ipl != IPL_HIGH" test until after we have confirmed that
there is at least one pending IRQ.
 1.31 14-Jul-2017  skrll KNF
 1.30 29-Jun-2017  jmcneill ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.

Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
 1.29 28-Jun-2017  skrll Revert the KERNHIST for now it causes problems
 1.28 22-Jun-2017  skrll If we see GICC_IAR_IRQ_SSPURIOUS we should also stop looking for irqs
 1.27 22-Jun-2017  skrll Wrap long line
 1.26 22-Jun-2017  skrll Print the GICC_IIDR when AB_DEBUG
 1.25 22-Jun-2017  skrll Add 'armgichist' KERNHIST for (future) debugging.
 1.24 18-Jun-2017  jmcneill Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.

This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
 1.23 05-Jun-2017  skrll Clean out some #if 0'ed or //'ed code
 1.22 04-Jun-2017  skrll Initialise all the SGI/PPI priorities for all CPUs to mask the interrupts
 1.21 30-May-2017  jmcneill branches: 1.21.2;
Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.20 29-Jul-2015  matt Adjust some of IPLs of various IPIs.
 1.19 15-Apr-2015  matt Add separate IPI routines for IPI_AST and IPI_KPREEMPT.
 1.18 11-Apr-2015  matt Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
 1.17 09-Apr-2015  matt All SGIs are MPSAFE so establish them as such.
 1.16 20-Mar-2015  skrll Trailing whitespace
 1.15 12-Mar-2015  skrll G/C armgic_last_priority
 1.14 03-Mar-2015  jmcneill in armgic_establish_irq, make sure to write the new value to GICD_ICFGRn when setting irq type (IST_LEVEL/IST_EDGE)
 1.13 02-Mar-2015  jmcneill sc_gic_lines is the total number of valid lines but pic_sources[] is sparse; when initializing mpsafe targets make sure to go all the way to the end (sc_pic.pic_maxsources) instead
 1.12 29-Oct-2014  skrll branches: 1.12.2;
Only target boot cpu for SPIs atm. Fix a couple of bugs in the now
disabled code.
 1.11 29-Oct-2014  skrll Sprinkle #include "opt_multiprocessor.h"
 1.10 19-May-2014  rmind branches: 1.10.2;
Implement MI IPI interface with cross-call support.
 1.9 27-Apr-2014  matt When dealing with the PMR register, only use non-secure priority values.
 1.8 13-Apr-2014  matt Move aprint to print sooner.
 1.7 28-Mar-2014  matt branches: 1.7.2;
Various MP changes.
 1.6 04-Mar-2014  matt Don't byte swap the data, assume the bus_space will do it.
 1.5 17-Dec-2013  joerg branches: 1.5.2;
armgic_priority_to_ipl is only used in #if 0'd code, so apply that as
well.
 1.4 20-Jun-2013  matt branches: 1.4.2;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.3 16-Sep-2012  rmind branches: 1.3.2; 1.3.4;
Rename kcpuset_copybits() to kcpuset_export_u32() and thus be more specific
about the interface.
 1.2 14-Sep-2012  matt Verify the source isn't a dummy source.
 1.1 01-Sep-2012  matt branches: 1.1.2;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.2.4 03-Dec-2017  jdolecek update from HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.4.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.4.1 16-Sep-2012  matt file gic.c was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.3.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.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 16-Sep-2012  yamt file gic.c was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.4.2.1 18-May-2014  rmind sync with head
 1.5.2.3 26-Mar-2014  matt Let bus_space so the endian conversion if needed
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 17-Dec-2013  matt file gic.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.10.2.5 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.10.2.4 21-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #627):
sys/arch/arm/cortex/gic.c: revision 1.16
Trailing whitespace
 1.10.2.3 15-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #591):
sys/arch/arm/cortex/gic.c: revision 1.15
G/C armgic_last_priority
 1.10.2.2 07-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #567):
sys/arch/arm/cortex/gic.c: revision 1.13, 1.14
in armgic_establish_irq, make sure to write the new value to GICD_ICFGRn
when setting irq type (IST_LEVEL/IST_EDGE)
--
sc_gic_lines is the total number of valid lines but pic_sources[] is
sparse; when initializing mpsafe targets make sure to go all the way to
the end (sc_pic.pic_maxsources) instead
 1.10.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.12.2.4 28-Aug-2017  skrll Sync with HEAD
 1.12.2.3 22-Sep-2015  skrll Sync with HEAD
 1.12.2.2 06-Jun-2015  skrll Sync with HEAD
 1.12.2.1 06-Apr-2015  skrll Sync with HEAD
 1.21.2.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.21.2.1 05-Jun-2017  snj Pull up following revision(s) (requested by skrll in ticket #8):
sys/arch/arm/cortex/gic.c: revision 1.22
Initialise all the SGI/PPI priorities for all CPUs to mask the interrupts
 1.32.2.5 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.32.2.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.32.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.32.2.2 02-May-2018  pgoyette Synch with HEAD
 1.32.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.34.2.2 21-Apr-2020  martin Sync with HEAD
 1.34.2.1 10-Jun-2019  christos Sync with HEAD
 1.38.10.1 20-Apr-2020  bouyer Sync with HEAD
 1.38.4.1 31-Mar-2021  martin Pull up following revision(s) (requested by skrll in ticket #1238):

sys/arch/arm/cortex/gic.c: revision 1.47

Only target the boot cpu for real with SPI interrupts. I tried to do
this back in 2014, but somehow I missed a spot.

This is a quick-and-dirty fix for the USB stack which expects transfer
completions to be in-order. If interrupts happen across the CPUs then
this isn't guaranteed (yet).

kern/55243 panic at usb_transfer_complete() on raspberry pi 4
 1.42.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.42.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.46.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 30-May-2017  jmcneill Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.2 09-Apr-2014  matt branches: 1.2.4;
add helper macros.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16; 1.1.18;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.18.1 10-Aug-2014  tls Rebase.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file gic_intr.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file gic_intr.h was added on branch matt-nb6-plus on 2012-11-28 22:40:26 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file gic_intr.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 28-Aug-2017  skrll Sync with HEAD
 1.12 22-Nov-2020  jmcneill Add GICD_CTRL_EnableGrp1S definition.
 1.11 02-May-2019  jmcneill branches: 1.11.10;
Fix definition of GICD_IROUTER; the input to this macro is the INTID,
which can be a value between 32 and 1019.
 1.10 24-Nov-2018  skrll Handle ThunderX errata
 1.9 13-Nov-2018  jmcneill Update GICD_CTLR reg bit definitions to reflect the layout of the register
when either in non-secure state or for a system that only supports a single
state.
 1.8 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.7 08-Aug-2018  jmcneill Update for GICv3
 1.6 22-Jun-2017  skrll branches: 1.6.4; 1.6.6;
Naming consistency for (as yet) unused register
 1.5 09-Jun-2015  skrll Correct a comment
 1.4 05-Jun-2015  skrll Add an define for spurious interrupt number 1022
 1.3 27-Apr-2014  matt branches: 1.3.4;
When dealing with the PMR register, only use non-secure priority values.
 1.2 28-Mar-2014  matt branches: 1.2.2;
Various MP changes.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file gic_reg.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file gic_reg.h was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file gic_reg.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.4.3 28-Aug-2017  skrll Sync with HEAD
 1.3.4.2 22-Sep-2015  skrll Sync with HEAD
 1.3.4.1 06-Jun-2015  skrll Sync with HEAD
 1.6.6.1 10-Jun-2019  christos Sync with HEAD
 1.6.4.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.6.4.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.11.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.5 30-Oct-2021  jmcneill Implement gic_splraise and the gic_splx fast path in asm (armv8).
 1.4 26-Sep-2021  jmcneill Add missing insn barrier
 1.3 20-Sep-2021  jmcneill Make _splraise/_spllower/splx functions available to modules again.
 1.2 18-Sep-2021  jmcneill gic_splx: performance optimizations

Avoid any kind of register access (DAIF, PMR, etc), barriers, and atomic
operations in the common case where no interrupt fires between spl being
raised and lowered.

This introduces a per-CPU return address (ci_splx_restart) used by the
vector handler to restart a sequence in splx that compares the new ipl
with the per-CPU hardware priority state stored in ci_hwpl.
 1.1 10-Aug-2021  jmcneill Use custom spl funcs for GIC and avoid unnecessary pmr register accesses
in splx.
 1.1 10-Aug-2021  jmcneill Use custom spl funcs for GIC and avoid unnecessary pmr register accesses
in splx.
 1.3 31-Oct-2021  jmcneill Reload tpidr_el1 into x3 and re-test newipl vs cpl on restart.
 1.2 30-Oct-2021  jmcneill Add __HAVE_PREEMPTION support to gic_splfuncs asm funcs.

"looks right to me" - thorpej
 1.1 30-Oct-2021  jmcneill Implement gic_splraise and the gic_splx fast path in asm (armv8).
 1.11 14-Mar-2021  skrll Remove an unnecessary if statement in gic_v2m_msi_alloc when finding a
'count' that fits the available.
 1.10 11-Dec-2020  jmcneill Preserve ST Lower and Upper fields when clearing Mask bit in the MSI-X
vector control register.
 1.9 07-May-2020  jmcneill branches: 1.9.2;
Do not store a pointer to the passed in struct pci_attach_args
 1.8 02-Dec-2019  msaitoh Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_MASK for MSI-X table.
This is not a real bug because both macros have the same value.
 1.7 14-Oct-2019  jmcneill Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.6 17-Jun-2019  jmcneill branches: 1.6.2;
- Disable MSI/MSI-X when making changes
- MSI: Write the vector count to the Multi Message Enable (MME) field
- MSI: Set DATA to the first LPI number, not the last
 1.5 07-Dec-2018  jakllsch branches: 1.5.4;
fix a paste-o in a panic message
 1.4 16-Nov-2018  jmcneill branches: 1.4.2;
Add intr_establish_xname support to arm and expose it to intrctl
 1.3 31-Oct-2018  jmcneill Add MSI-X support.
 1.2 30-Oct-2018  jmcneill Fail gracefully when an attempt to allocate MSI vectors is made on a device
without MSI capabilities.
 1.1 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.4.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.4.2.1 16-Nov-2018  pgoyette file gic_v2m.c was added on branch pgoyette-compat on 2018-11-26 01:52:18 +0000
 1.5.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 07-Dec-2018  christos file gic_v2m.c was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.6.2.2 07-May-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #895):

sys/arch/arm/cortex/gic_v2m.h: revision 1.3
sys/arch/arm/cortex/gic_v2m.c: revision 1.9

Do not store a pointer to the passed in struct pci_attach_args
 1.6.2.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.9.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.9.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 07-May-2020  jmcneill Do not store a pointer to the passed in struct pci_attach_args
 1.2 14-Oct-2019  jmcneill Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1 21-Oct-2018  jmcneill branches: 1.1.2; 1.1.6; 1.1.8;
Add support for PCI MSI using ARM GICv2m.
 1.1.8.2 07-May-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #895):

sys/arch/arm/cortex/gic_v2m.h: revision 1.3
sys/arch/arm/cortex/gic_v2m.c: revision 1.9

Do not store a pointer to the passed in struct pci_attach_args
 1.1.8.1 15-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #334):

sys/arch/arm/cortex/gic_v2m.c: revision 1.7
sys/arch/arm/acpi/gicv3_acpi.c: revision 1.5
sys/arch/arm/acpi/files.acpi: revision 1.8
sys/arch/arm/acpi/gic_acpi.c: revision 1.4
sys/arch/arm/cortex/files.cortex: revision 1.13
sys/arch/arm/acpi/gic_v2m_acpi.c: revision 1.1
sys/arch/arm/acpi/gic_v2m_acpi.h: revision 1.1
sys/arch/arm/cortex/gic_v2m.h: revision 1.2

Add support for Amazon's Graviton MSI controller.

Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
 1.1.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 21-Oct-2018  christos file gic_v2m.h was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.1.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.1 21-Oct-2018  pgoyette file gic_v2m.h was added on branch pgoyette-compat on 2018-11-26 01:52:18 +0000
 1.56 04-Sep-2025  rin gicv3: Some more left-shift v.s. int fixes

Suggested by msaitoh@, thanks!
 1.55 04-Sep-2025  rin gicv3: Appease KUBSAN, otherwise NFC
 1.54 26-Jun-2022  jmcneill branches: 1.54.4; 1.54.12;
build fix: remove includes of opt_gic.h
 1.53 25-Jun-2022  jmcneill gicv3: Treat all IPLs below IPL_VM as IPL_NONE for hwpl mappings
 1.52 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.51 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.50 28-Mar-2022  riastradh arm/cortex: Use container_of, not bespoke offsetof arithmetic.
 1.49 02-Oct-2021  skrll Trailing whitespace
 1.48 26-Sep-2021  jmcneill If an SGI or PPI is established after interrupts are enabled, make sure
we unblock the source on _all_ CPUs and not just the CPU that is
establishing the interrupt.
 1.47 11-Sep-2021  jmcneill GIC: Support SPI affinity routing before secondary CPUs have hatched.

Instead of reading MPIDR from CPU init to determine a routing target, trust
system configuration data (Devicetree or ACPI) to properly fill in ci_cpuid.
This allows for SPI affinity routing to work before secondary CPUs are
hatched; previously, one of two things would happen:

a) If 1ofN distribution is supported, the SPI could be distributed to any
participating PE.
b) If 1ofN distribution is not supported, the SPI would not be forwarded
and would stay pending.
 1.46 10-Aug-2021  jmcneill Make gic_splfuncs optional and disable it by default until it has had
more testing.
 1.45 10-Aug-2021  jmcneill Use custom spl funcs for GIC and avoid unnecessary pmr register accesses
in splx.
 1.44 28-Mar-2021  jmcneill Disable 1ofN distribution of SPIs by default. This is a workaround for an
issue in the USB stack -- signaling transfer complete on multiple PEs can
cause transfer completions to be processed out of order.
 1.43 23-Feb-2021  jmcneill branches: 1.43.2;
If we are committing a deferred splhigh() to hardware, no need to continue.
 1.42 21-Feb-2021  jmcneill Keep current hardware priority value in struct cpu_info and use it instead
of reading icc_pmr_el1 in gicv3_set_priority.
 1.41 09-Feb-2021  ryo fix build without MULTIPROCESSOR
 1.40 07-Feb-2021  jmcneill Optimize hardware priority updates.

In gicv3_set_priority, read the current priority mask and only update it
if we are lowering the priority. The hardware priority filter is raised
only after taking an interrupt. This makes splfoo/splx without an interrupt
in between considerably cheaper as PMR writes are relatively expensive
compared to reads.

While here, avoid an extra daif read when dispatching interrupts by using
ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie() / cpsid() macros.
 1.39 16-Jan-2021  jmcneill Remove MAXCPUS dependency.
 1.38 22-Dec-2020  jmcneill When lpiconf flushing is required, make sure to flush to PoC and not PoU.
Spotted by nick.
 1.37 11-Dec-2020  jmcneill Fix spelling in comment.
 1.36 04-Dec-2020  jmcneill gicv3: Only use 1 of N SPI distribution when the feature is available.

A GICv3+ implementation is not guaranteed to support 1 of N SPI
distribution. Support for this feature is indicated in GICD_TYPER.No1N.

When No1N=1, route all interrupts to the primary PE by default and only
allow a single CPU target when updating affinity.
 1.35 24-Nov-2020  jmcneill Improve detection of NS vs S views of priorities.

For PMR, write a 0 to bit7 and see if it sticks. This is only possible from
NS EL1 if we have a non-secure view of ICC_PMR_EL1.

For int priorities (GICD/GICR interfaces and LPIs), assume that the
GICD_CTLR.DS bit is telling us the truth.

RK3399 is special here when using the vendor bootloader, so keep the
auto-detection from the previous commit but limit the scope to only run
on RK3399 SOCs.
 1.34 22-Nov-2020  jmcneill Fix interrupt priorities on N1 SDP.

The GICv3 architecture specification is not clear on the NS view of
priority registers, and there doesn't seem to be any consistency in how
these are implemented in both real and emulated environments.

The previous fix for this issue was meant to detect what we thought at the
time was a bug on the Rockchip RK3399. At that time the theory was somehow
EL1 has a secure view of the hardware, and this is causing us to have the
wrong view of IPRIORITYRn based on IHI0069F section 4.8.6 "Software
accesses of interrupt priority". But it turns out that this is not the
full picture. While I was able to confirm that yes, we do have secure
access to the GIC on RK3399 from EL1, the view of IPRIORITYRn differs
depending on whether you are using the Rockchip TF-A as included with
https://github.com/ayufan-rock64/linux-u-boot (shifted view), or mainline
TF-A from pkgsrc (unshifted view).

So to detect this quirk, we need three things: A method to detect if we
have S access to GIC registers, a method to see how many PMR bits are
implemented, and a method to see how many IPRIORITYRn bits are implemented.

To detect S access, we can try to toggle GICD_CTRL.EnableGrp1S. This bit
is either RES0 (security extensions not implemented), RAZ/WI (non-secure
access in two security state systems) or RW (secure access in two security
state systems).

To read the number of PMR and IPRIORITYRn bits supported, we can write all
1s to the register fields and read them back.

For the RK3399 (Rockchip TF-A) quirk, we assume a shifted view of
IPRIORITYRn if we have detected S accesses, and the PMR and IPRIORITYRn
values differ. The S access test is required because some real hardware
implementations (Ampere eMAG) were observed to report different PMR and
IPRIORITYRn masks, but present an unshifted view of IPRIORITYRn.

During testing, I also discovered that QEMU 5.1 requires this shifted view
workaround as well -- as far as I can tell, this is a QEMU bug. We can't
detect it the same way as RK3399 because security is disabled in the
emulated GIC, and the PMR and IPRIORITYRn tests both return 0xff! So now
if the GICv3 driver sees this configuration, it assumes that the shifted
view is required.

Honestly, this feature is so poorly documented that maybe it is better to
give up on HW priorities and preemption and use a single flat model like
Linux and FreeBSD does.

Tested on Arm N1 SDP, ROCKpro64 (RK3399) with Rockchip and pkgsrc TF-A,
Pinebook Pro (RK3399), Lenovo HR330A (Ampere eMAG), QEMU 5.1 (gic-version=3),
AWS EC2 a1.medium (Graviton).
 1.33 21-Nov-2020  jmcneill Add a per-CPU event counter that counts every time an interrupt handler is
preempted by a higher priority interrupt.
 1.32 01-Nov-2020  jmcneill branches: 1.32.2;
sc_enabled_sgippi can be updated from any CPU, so use atomic_or/atomic_and
 1.31 01-Nov-2020  jmcneill Remove unused __HAVE_PIC_FAST_SOFTINTS block. It never would have worked
if enabled..
 1.30 01-Nov-2020  jmcneill Add an isb() barrier after ICC_SGI1R_EL1 write to prevent reordering with
subsequent wfi/wfe instructions. Haven't seen this in practice but I would
rather be safe here.
 1.29 01-Nov-2020  jmcneill gicv3_set_priority: ICC_PMR_EL1 is self-synchronizing so no need for isb()
here.
 1.28 01-Nov-2020  jmcneill gicv3_irq_handler: No need to call gicv3_set_priority if we are already at
the desired ipl.
 1.27 01-Nov-2020  jmcneill gicv3_ipi_send: simplify logic in kcp != NULL case given that we know that
the kcpuset will only ever contain one cpu.
 1.26 30-Oct-2020  skrll Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.25 13-Apr-2020  jmcneill Apply similar fix from gic.c that fixed "left shift of 255 by 24 places
cannot be represented in type 'int'" warnings from UBSan.
 1.24 13-Feb-2020  jmcneill branches: 1.24.4;
Make intr affinity work with MSIs again
 1.23 13-Feb-2020  jmcneill Since all ITS instances share a common LPI configuration table, used a
shared vmem arena to allocate pic irqs. Idea from FreeBSD.
 1.22 24-Dec-2019  skrll branches: 1.22.2;
Traiing whitespace
 1.21 05-Sep-2019  jmcneill - Use pic_do_pending_ints in intr handler
- Sprinkle isb
- Fix PMR bits detection on eMAG, from OpenBSD
 1.20 30-Jun-2019  jmcneill branches: 1.20.2;
Fix size of LPI pending table allocation and enable caching of LPI conf
and pending tables where possible.
 1.19 26-Jun-2019  jmcneill Change how we detect secure vs non-secure access.

Write 0xff to ICC_PMR_EL1 and read back how many bits are implemented,
then do the same with a GICD_IPRIORITYR<n> priority value field.

If the values differ, assume we have a shifted view of IPRIORITYR.
 1.18 17-Jun-2019  jmcneill Improve priority handling for cases where access is secure, from OpenBSD.
 1.17 12-Jun-2019  mrg revert rev 1.4:
>Adjust priority mappings, NFCI

it has some unintended change that makes nvme hangy. ok @jmcneill.
 1.16 12-Jun-2019  jmcneill Revert "Route all interrupts to the primary PE by default"
 1.15 12-Jun-2019  jmcneill Route all interrupts to the primary PE by default
 1.14 12-Jun-2019  jmcneill Adjust priority mappings, NFCI
 1.13 23-Nov-2018  jmcneill branches: 1.13.4;
Fix LPI pending table size, use correct LPI conf offset in gicv3_lpi_block_irqs, and set bit[7]=1 for G1NS interrupts when writing to the LPI configuration table.
 1.12 21-Nov-2018  jmcneill kcpuset_ffs returns the cpu number plus one, so make sure to subtract it
 1.11 17-Nov-2018  jmcneill Use intr_establish_xname
 1.10 15-Nov-2018  jmcneill Instead of disabling preemption, set the binary point field to the minimum supported value
 1.9 13-Nov-2018  jmcneill Update GICD_CTLR reg bit definitions to reflect the layout of the register
when either in non-secure state or for a system that only supports a single
state.
 1.8 13-Nov-2018  jmcneill Save a few pages by only allocating LPI pending tables for "ncpu" instead of "MAXCPU" CPUs.
 1.7 10-Nov-2018  jmcneill Implement pic_get_affinity/pic_set_affinity for LPIs via ITS
 1.6 10-Nov-2018  jmcneill Implement pic_get_affinity/pic_set_affinity for SPIs
 1.5 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.4 05-Nov-2018  jmcneill ICC_PMR_EL1 has different encoding than IPRIORITYR. Not 100% sure that this is correct yet, but it works with both RK3399 and QEMU.
 1.3 30-Sep-2018  jmcneill Set NS access bit when writing ICC_PMR_EL1
 1.2 11-Aug-2018  jmcneill branches: 1.2.2;
IPI and priority fixes. My RK3399 board boots multiuser now.
 1.1 08-Aug-2018  jmcneill Add GICv3 support.
 1.2.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.3 20-Oct-2018  pgoyette Sync with head
 1.2.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.1 11-Aug-2018  pgoyette file gicv3.c was added on branch pgoyette-compat on 2018-09-06 06:55:26 +0000
 1.13.4.5 21-Apr-2020  martin Sync with HEAD
 1.13.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.13.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.4.2 10-Jun-2019  christos Sync with HEAD
 1.13.4.1 23-Nov-2018  christos file gicv3.c was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.20.2.1 22-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #222):

sys/arch/arm/cortex/gicv3.c: revision 1.21

- Use pic_do_pending_ints in intr handler
- Sprinkle isb
- Fix PMR bits detection on eMAG, from OpenBSD
 1.22.2.1 29-Feb-2020  ad Sync with head.
 1.24.4.1 20-Apr-2020  bouyer Sync with HEAD
 1.32.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.32.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.32.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.43.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.54.12.1 05-Sep-2025  martin Pull up following revision(s) (requested by rin in ticket #25):
sys/arch/arm/cortex/gicv3.c: revision 1.55
sys/arch/arm/cortex/gicv3.c: revision 1.56

gicv3: Appease KUBSAN, otherwise NFC

gicv3: Some more left-shift v.s. int fixes
Suggested by msaitoh@, thanks!
 1.54.4.1 05-Sep-2025  martin Pull up following revision(s) (requested by rin in ticket #1156):
sys/arch/arm/cortex/gicv3.c: revision 1.55
sys/arch/arm/cortex/gicv3.c: revision 1.56

gicv3: Appease KUBSAN, otherwise NFC

gicv3: Some more left-shift v.s. int fixes
Suggested by msaitoh@, thanks!
 1.11 16-Jan-2021  jmcneill Remove MAXCPUS dependency.
 1.10 04-Dec-2020  jmcneill gicv3: Only use 1 of N SPI distribution when the feature is available.

A GICv3+ implementation is not guaranteed to support 1 of N SPI
distribution. Support for this feature is indicated in GICD_TYPER.No1N.

When No1N=1, route all interrupts to the primary PE by default and only
allow a single CPU target when updating affinity.
 1.9 24-Nov-2020  jmcneill Improve detection of NS vs S views of priorities.

For PMR, write a 0 to bit7 and see if it sticks. This is only possible from
NS EL1 if we have a non-secure view of ICC_PMR_EL1.

For int priorities (GICD/GICR interfaces and LPIs), assume that the
GICD_CTLR.DS bit is telling us the truth.

RK3399 is special here when using the vendor bootloader, so keep the
auto-detection from the previous commit but limit the scope to only run
on RK3399 SOCs.
 1.8 13-Feb-2020  jmcneill branches: 1.8.6;
Since all ITS instances share a common LPI configuration table, used a
shared vmem arena to allocate pic irqs. Idea from FreeBSD.
 1.7 30-Jun-2019  jmcneill branches: 1.7.4;
Fix size of LPI pending table allocation and enable caching of LPI conf
and pending tables where possible.
 1.6 26-Jun-2019  jmcneill Remove unused field
 1.5 17-Jun-2019  jmcneill Improve priority handling for cases where access is secure, from OpenBSD.
 1.4 10-Nov-2018  jmcneill branches: 1.4.4;
Implement pic_get_affinity/pic_set_affinity for LPIs via ITS
 1.3 10-Nov-2018  jmcneill Implement pic_get_affinity/pic_set_affinity for SPIs
 1.2 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.1 08-Aug-2018  jmcneill branches: 1.1.2;
Add GICv3 support.
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 08-Aug-2018  pgoyette file gicv3.h was added on branch pgoyette-compat on 2018-09-06 06:55:26 +0000
 1.4.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.4.2 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 10-Nov-2018  christos file gicv3.h was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.7.4.1 29-Feb-2020  ad Sync with head.
 1.8.6.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.6.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.41 28-Jan-2025  jmcneill gicv3_its: Fix indirect L2 device table allocation.
 1.40 15-Dec-2024  jmcneill gicv3: its: Fix regression on LX2K.

Page size probing and device ID width changes broke LX2K, revert these
parts of the last set of changes as they are not required on X1E.
 1.39 12-Dec-2024  skrll gicv3: log the ITS command table information
 1.38 10-Dec-2024  jmcneill fixup! Restore a line accidentally removed in my previous change
 1.37 08-Dec-2024  riastradh gicv3_its.c: Do-nothing macros must expand to `__nothing', not empty.

No functional change intended -- unless this was accidentally broken
before.
 1.36 07-Dec-2024  jmcneill gicv3: ITS: Add support for indirect device tables.

When devbits is too large to fit into the first level of device table,
some hardware supports the concept of indirect tables. Add support for
this and use it when supported.

This is required for MSIs to work properly on Snapdragon X Elite platforms
(otherwise, MAPD command fails and stalls the ITS command queue).
 1.35 11-Nov-2023  tnn branches: 1.35.2;
gicv3_its: assorted minor improvements

- KASSERT that the command queue is not stalled due to async error
before issuing more commands.
- implement gits_command_int under #if 0 (useful for troubleshooting)
- protect command queue with its_lock consistently
- KASSERT for 32-bit MSI that upper bits are 0
- KASSERT return value of gicv3_its_msi_alloc_lpi
- KASSERT that safe conditions for writing to CBASER are met
- move CWRITER initialization to before CBASER
- fix alignment of tables for the 16KB page size case
 1.34 31-Oct-2021  skrll Fix non-DIAGNOSTIC builds (hopefully). No idea why this didn't fail to
build for me without DIAGNOSTIC.
 1.33 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.32 16-Jan-2021  jmcneill Remove MAXCPUS dependency.
 1.31 24-Dec-2020  jmcneill trailing whitespace
 1.30 11-Dec-2020  jmcneill Simplify gits_command by getting rid of the _BYTE_ORDER test and just
always use the loop + htole64 path.
 1.29 11-Dec-2020  jmcneill Preserve ST Lower and Upper fields when clearing Mask bit in the MSI-X
vector control register.
 1.28 24-Sep-2020  ryo branches: 1.28.2;
need to swap on big endian machines.

"The ITS command queue uses a little endian memory order model." (GIC Architecture Specification)
 1.27 13-Feb-2020  jmcneill Make intr affinity work with MSIs again
 1.26 13-Feb-2020  jmcneill Since all ITS instances share a common LPI configuration table, used a
shared vmem arena to allocate pic irqs. Idea from FreeBSD.
 1.25 01-Feb-2020  jmcneill Use kmem_zalloc for its state, fixes possible crash if a driver tries to
set affinity before a CPU is online.
 1.24 17-Jan-2020  jmcneill Set msi_id to its_id
 1.23 24-Dec-2019  skrll branches: 1.23.2;
Traiing whitespace
 1.22 02-Dec-2019  msaitoh Use PCI_MSIX_"TBL"BIR_MASK instead of PCI_MSIX_"PBA"BIR_MASK for MSI-X table.
This is not a real bug because both macros have the same value.
 1.21 30-Jun-2019  jmcneill branches: 1.21.2;
Cleanup ThunderX quirk and print cache / shareability details for ITT tables
 1.20 30-Jun-2019  jmcneill Enable caching of ITS tables when possible
 1.19 29-Jun-2019  jmcneill Restore original size calculation for MAPD and don't disable MSI/MSIX on devices before making changes
 1.18 29-Jun-2019  jmcneill Rename lpi pic to gicv3-its when an ITS is found
 1.17 23-Jun-2019  jmcneill Pass correct EventID to MOVI and INV commands
 1.16 23-Jun-2019  jmcneill Remove unused variable (build fix)
 1.15 23-Jun-2019  jmcneill Ensure that the "size" parameter of MAPD matches the size of the ITT being
mapped and subtract the LPI base from EventID. Fixes multi-vector MSI/MSI-X
on RK3399.
 1.14 16-Jun-2019  jmcneill Pass correct event ID with MOVI commands
 1.13 16-Jun-2019  jmcneill - Disable MSI/MSI-X when making changes
- MSI: Write the vector count to the Multi Message Enable (MME) field
- MSI: Set DATA to the first LPI number, not the last
 1.12 12-Jun-2019  jmcneill Allow set_affinity calls before PEs are brought online. We store the
desired target PE if set_affinity is called early and restore the routes
when the PE comes alive.
 1.11 12-Jun-2019  jmcneill Fail gracefully if gicv3_its_set_affinity is called before a cpu is
brought online.
 1.10 08-Dec-2018  jmcneill branches: 1.10.4;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.9 28-Nov-2018  jmcneill Allow non-power of 2 counts, and support alloc/release/alloc patterns for a device as long as the ITT size is sufficient
 1.8 24-Nov-2018  skrll branches: 1.8.2;
Handle ThunderX errata
 1.7 23-Nov-2018  jmcneill Only allocate what we need for ITT tables
 1.6 23-Nov-2018  jmcneill Fix ITT size, only need to MAPD once per device.
 1.5 22-Nov-2018  jakllsch use correct interrupt index

fixes intrctl list

from jmcneill@
 1.4 21-Nov-2018  jmcneill kcpuset_ffs returns the cpu number plus one, so make sure to subtract it
 1.3 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.2 10-Nov-2018  jmcneill Implement pic_get_affinity/pic_set_affinity for LPIs via ITS
 1.1 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.8.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.8.2.1 24-Nov-2018  pgoyette file gicv3_its.c was added on branch pgoyette-compat on 2018-11-26 01:52:18 +0000
 1.10.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.4.2 10-Jun-2019  christos Sync with HEAD
 1.10.4.1 08-Dec-2018  christos file gicv3_its.c was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.21.2.1 10-Feb-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #680):

sys/arch/arm/cortex/gicv3_its.c: revision 1.25

Use kmem_zalloc for its state, fixes possible crash if a driver tries to
set affinity before a CPU is online.
 1.23.2.2 29-Feb-2020  ad Sync with head.
 1.23.2.1 17-Jan-2020  ad Sync with head.
 1.28.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.28.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.28.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.35.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 28-Jan-2025  jmcneill gicv3_its: rename pt_dev_id to pt_index
 1.9 07-Dec-2024  jmcneill gicv3: ITS: Add support for indirect device tables.

When devbits is too large to fit into the first level of device table,
some hardware supports the concept of indirect tables. Add support for
this and use it when supported.

This is required for MSIs to work properly on Snapdragon X Elite platforms
(otherwise, MAPD command fails and stalls the ITS command queue).
 1.8 31-Oct-2021  skrll branches: 1.8.10;
Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.7 16-Jan-2021  jmcneill Remove MAXCPUS dependency.
 1.6 12-Jun-2019  jmcneill branches: 1.6.10;
Allow set_affinity calls before PEs are brought online. We store the
desired target PE if set_affinity is called early and restore the routes
when the PE comes alive.
 1.5 12-Jun-2019  jmcneill Fail gracefully if gicv3_its_set_affinity is called before a cpu is
brought online.
 1.4 28-Nov-2018  jmcneill branches: 1.4.4;
Allow non-power of 2 counts, and support alloc/release/alloc patterns for a device as long as the ITT size is sufficient
 1.3 24-Nov-2018  jakllsch branches: 1.3.2;
include dev/pci/pcivar.h, we use pci_attach_args directly
 1.2 10-Nov-2018  jmcneill Implement pic_get_affinity/pic_set_affinity for LPIs via ITS
 1.1 09-Nov-2018  jmcneill Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the
Interrupt Translation Service (ITS).
 1.3.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.1 24-Nov-2018  pgoyette file gicv3_its.h was added on branch pgoyette-compat on 2018-11-26 01:52:18 +0000
 1.4.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.2 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 28-Nov-2018  christos file gicv3_its.h was added on branch phil-wifi on 2019-06-10 22:05:52 +0000
 1.6.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.10.1 02-Aug-2025  perseant Sync with HEAD
 1.50 09-Jan-2025  rin gtmr_delay: Put SPINLOCK_BACKOFF_HOOK in busy loop

It is expanded as a `yield` instruction for aarch64.

This slightly improves peak performance for some drivers on
MP environments, as tested by msaitoh@ (thanks!).

XXX
This is what OpenBSD does, while FreeBSD just busy-spins.

However, unfortunately, benefits from `yield` should be limited,
as we still read count register quite frequently.

For long-duration delays, Linux uses `wfit` and `wfet` insns if
provided, and falls back to `wfe` otherwise:

https://github.com/torvalds/linux/blob/master/arch/arm64/lib/delay.c#L26-L51

Event streams should be configured for this purpose.
 1.49 03-Mar-2022  riastradh branches: 1.49.10;
arm: Use device_set_private for various drivers.
 1.48 13-Nov-2021  jakllsch fix aarch64 build
 1.47 12-Nov-2021  jmcneill gtmr: Add support for arm,cpu-registers-not-fw-configured property.

On armv7, arm,cpu-registers-not-fw-configured means that firmware hasn't
bothered to configure any generic timer registers and we need to
initialize cntfrq ourselves.
 1.46 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.45 09-Sep-2021  jmcneill If we get a spurious interrupt, log a debug message and ignore it.

Otherwise we risk tripping an assertion later on due to an interrupt
firing before it is scheduled.
 1.44 30-Aug-2021  jmcneill - Add an isb before cnt[pv]_ctl read
- cntk_ctl is 64-bits
- Do not toggle CNTCTL_IMASK in intr handler, as this may be needed
elsewhere.
 1.43 18-Jan-2021  jmcneill Fix a comment
 1.42 30-Oct-2020  skrll branches: 1.42.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.41 12-Aug-2019  jmcneill Add support for physical timers and sprinkle isb where needed.
 1.40 16-Jun-2019  jmcneill branches: 1.40.2;
Disable counter before updating cval/tval
 1.39 30-Jan-2019  jmcneill Fix bitmask in A64 errata workaround and write cval instead of tval on A64
 1.38 15-Nov-2018  jmcneill A64 timer errata can cause the timer to fire too soon, so skip KASSERT here too.
 1.37 30-Oct-2018  jmcneill Disable diagnostic assertions around timer jitter on Allwinner A64. It
seems the instability of CNTVCT can cause issues with the compare value,
and rather than applying a heavy workaround just skip the panics.
 1.36 30-Sep-2018  skrll If we're going to allow pl0 to access virtual and physical counters then
we should allow it from all CPUs.

kern/53630 (openssl fallout on arm)
 1.35 16-Sep-2018  jmcneill port-evbarm/53308: evbarm-earmv7hf performance regression under qemu

Revert gtmr.c r1.27 and apply a workaround for Allwinner A64 SoCs based
on analysis of the issue from LKML: https://lkml.org/lkml/2018/5/10/774

Since this bug is specific to the Allwinner A64 SoC, only apply the
workaround when the root ("/") node of the device tree is compatible
with "allwinner,sun50i-a64".
 1.34 10-Sep-2018  skrll Typo in comment from Joerg's gtmr diff
 1.33 01-Sep-2018  tnn fix non-DIAGNOSTIC build
 1.32 30-Jun-2018  jmcneill ARM ARM refers to this as "ARM Generic Timer", so adjust printf at attach
to match.
 1.31 24-Jun-2018  ryo branches: 1.31.2;
fixed a case of gtmr_cntvct_stable_read() is returning the same value as before.
 1.30 17-Jun-2018  jmcneill Simplify gtmr_delay and don't mix and match usage of the physical and
virtual timers (always use the virtual timer).
 1.29 09-Jun-2018  jakllsch Avoid unnecessarily touching CNTP_CTL.

We may not have the privilege of accessing CNTP_CTL if running as a
virtualized guest, and we're not using the Physical Timer for interupt
generation anyway.
 1.28 21-May-2018  jmcneill Replace stable_read/write debug printfs with event counters
 1.27 14-May-2018  joerg Workaround A-008585 errata in GTMR.

Register reads and writes may provide unstable results if the counter
hardware is active at the same time. This results in non-monotonic
counters seen by both the gtmr interrupt and time counter.

The loops are currently applied unconditionally, restricting them to
appropiate FDT markers can be applied later.
 1.26 14-May-2018  joerg Remove a number of debug #if 0s.
 1.25 14-May-2018  joerg Remove unused gtmr_bootdelay.
 1.24 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.23 30-Nov-2017  skrll branches: 1.23.2;
When attaching gtmr at fdt use fdtbus_intr_establish to establish the
gtmr interrupt.
 1.22 25-Oct-2017  skrll Improve delay to be better than 1.3 innaccurate by default and handle the
unlikely wrap
 1.21 25-Oct-2017  skrll Trailing whitespace
 1.20 09-Sep-2017  jmcneill gtmr_intr: If the ISTATUS bit is 0, timer condition is not met. In this
case, just return 0.
 1.19 24-Aug-2017  jmcneill Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.18 17-Jun-2017  jmcneill Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
 1.17 28-May-2017  jmcneill branches: 1.17.2;
If the "frequency" property is not specified, try to use the value in
CNTFRQ. Firmware should have already set this for us.
 1.16 20-Apr-2015  matt Use physical timer for gtmr_delay();
 1.15 12-Apr-2015  matt Don't adjust interval if we are too far into the next tick.
 1.14 27-Mar-2015  skrll Whitespace
 1.13 26-Mar-2015  skrll Trailing whitespace.
 1.12 24-Mar-2015  matt Move isb's to before reading count. Change interrupt to level.
 1.11 24-Mar-2015  matt Sprinkle some arm_isb() to force execution of the mcrr instructions to get
more accurate values. (Given that the generic timer is usually running at
a 64th or less of the cpu clock, this only settle to a tick or so.)
 1.10 23-Mar-2015  jmcneill port-arm/49737: armgtmr0 timer broken

Use physical timer instead of virtual timer for timecounter. For platforms
that implement virtualization extensions, the CNTVOFF register defines a
virtual offset between the physical count and virtual count. Unfortunately,
the CNTVOFF register is only accessible in secure mode and the value is
per-CPU, so we may end up in a scenario where virtual count reads from
CPU A -> B -> A are not monotonic. No offset applied to physical timer,
so physical count reads are guaranteed to be monotonic.
 1.9 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.8 11-Jun-2014  matt branches: 1.8.2; 1.8.4;
Add a KASSERT to make sure the counter is running.
 1.7 13-Apr-2014  matt branches: 1.7.2;
Make sure freq is not 0.
 1.6 28-Mar-2014  matt branches: 1.6.2;
Add gtmr_bootdelay. rename clockhandler to gtmr_intr
 1.5 17-Dec-2013  joerg branches: 1.5.2;
delta can't be negative. Wrapped value is seen as large positive, so
covered already.
 1.4 12-Sep-2013  matt Cleanup some diagnostic code.
 1.3 07-Sep-2013  matt Fix some bugs.
 1.2 20-Jun-2013  matt branches: 1.2.2; 1.2.4;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.1 16-Jun-2013  matt Add generic timer support (untested)
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 20-Jun-2013  tls file gtmr.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.5.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.5.2.1 17-Dec-2013  matt file gtmr.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.7.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.7.2.1 13-Apr-2014  yamt file gtmr.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.8.4.3 28-Aug-2017  skrll Sync with HEAD
 1.8.4.2 06-Jun-2015  skrll Sync with HEAD
 1.8.4.1 06-Apr-2015  skrll Sync with HEAD
 1.8.2.3 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.8.2.2 06-Apr-2015  snj Pull up following revision(s) (requested by skrll in ticket #662):
sys/arch/arm/cortex/gtmr.c: revision 1.10-1.14
port-arm/49737: armgtmr0 timer broken
Use physical timer instead of virtual timer for timecounter. For platforms
that implement virtualization extensions, the CNTVOFF register defines a
virtual offset between the physical count and virtual count. Unfortunately,
the CNTVOFF register is only accessible in secure mode and the value is
per-CPU, so we may end up in a scenario where virtual count reads from
CPU A -> B -> A are not monotonic. No offset applied to physical timer,
so physical count reads are guaranteed to be monotonic.
--
Sprinkle some arm_isb() to force execution of the mcrr instructions to get
more accurate values. (Given that the generic timer is usually running at
a 64th or less of the cpu clock, this only settle to a tick or so.)
--
Move isb's to before reading count. Change interrupt to level.
--
Trailing whitespace.
--
Whitespace
 1.8.2.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.17.2.2 11-Sep-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #271):
sys/arch/arm/cortex/gtmr.c: revision 1.20
gtmr_intr: If the ISTATUS bit is 0, timer condition is not met. In this
case, just return 0.
 1.17.2.1 21-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #45):
sys/arch/arm/cortex/gtmr.c: revision 1.18
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
 1.23.2.8 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.23.2.7 20-Oct-2018  pgoyette Sync with head
 1.23.2.6 30-Sep-2018  pgoyette Ssync with HEAD
 1.23.2.5 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.23.2.4 28-Jul-2018  pgoyette Sync with HEAD
 1.23.2.3 25-Jun-2018  pgoyette Sync with HEAD
 1.23.2.2 21-May-2018  pgoyette Sync with HEAD
 1.23.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.31.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.2.1 10-Jun-2019  christos Sync with HEAD
 1.40.2.1 13-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #54):

sys/arch/aarch64/include/armreg.h: revision 1.26
sys/arch/arm/cortex/gtmr.c: revision 1.41
sys/arch/arm/include/armreg.h: revision 1.128
sys/arch/arm/cortex/gtmr_var.h: revision 1.12

Add support for physical timers and sprinkle isb where needed.
 1.42.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.49.10.1 02-Aug-2025  perseant Sync with HEAD
 1.1 16-Jun-2013  matt branches: 1.1.2; 1.1.8; 1.1.12;
Add generic timer support (untested)
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 16-Jun-2013  yamt file gtmr_intr.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.8.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.8.1 16-Jun-2013  matt file gtmr_intr.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 16-Jun-2013  tls file gtmr_intr.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.16 19-Nov-2022  skrll G/C gtmr_init function declaration
 1.15 12-Nov-2021  jmcneill gtmr: Add support for arm,cpu-registers-not-fw-configured property.

On armv7, arm,cpu-registers-not-fw-configured means that firmware hasn't
bothered to configure any generic timer registers and we need to
initialize cntfrq ourselves.
 1.14 05-Mar-2020  riastradh Revert "Include opt_diagnostic.h for DIAGNOSTIC."

This did not do what I thought it did. opt_diagnostic.h is only for
the unused _DIAGNOSTIC, which seems like an abortive attempt to
incrementally convert DIAGNOSTIC to an opt_*.h option rather than a
command-line option.
 1.13 05-Mar-2020  riastradh Include opt_diagnostic.h for DIAGNOSTIC.

...at least, in header files, which may not have already included
libkern.h.
 1.12 12-Aug-2019  jmcneill Add support for physical timers and sprinkle isb where needed.
 1.11 16-Sep-2018  jmcneill branches: 1.11.4;
port-evbarm/53308: evbarm-earmv7hf performance regression under qemu

Revert gtmr.c r1.27 and apply a workaround for Allwinner A64 SoCs based
on analysis of the issue from LKML: https://lkml.org/lkml/2018/5/10/774

Since this bug is specific to the Allwinner A64 SoC, only apply the
workaround when the root ("/") node of the device tree is compatible
with "allwinner,sun50i-a64".
 1.10 14-May-2018  joerg branches: 1.10.2;
Remove unused gtmr_bootdelay.
 1.9 30-Nov-2017  skrll branches: 1.9.2;
When attaching gtmr at fdt use fdtbus_intr_establish to establish the
gtmr interrupt.
 1.8 09-Nov-2017  skrll Trailing whitespace
 1.7 24-Aug-2017  jmcneill Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.6 02-Apr-2015  matt #include <sys/percpu.h>
 1.5 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.4 28-Mar-2014  matt branches: 1.4.4; 1.4.6; 1.4.8;
Add gtmr_bootdelay. rename clockhandler to gtmr_intr
 1.3 12-Sep-2013  matt branches: 1.3.2;
Cleanup some diagnostic code.
 1.2 20-Jun-2013  matt branches: 1.2.2; 1.2.4;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.1 16-Jun-2013  matt Add generic timer support (untested)
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 20-Jun-2013  tls file gtmr_var.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.3.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.2.1 12-Sep-2013  matt file gtmr_var.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.4.8.2 28-Aug-2017  skrll Sync with HEAD
 1.4.8.1 06-Apr-2015  skrll Sync with HEAD
 1.4.6.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.4.4.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.4.4.1 28-Mar-2014  yamt file gtmr_var.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.9.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.9.2.1 21-May-2018  pgoyette Sync with HEAD
 1.10.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.4.1 13-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #54):

sys/arch/aarch64/include/armreg.h: revision 1.26
sys/arch/arm/cortex/gtmr.c: revision 1.41
sys/arch/arm/include/armreg.h: revision 1.128
sys/arch/arm/cortex/gtmr_var.h: revision 1.12

Add support for physical timers and sprinkle isb where needed.
 1.3 28-Feb-2015  skrll Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.

This commit changes the KVA layout of the RPI.
 1.2 20-Jun-2013  matt branches: 1.2.6; 1.2.10; 1.2.12;
Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args.
Modify the list of devices to include the offset(s) from PERIPHBASE.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file mpcore_var.h was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.1.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.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file mpcore_var.h was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 23-Jun-2013  tls resync from head
 1.2.12.1 06-Apr-2015  skrll Sync with HEAD
 1.2.10.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.2.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.6.1 20-Jun-2013  matt file mpcore_var.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.20 02-Oct-2021  skrll Trailing whitespace
 1.19 19-Jan-2019  jmcneill Remove hard requirement for "offset" property on Cortex-A5. This is not required w/ FDT.
 1.18 20-Jun-2018  hkenken branches: 1.18.2;
Add l2cc support.
 1.17 27-Feb-2015  jmcneill branches: 1.17.16;
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
 1.16 01-Dec-2014  matt clean the a9 l2 cache before turning it on.
 1.15 16-Apr-2014  matt branches: 1.15.2; 1.15.4;
Allow l2cc base to gotten from device properties.
 1.14 20-Mar-2014  matt branches: 1.14.2;
pl310 cache is PIPT
 1.13 23-Feb-2014  matt #include <arm/locore.h>
 1.12 17-Jun-2013  matt branches: 1.12.2; 1.12.6;
KASSERT -> KASSERTMSG
 1.11 13-Feb-2013  matt simplify cache range op
 1.10 22-Jan-2013  matt Don't "sync" atomic ops.
Do sync after each range op.
 1.9 28-Nov-2012  matt Make these compile with gcc4.1 and binutils 2.16
 1.8 01-Nov-2012  matt branches: 1.8.2;
Invalidate the L2 cache before enabling it.
 1.7 17-Oct-2012  matt branches: 1.7.2;
Add a missing mutex exit.
 1.6 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.5 14-Sep-2012  matt Add L2 cache flush routines. (not yet enabled).
 1.4 07-Sep-2012  matt branches: 1.4.2;
Don't disable the L2C is it isn't enabled.
 1.3 07-Sep-2012  matt Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.2 02-Sep-2012  matt Add "write-back" before Unified
 1.1 02-Sep-2012  matt Add driver to attach ARM PL210 L2 Cache Controller
arml2cc0 at armperiph0: ARM PL310 L2 r3p2 Cache Controller
arml2cc0: 256KB/32B 16-way L2 Unified cache
 1.4.2.5 03-Dec-2017  jdolecek update from HEAD
 1.4.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.3 23-Jun-2013  tls resync from head
 1.4.2.2 25-Feb-2013  tls resync with head
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.2.5 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.4 23-Jan-2013  yamt sync with head
 1.7.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.7.2.2 30-Oct-2012  yamt sync with head
 1.7.2.1 17-Oct-2012  yamt file pl310.c was added on branch yamt-pagecache on 2012-10-30 17:19:00 +0000
 1.8.2.3 07-Feb-2013  matt Sync with HEAD
 1.8.2.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.8.2.1 01-Nov-2012  matt file pl310.c was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.12.6.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.6.1 17-Jun-2013  matt file pl310.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.12.2.1 18-May-2014  rmind sync with head
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.15.4.1 06-Apr-2015  skrll Sync with HEAD
 1.15.2.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.17.16.2 26-Jan-2019  pgoyette Sync with HEAD
 1.17.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.18.2.1 10-Jun-2019  christos Sync with HEAD
 1.4 22-Mar-2014  reinoud Add constant for a reserved bit 31 for the L2C_AUXCTL register for use in
masks
 1.3 22-Mar-2014  reinoud Add defines for the PL310's L2C_PREFETCH_CTL and L2C_POWER_CTL registers as
per r3p2 spec.
 1.2 07-Sep-2012  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.16;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.1 02-Sep-2012  matt Add driver to attach ARM PL210 L2 Cache Controller
arml2cc0 at armperiph0: ARM PL310 L2 r3p2 Cache Controller
arml2cc0: 256KB/32B 16-way L2 Unified cache
 1.2.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.16.1 07-Sep-2012  matt file pl310_reg.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2.8.1 18-May-2014  rmind sync with head
 1.2.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.1 07-Sep-2012  matt file pl310_reg.h was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.2.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.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 07-Sep-2012  yamt file pl310_reg.h was added on branch yamt-pagecache on 2012-10-30 17:19:01 +0000
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 07-Sep-2012  matt branches: 1.1.4; 1.1.6; 1.1.16;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 07-Sep-2012  matt file pl310_var.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 07-Sep-2012  matt file pl310_var.h was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 07-Sep-2012  yamt file pl310_var.h was added on branch yamt-pagecache on 2012-10-30 17:19:01 +0000
 1.3 16-Dec-2018  skrll Move register definiton to header
 1.2 04-Oct-2016  kiyohara branches: 1.2.14; 1.2.16;
Add SCU_SIZE.
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.16; 1.1.22; 1.1.26;
Add Cortex-A9 support including the ARM Generic Interrupt Controller
and the A9 Global Timer / Watchdog.
 1.1.26.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.22.1 05-Dec-2016  skrll Sync with HEAD
 1.1.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.16.1 01-Sep-2012  matt file scu_reg.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 01-Sep-2012  matt file scu_reg.h was added on branch matt-nb6-plus on 2012-11-28 22:40:27 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file scu_reg.h was added on branch yamt-pagecache on 2012-10-30 17:19:01 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 10-Jun-2019  christos Sync with HEAD
 1.2.14.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.1 09-Jul-2020  uwe Utilite has console on uart4.
 1.2 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.1 02-Jan-2021  ryo branches: 1.1.2;
add dts for odroid-N2 plus
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 02-Jan-2021  thorpej file meson-g12b-odroid-n2-plus.dts was added on branch thorpej-futex on 2021-01-03 16:34:51 +0000
 1.6 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.5 05-Mar-2020  tnn #include_next confuses clang-cpp; use relative pathname to upstream dts

warning: #include_next in file found relative to primary source file or
found by absolute path; will search from start of include path
[-Winclude-next-absolute-path]
error: #include nested too deeply
 1.4 14-Aug-2019  jmcneill Catch up to recent mainline dts changes
 1.3 20-Jan-2019  jmcneill branches: 1.3.2; 1.3.6; 1.3.8;
Add Amlogic Meson SDHC driver (non-standard bindings)
 1.2 19-Jan-2019  jmcneill Add (non-standard) fb node for meson8b
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.3.8.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.3.6.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.6.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.6.2 10-Jun-2019  christos Sync with HEAD
 1.3.6.1 20-Jan-2019  christos file meson8b-odroidc1.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.3.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.3.2.1 20-Jan-2019  pgoyette file meson8b-odroidc1.dts was added on branch pgoyette-compat on 2019-01-26 22:00:00 +0000
 1.8 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.7 14-Aug-2019  jmcneill Catch up to recent mainline dts changes
 1.6 13-Aug-2019  skrll Updates to get Odroid-C1 in better shape since the last DTS import
 1.5 20-Jan-2019  jmcneill branches: 1.5.2; 1.5.6; 1.5.8;
Add rtc node (non-standard bindings)
 1.4 20-Jan-2019  jmcneill Add operating points and clocks for CPUs
 1.3 20-Jan-2019  jmcneill Add Amlogic Meson SDHC driver (non-standard bindings)
 1.2 19-Jan-2019  jmcneill Add (non-standard) fb node for meson8b
 1.1 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.5.8.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.5.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.6.2 10-Jun-2019  christos Sync with HEAD
 1.5.6.1 20-Jan-2019  christos file meson8b.dtsi was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.5.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.5.2.1 20-Jan-2019  pgoyette file meson8b.dtsi was added on branch pgoyette-compat on 2019-01-26 22:00:00 +0000
 1.3 01-Mar-2023  nia delete attribution per request of contributor
 1.2 05-Mar-2020  tnn branches: 1.2.4;
#include_next confuses clang-cpp; use relative pathname to upstream dts

warning: #include_next in file found relative to primary source file or
found by absolute path; will search from start of include path
[-Winclude-next-absolute-path]
error: #include nested too deeply
 1.1 31-Oct-2019  sevan branches: 1.1.2;
Set the stdout-path on xM like Ti OMAP3 BeagleBoard
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 31-Oct-2019  martin file omap3-beagle-xm.dts was added on branch netbsd-9 on 2019-11-27 13:46:45 +0000
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 05-Mar-2020  martin file omap3-beagle-xm.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.2 05-Mar-2020  tnn branches: 1.2.4;
#include_next confuses clang-cpp; use relative pathname to upstream dts

warning: #include_next in file found relative to primary source file or
found by absolute path; will search from start of include path
[-Winclude-next-absolute-path]
error: #include nested too deeply
 1.1 29-Oct-2019  jmcneill branches: 1.1.2;
Set stdout-path on TI OMAP3 BeagleBoard
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 29-Oct-2019  martin file omap3-beagle.dts was added on branch netbsd-9 on 2019-11-27 13:46:45 +0000
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 05-Mar-2020  martin file omap3-beagle.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.2 05-Mar-2020  tnn branches: 1.2.4;
#include_next confuses clang-cpp; use relative pathname to upstream dts

warning: #include_next in file found relative to primary source file or
found by absolute path; will search from start of include path
[-Winclude-next-absolute-path]
error: #include nested too deeply
 1.1 31-Oct-2019  jmcneill branches: 1.1.2;
Use dss as console on Nokia N900.
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 31-Oct-2019  martin file omap3-n900.dts was added on branch netbsd-9 on 2019-11-27 13:46:45 +0000
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 05-Mar-2020  martin file omap3-n900.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.1 24-Apr-2023  mrg branches: 1.1.2;
enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.

(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.1.2.2 02-May-2023  martin Pull up following revision(s) (requested by mrg in ticket #154):

sys/arch/arm/dts/rk3328-crypto.dtsi: revision 1.1
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.8
sys/arch/arm/rockchip/rk3328_cru.c: revision 1.10
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.11

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.
(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.1.2.1 24-Apr-2023  martin file rk3328-crypto.dtsi was added on branch netbsd-10 on 2023-05-02 21:31:56 +0000
 1.1 31-Aug-2023  gutteridge branches: 1.1.2;
Enable rkv1crypto on nanopi-r2s

Follow the example of rock64. Tested by myself.
 1.1.2.2 07-Sep-2023  martin Pull up following revision(s) (requested by gutteridge in ticket #355):

sys/arch/arm/dts/rk3328-nanopi-r2s.dts: revision 1.1

Enable rkv1crypto on nanopi-r2s

Follow the example of rock64. Tested by myself.
 1.1.2.1 31-Aug-2023  martin file rk3328-nanopi-r2s.dts was added on branch netbsd-10 on 2023-09-07 08:20:20 +0000
 1.8 24-Apr-2023  mrg branches: 1.8.2;
enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.

(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.7 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.6 31-Dec-2020  mrg begin to make rock64 audio work.

- set status for "analog_sound" to enabled.
- add clocks for the i2s and spdif nodes.
- match "rockchip,rk3066-i2s", "rockchip,rk3188-i2s",
and "rockchip,rk3288-i2s".

this gets i2s and ausoc to attach, but no audio(4) yet.

to complete this probably also needs a codec driver (appears
to be rk3328 specific, unlike eg pinebookpro's es8316), and
support for "audio-graph-card" type sound cards.
 1.5 12-Dec-2019  jmcneill branches: 1.5.8;
Enable USB3 support on RK3328
 1.4 23-May-2019  jmcneill branches: 1.4.2;
Remove vcc_host1_5v hack now that fixedregulator honours pin polarity
 1.3 22-May-2019  jmcneill Swap polarity of the vcc_host1_5v pin to enable USB power
 1.2 21-May-2019  mrg it's called "snps,dis_u2_susphy_quirk" in both upstream and what
our drivers expect, not "snps,dis-u2-susphy-quirk".

unfortunately, my rock64 usb still seems to be non functional.

from jmcneill@.
 1.1 21-Jun-2018  jmcneill branches: 1.1.2; 1.1.4;
Enable DWC3 USB DRD (host mode) on Rock64.
 1.1.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 21-Jun-2018  pgoyette file rk3328-rock64.dts was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.4.2.1 12-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #545):

sys/arch/arm/dts/rk3328.dtsi: revision 1.2
sys/dev/fdt/dwc3_fdt.c: revision 1.8
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.5

Add support for snps,dis-tx-ipgap-linecheck-quirk quirk

Enable USB3 support on RK3328
 1.5.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.8.2.2 02-May-2023  martin Pull up following revision(s) (requested by mrg in ticket #154):

sys/arch/arm/dts/rk3328-crypto.dtsi: revision 1.1
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.8
sys/arch/arm/rockchip/rk3328_cru.c: revision 1.10
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.11

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.
(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.8.2.1 24-Apr-2023  martin file rk3328-rock64.dts was added on branch netbsd-10 on 2023-05-02 21:31:56 +0000
 1.3 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.2 12-Dec-2019  jmcneill Enable USB3 support on RK3328
 1.1 21-Jun-2018  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
Enable DWC3 USB DRD (host mode) on Rock64.
 1.1.8.1 12-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #545):

sys/arch/arm/dts/rk3328.dtsi: revision 1.2
sys/dev/fdt/dwc3_fdt.c: revision 1.8
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.5

Add support for snps,dis-tx-ipgap-linecheck-quirk quirk

Enable USB3 support on RK3328
 1.1.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 21-Jun-2018  pgoyette file rk3328.dtsi was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.1 17-May-2020  riastradh branches: 1.1.2;
Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.1.2.2 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.1.2.1 17-May-2020  martin file rk3399-crypto.dtsi was added on branch netbsd-9 on 2020-05-18 18:54:30 +0000
 1.1 24-May-2025  gutteridge branches: 1.1.4;
Enable rkv1crypto on nanopi-r4s
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 24-May-2025  perseant file rk3399-nanopi-r4s.dts was added on branch perseant-exfatfs on 2025-08-02 05:55:27 +0000
 1.8 13-Aug-2024  mrg apply a DTS change from upstream to reduce pwm frequency for the backlight.

should fix buzzing sometimes seen with the display. do this as an override
rather than patching the dts source. (tested with a hack to ensure that
the new value is set in the configuration.)

XXX: pullup-10, perhaps pullup-9.

upstream commit message:


arm64: dts: rockchip: Raise Pinebook Pro's panel backlight PWM frequency

Increase the frequency of the PWM signal that drives the LED backlight of
the Pinebook Pro's panel, from about 1.35 KHz (which equals to the PWM
period of 740,740 ns), to exactly 8 kHz (which equals to the PWM period of
125,000 ns). Using a higher PWM frequency for the panel backlight, which
reduces the flicker, can only be beneficial to the end users' eyes.

On top of that, increasing the backlight PWM signal frequency reportedly
eliminates the buzzing emitted from the Pinebook Pro's built-in speakers
when certain backlight levels are set, which cause some weird interference
with some of the components of the Pinebook Pro's audio chain.

The old value for the backlight PWM period, i.e. 740,740 ns, is pretty much
an arbitrary value that was selected during the very early bring-up of the
Pinebook Pro, only because that value seemed to minimize horizontal line
distortion on the display, which resulted from the old X.org drivers causing
screen tearing when dragging windows around. That's no longer an issue, so
there are no reasons to stick with the old PWM period value.

The lower and the upper backlight PWM frequency limits for the Pinebook Pro's
panel, according to its datasheet, are 200 Hz and 10 kHz, respectively. [1]
These changes still leave some headroom, which may have some positive effects
on the lifetime expectancy of the panel's backlight LEDs.

[1] https://files.pine64.org/doc/datasheet/PinebookPro/NV140FHM-N49_Rev.P0_20160804_201710235838.pdf

Fixes: 5a65505a6988 ("arm64: dts: rockchip: Add initial support for Pinebook Pro")
Cc: stable@vger.kernel.org
Reported-by: Nikola Radojevic <nikola@radojevic.rs>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Tested-by: Nikola Radojevi# <nikola@radojevic.rs>
Link: https://lore.kernel.org/r/2a23b6cfd8c0513e5b233b4006ee3d3ed09b824f.1722805655.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
 1.7 14-Sep-2023  rjs branches: 1.7.6;
Enable crypto engine on Pinebook Pro.

Only used for rng at present.
 1.6 13-Mar-2022  mrg don't disable the spi any more. it works fine (and i'm booting
from it on one pbp directly to nvme.)
 1.5 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.4 02-Oct-2021  mrg default RK3399 PCIe to 1.x.

sometime in mid-2019, rockchip disabled PCIe 2.x referrencing a
non-public errata in linux and the dts, both of which were changed
to default to only PCIe 1.x (in code, and in DT.) see:

https://lore.kernel.org/all/1481881357-1793-1-git-send-email-shawn.lin@rock-chips.com/

we haven't observed any specific problems, but we've also tested
far fewer cards than linux. there are other issues such as what
happens for a PCI abort depending on which CPU triggers it we do
not currently handle either.

tested on rockpro64 with nvme & ahcisata, and pinebook pro nvme.

still allows DT to set back to '2' if the user so desires.
 1.3 17-May-2020  riastradh Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.2 01-Jan-2020  jmcneill branches: 1.2.4; 1.2.8;
Disable SPI for now (rkspi driver hangs at boot)
 1.1 01-Jan-2020  jmcneill Add Pinebook Pro dts, from Manjaro Linux.

https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
 1.2.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.8.1 01-Jan-2020  martin file rk3399-pinebook-pro.dts was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.2.4.3 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.2.4.2 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.2.4.1 01-Jan-2020  martin file rk3399-pinebook-pro.dts was added on branch netbsd-9 on 2020-01-21 10:39:59 +0000
 1.7.6.1 02-Aug-2025  perseant Sync with HEAD
 1.15 30-Aug-2023  rjs Re-enable the fan.
 1.14 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.13 02-Oct-2021  mrg default RK3399 PCIe to 1.x.

sometime in mid-2019, rockchip disabled PCIe 2.x referrencing a
non-public errata in linux and the dts, both of which were changed
to default to only PCIe 1.x (in code, and in DT.) see:

https://lore.kernel.org/all/1481881357-1793-1-git-send-email-shawn.lin@rock-chips.com/

we haven't observed any specific problems, but we've also tested
far fewer cards than linux. there are other issues such as what
happens for a PCI abort depending on which CPU triggers it we do
not currently handle either.

tested on rockpro64 with nvme & ahcisata, and pinebook pro nvme.

still allows DT to set back to '2' if the user so desires.
 1.12 03-Sep-2021  mrg rk3399 pcie: pay attention to the "bus-scan-delay-ms" property.

our existing pinebookpro DTS, but not the other rk3399 ones, have
this property set to "1000" (it's the same in linux 5.14 DTS.)

as there are already static 100ms + upto 1000ms, count how many
are done, and only delay more to complete one second.

this allows reverting this device-specific change:

http://mail-index.netbsd.org/source-changes/2021/06/23/msg130402.html

and makes other sorts of storage cards more likely to work as well.

tested on rockpro64.

XXX: consider moving dts setting into rk3399.dtsi.

ok jmcneill jak


inspired by https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/0013-rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch
 1.11 17-May-2020  riastradh Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.10 19-Dec-2019  jakllsch add template bits for optional eDP panel on RockPro64
 1.9 16-Nov-2019  jmcneill Enable HDMI audio on ROCKPro64
 1.8 13-Aug-2019  tnn rk3399-rockpro64.dts: enable spi1 and add spiflash as a child node
 1.7 28-Jul-2019  jmcneill branches: 1.7.2;
Set max link speed, remove assigned clocks
 1.6 12-Jun-2019  jmcneill Enable RK3399 PCIe.
 1.5 01-May-2019  jmcneill branches: 1.5.2;
Enable pwm1 and add a pwm-fan node to enable the +FAN- header on ROCKPro64
 1.4 30-Apr-2019  jmcneill Use mainline dts for rockpro64 now.
 1.3 10-Apr-2019  jakllsch Revert RockPro64 dts changes made for rk3399_pcie. This will need to
be re-done differently so as to avoid contention between dts upstream
and our driver.
 1.2 07-Mar-2019  jakllsch Add RK3399 PCIe host bridge support.

Not enabled yet due to occasional hangs during boot, and needing
__BUS_SPACE_HAS_PROBING_METHODS enabled.

Uses slightly non-standard DT bindings to avoid suboptimality of the
Linux binding. This allows for much more flexibility and efficency
in allotment of the limited apertures into PCI spaces.
 1.1 12-Aug-2018  jmcneill branches: 1.1.2;
Add dts for ROCKPro64
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3399-rockpro64.dts was added on branch pgoyette-compat on 2018-09-06 06:55:26 +0000
 1.5.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.2.2 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 01-May-2019  christos file rk3399-rockpro64.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.7.2.3 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.7.2.2 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.7.2.1 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.3 22-Oct-2019  aymeric Disable private timer whose new driver clashes with the global timer's one.

Stopgap measure to make the DE0 Nano Soc work again, targeted for netbsd-9
pullup. We'll see later if we switch to using the private timer.
 1.2 22-Jan-2019  jmcneill branches: 1.2.4; 1.2.6;
Update for 4.20.3 dts changes
 1.1 05-Jan-2019  aymeric branches: 1.1.2;
Rename the DE0 Nano SoC dts file to its new linux/uboot name
 1.1.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.1 05-Jan-2019  pgoyette file socfpga_cyclone5_de0_nano_soc.dts was added on branch pgoyette-compat on 2019-01-18 08:50:14 +0000
 1.2.6.1 10-Nov-2019  martin Pull up following revision(s) (requested by aymeric in ticket #411):

sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts: revision 1.3

Disable private timer whose new driver clashes with the global timer's one.

Stopgap measure to make the DE0 Nano Soc work again, targeted for netbsd-9
pullup. We'll see later if we switch to using the private timer.
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 22-Jan-2019  christos file socfpga_cyclone5_de0_nano_soc.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.3 05-Jan-2019  aymeric Rename the DE0 Nano SoC dts file to its new linux/uboot name
 1.2 14-Oct-2018  aymeric Add reset information for first watchdog timer
 1.1 19-Sep-2018  aymeric branches: 1.1.2;
Add support for the DE0 NanoSoC board.

It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
 1.1.2.4 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.3 20-Oct-2018  pgoyette Sync with head
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 19-Sep-2018  pgoyette file socfpga_cyclone5_de0_sockit.dts was added on branch pgoyette-compat on 2018-09-30 01:45:37 +0000
 1.4 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.3 17-Nov-2019  jmcneill Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.2 09-Sep-2017  jmcneill branches: 1.2.2; 1.2.6; 1.2.10;
Enable USB-OTG-EHCI and USB-OTG-OHCI controllers on Pine64+.
 1.1 07-Sep-2017  jmcneill Enable ethernet on Pine64+
 1.2.10.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.2.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 09-Sep-2017  jdolecek file sun50i-a64-pine64-plus.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2 17-Nov-2019  jmcneill Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.1 18-Feb-2018  jmcneill branches: 1.1.4; 1.1.8;
Add wrapper for Pine64 (non-plus) dts
 1.1.8.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.1.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.18 03-Jan-2020  skrll lcd_rgb666_pins is in sun50i-a64.dtsi now so we don't need it here.
 1.17 24-Nov-2019  jmcneill Enable HDMI and HDMI audio
 1.16 06-Jun-2019  jmcneill branches: 1.16.2;
Remove audio related nodes (they are present in mainline dts now)
 1.15 03-Feb-2019  jmcneill Add eDP transmitter and enable display pipeline
 1.14 22-Jan-2019  jmcneill Update for 4.20.3 dts changes
 1.13 11-Nov-2018  mrg pull across this patch:

https://github.com/anarsoul/linux-2.6/commit/26b3d6f8ffa77cb05066c11967a498d6dacbdc42#diff-61a0580c3eaa34a373cc7ee7ee46dd2a

---
arm64: allwinner: a64: enable Bluetooth On Pinebook

Pinebook has an RTL8723CS WiFi + BT chip, BT is connected to UART1
and uses PL4 as BT reset, PL5 as device wake GPIO, PL6 as host wake GPIO
the I2C controlling signals are connected to R_I2C bus.

Enable it in the device tree.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---

this enables:

[ 1.000019] com1 at simplebus1: ns16550a, working fifo
[ 1.000019] com1: interrupting on GIC irq 33

to attach. more work with firmware and btattach will be required,
for the BT to be actually functional.
 1.12 09-Jul-2018  jmcneill Make brightness-levels available in increments of 10% from 0 to 100, and set the default brightness level to match the one used by U-Boot (30%)
 1.11 11-May-2018  jmcneill branches: 1.11.2;
Add cpu0 supply and operating points table
 1.10 10-May-2018  jmcneill Disable spdif nodes on pinebook
 1.9 10-May-2018  jmcneill Enable audio codec
 1.8 06-May-2018  jmcneill Add backlight node and enable pwm
 1.7 05-May-2018  jmcneill Enable ehci0/ohci0 (attached to left USB port)
 1.6 05-May-2018  jmcneill Enable mmc1 (SDIO Wi-Fi is attached here)
 1.5 04-May-2018  jmcneill Pinebook is not based on Pine64, so do not derive from its dts
 1.4 28-Apr-2018  jmcneill Add support for Pinebook lid switch and eMMC
 1.3 18-Feb-2018  jmcneill branches: 1.3.2;
Pinebook LCD pipeline is mixer0-lcd0
 1.2 10-Sep-2017  jmcneill branches: 1.2.2;
Correct model and compatible string for Pinebook
 1.1 10-Sep-2017  jmcneill Add Pinebook support.
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 10-Sep-2017  jdolecek file sun50i-a64-pinebook.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.3.2.5 26-Jan-2019  pgoyette Sync with HEAD
 1.3.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.2 21-May-2018  pgoyette Sync with HEAD
 1.3.2.1 02-May-2018  pgoyette Synch with HEAD
 1.11.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.2.1 10-Jun-2019  christos Sync with HEAD
 1.16.2.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.6 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.5 10-Aug-2021  jmcneill Enable DVFS
 1.4 30-Jun-2021  skrll Revert previous. Apparently it's wrong.
 1.3 25-Jun-2021  skrll PR/56095 SOPINE Clusterboard unable to transmit network data

Add allwinner,tx-delay-ps = <500> using the diff supplied by tnn@
 1.2 17-Nov-2019  jmcneill branches: 1.2.12;
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.1 07-Jun-2018  jmcneill branches: 1.1.2; 1.1.4; 1.1.8;
Add extra sun50i-a64 nodes to SoPine Baseboard dts.
 1.1.8.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.1.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 07-Jun-2018  pgoyette file sun50i-a64-sopine-baseboard.dts was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.2.12.1 01-Aug-2021  thorpej Sync with HEAD.
 1.15 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.14 09-Dec-2019  riastradh Add crypto engine block.
 1.13 17-Nov-2019  jmcneill Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.12 08-Nov-2019  jmcneill Fix PMU interrupt numbers on Allwinner A64.
 1.11 06-Jun-2019  jmcneill branches: 1.11.2;
Remove audio related nodes (they are present in mainline dts now)
 1.10 22-Jan-2019  jmcneill Update for 4.20.3 dts changes
 1.9 11-May-2018  jmcneill branches: 1.9.2;
Add cpu0 clock
 1.8 10-May-2018  jmcneill Add audio codec nodes
 1.7 06-May-2018  jmcneill Add pwm node
 1.6 05-May-2018  jmcneill Add A64 thermal sensor node
 1.5 04-May-2018  jmcneill Upstream dts specifies emac for sun50i-a64 now
 1.4 30-Nov-2017  jmcneill branches: 1.4.2; 1.4.4;
Switch to new emac bindings for H3 boards
 1.3 09-Sep-2017  jmcneill Enable USB-OTG-EHCI and USB-OTG-OHCI controllers on Pine64+.
 1.2 07-Sep-2017  jmcneill Add simplefb stub for Allwinner A64
 1.1 07-Sep-2017  jmcneill Enable ethernet on Pine64+
 1.4.4.2 26-Jan-2019  pgoyette Sync with HEAD
 1.4.4.1 21-May-2018  pgoyette Sync with HEAD
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 30-Nov-2017  jdolecek file sun50i-a64.dtsi was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.9.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.2.3 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.11.2.2 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.11.2.1 10-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #409):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.12

Fix PMU interrupt numbers on Allwinner A64.
 1.2 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.1 08-Feb-2019  macallan branches: 1.1.4;
- correct cpu voltage
- add cpu speed table
- include sun50i-h5.dtsi
Now thermal sensors and cpu speed control work
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 08-Feb-2019  christos file sun50i-h5-libretech-all-h3-cc.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.5 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.4 04-Oct-2019  jmcneill Increase voltage for frequencies above 1GHz
 1.3 02-Jul-2018  jakllsch branches: 1.3.4;
catch up to upstream dts changes/additions
 1.2 28-Jan-2018  jmcneill branches: 1.2.2; 1.2.4;
Enable CPU frequency scaling and thermal sensors.
 1.1 31-Dec-2017  jakllsch Enable Gigabit Ethernet on Nano Pi Neo Plus 2.
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3.4.1 04-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #283):

sys/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts: revision 1.4

Increase voltage for frequencies above 1GHz
 1.3 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.2 24-Apr-2021  riastradh arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.1 28-Jan-2018  jmcneill branches: 1.1.8;
Add support for H5 simple framebuffer, CPUX clocks, R_I2C controller, SID
controller, and thermal sensors.
 1.1.8.1 25-Apr-2021  martin Pull up following revision(s) (requested by riastradh in ticket #1252):

sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.18 (patch)
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.24 (patch)
sys/arch/arm/dts/sun50i-h5.dtsi: revision 1.2 (patch)

arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.2 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.1 27-Mar-2020  thorpej branches: 1.1.2;
Add a more complete / correct device tree for the OrangePi Lite 2.
 1.1.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.1 27-Mar-2020  martin file sun50i-h6-orangepi-lite2.dts was added on branch phil-wifi on 2020-04-08 14:07:28 +0000
 1.2 07-May-2019  thorpej Add "nextthing,pocketchip" to the head of the 'compatible' property
so that this device tree can be distinguished from that of the base
CHIP. "nextthing,chip" remains in the list, but one match-priority
notch down.
 1.1 27-Aug-2017  jmcneill branches: 1.1.2; 1.1.6;
Add a PocketCHIP -specific dts with information about the keyboard and
touch screen.
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 27-Aug-2017  jdolecek file sun5i-r8-pocketchip.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.1 05-Sep-2019  bouyer branches: 1.1.8;
Add spiflash support in GENERIC
Add a dts enabling spi0 and attaching the SPI flash for newer lime2-emmc
boards.
 1.1.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.8.1 05-Sep-2019  martin file sun7i-a20-olinuxino-lime2-emmc-spi.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.2 30-Jun-2018  jmcneill No need to define our own emac node as this is in the upstream dts now.
 1.1 28-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
add emac to bananapi m3 dts
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 28-Oct-2017  jdolecek file sun8i-a83t-bananapi-m3.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.1 03-May-2019  mrg branches: 1.1.2;
the standard sun8i-a83t-cubietruck-plus.dts is missing temp sensor
support that is in sun8i-a83t.dtsi. this one includes both.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 03-May-2019  christos file sun8i-a83t-cubietruck-plus.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.4 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.3 02-Jan-2019  jmcneill Add thermal sensor node
 1.2 30-Jun-2018  jmcneill No need to define our own emac node as this is in the upstream dts now.
 1.1 28-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
add emac to bananapi m3 dts
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.2 18-Jan-2019  pgoyette Synch with HEAD
 1.1.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 28-Oct-2017  jdolecek file sun8i-a83t.dtsi was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1 05-Jun-2019  thorpej branches: 1.1.2;
Add a device tree for the Banana Pi BPI-P2 Zero. This device is
based on the BPI-M2 Zero, with a couple of small changes:
- On-board Ethernet (with optional PoE support)
- On-board eMMC.
- Card-detect for the SD card slot is wired up a little differently.

Kindly tested by Dima Veselov.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 05-Jun-2019  christos file sun8i-h2-plus-bananapi-p2-zero.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.2 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.1 08-Oct-2019  bad branches: 1.1.2; 1.1.10;
Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

From https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 08-Oct-2019  martin file sun8i-h3-nanopi-duo2.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.1.2.2 17-Oct-2019  martin Pull up following revision(s) (requested by bad in ticket #341):

sys/arch/evbarm/conf/GENERIC: revision 1.54
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.2
sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts: revision 1.1

Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

From https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
Cherry pick a few changes from the armbian u-boot patch.

Makes my NanoPi R1 boot reliably.

From https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nano+pi-r1-and-duo2.patch
Add sun8i-h3-nanopi-duo2.dts and sun8i-h3-nanopi-r1.dts.

The former is untested.
 1.1.2.1 08-Oct-2019  martin file sun8i-h3-nanopi-duo2.dts was added on branch netbsd-9 on 2019-10-17 18:47:48 +0000
 1.4 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.3 27-Jun-2020  jmcneill Enable audio codec
 1.2 22-Dec-2017  jmcneill branches: 1.2.8;
Enable emac for NanoPi M1
 1.1 22-Dec-2017  jmcneill Wrap NanoPi M1 dts to enable simplefb support.
 1.2.8.1 30-Jun-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #971):

sys/arch/arm/dts/sun8i-h3-nanopi-m1.dts: revision 1.3

Enable audio codec
 1.5 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.4 21-May-2019  jmcneill Mainline dts has switched to operating-points-v2
 1.3 30-Nov-2017  jmcneill branches: 1.3.2; 1.3.6;
Switch to new emac bindings for H3 boards
 1.2 05-Oct-2017  jmcneill add cpu regulator and operating points for nanopi neo
 1.1 13-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 13-Jul-2017  skrll file sun8i-h3-nanopi-neo.dts was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.4.2 24-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #128):
sys/conf/Makefile.kern.inc: revision 1.259
sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3.dtsi: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-neo.dts: revision 1.1
Add support for dts files outside of external/gpl2.
--
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.4.1 13-Jul-2017  snj file sun8i-h3-nanopi-neo.dts was added on branch netbsd-8 on 2017-07-24 06:20:33 +0000
 1.3.6.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 30-Nov-2017  jdolecek file sun8i-h3-nanopi-neo.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.4 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.3 03-Jan-2020  skrll branches: 1.3.8;
To quote the upstream change "Remove useless pinctrl nodes"
 1.2 08-Oct-2019  bad branches: 1.2.2;
Cherry pick a few changes from the armbian u-boot patch.

Makes my NanoPi R1 boot reliably.
From https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nano+pi-r1-and-duo2.patch
 1.1 08-Oct-2019  bad Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

From https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
 1.2.2.2 17-Oct-2019  martin Pull up following revision(s) (requested by bad in ticket #341):

sys/arch/evbarm/conf/GENERIC: revision 1.54
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.2
sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts: revision 1.1

Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

From https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
Cherry pick a few changes from the armbian u-boot patch.

Makes my NanoPi R1 boot reliably.

From https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nano+pi-r1-and-duo2.patch
Add sun8i-h3-nanopi-duo2.dts and sun8i-h3-nanopi-r1.dts.

The former is untested.
 1.2.2.1 08-Oct-2019  martin file sun8i-h3-nanopi-r1.dts was added on branch netbsd-9 on 2019-10-17 18:47:48 +0000
 1.3.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.1 03-Jan-2020  martin file sun8i-h3-nanopi-r1.dts was added on branch phil-wifi on 2020-04-13 08:03:33 +0000
 1.4 12-Sep-2023  bouyer Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.
Problem reported and fix tested by Dave Tyson as reported on port-arm@
While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.
 1.3 30-Nov-2017  jmcneill branches: 1.3.2; 1.3.36;
Re-add this, it is still needed for simplefb
 1.2 30-Nov-2017  jmcneill Switch to new emac bindings for H3 boards
 1.1 11-Sep-2017  jun Add local patches to sun8i-h3-orangepi-one to enable HDMI support.
 1.3.36.1 13-Sep-2023  martin Pull up following revision(s) (requested by bouyer in ticket #371):

sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts: revision 1.5
sys/arch/arm/dts/sun8i-h3-orangepi-one.dts: file removal

Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.

Problem reported and fix tested by Dave Tyson as reported on port-arm@

While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 30-Nov-2017  jdolecek file sun8i-h3-orangepi-one.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.5 12-Sep-2023  bouyer Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.
Problem reported and fix tested by Dave Tyson as reported on port-arm@
While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.
 1.4 21-May-2019  jmcneill branches: 1.4.28;
Mainline dts has switched to operating-points-v2
 1.3 30-Nov-2017  jmcneill branches: 1.3.2; 1.3.6;
Switch to new emac bindings for H3 boards
 1.2 02-Oct-2017  jmcneill Add operating points for OrangePi Plus2E and enable cpufreq scaling.
 1.1 13-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 13-Jul-2017  skrll file sun8i-h3-orangepi-plus2e.dts was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.4.2 24-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #128):
sys/conf/Makefile.kern.inc: revision 1.259
sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3.dtsi: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-neo.dts: revision 1.1
Add support for dts files outside of external/gpl2.
--
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.4.1 13-Jul-2017  snj file sun8i-h3-orangepi-plus2e.dts was added on branch netbsd-8 on 2017-07-24 06:20:33 +0000
 1.3.6.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 30-Nov-2017  jdolecek file sun8i-h3-orangepi-plus2e.dts was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.4.28.1 13-Sep-2023  martin Pull up following revision(s) (requested by bouyer in ticket #371):

sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts: revision 1.5
sys/arch/arm/dts/sun8i-h3-orangepi-one.dts: file removal

Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.

Problem reported and fix tested by Dave Tyson as reported on port-arm@

While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.
 1.7 07-Nov-2021  jmcneill arm: dts: adapt for dts-5.15
 1.6 30-Nov-2017  jmcneill branches: 1.6.2;
Switch to new emac bindings for H3 boards
 1.5 05-Oct-2017  jmcneill add thermal sensor controller
 1.4 03-Oct-2017  jmcneill add Security ID EFUSE node
 1.3 02-Oct-2017  jmcneill Add operating points for OrangePi Plus2E and enable cpufreq scaling.
 1.2 02-Sep-2017  jmcneill Add a simplefb node for H3 SoCs
 1.1 13-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 13-Jul-2017  skrll file sun8i-h3.dtsi was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.4.2 24-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #128):
sys/conf/Makefile.kern.inc: revision 1.259
sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3.dtsi: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-neo.dts: revision 1.1
Add support for dts files outside of external/gpl2.
--
Add local patches to sun8i-h3-orangepi-plus2e and sun8i-h3-nanopi-neo to
enable ethernet support.
 1.1.4.1 13-Jul-2017  snj file sun8i-h3.dtsi was added on branch netbsd-8 on 2017-07-24 06:20:33 +0000
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 30-Nov-2017  jdolecek file sun8i-h3.dtsi was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1 28-May-2019  jmcneill branches: 1.1.2;
Enable USB2 controllers on Cubieboard4.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 28-May-2019  christos file sun9i-a80-cubieboard4.dts was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.1 04-May-2024  dyoung Add a device tree for the Red Pitaya SDRlab 122-16.

To boot NetBSD on the 122-16, copy the .dtb built from
zynq-red-pitays-122-16.dts, the first-stage bootloader (called
boot.bin) and U-Boot that came with the 122-16 and a kernel image,
netbsd.ub, built for earmv7hf to an MS-DOS partition on an
MBR-partitioned SD card. At the U-Boot prompt, "Zynq> ", type these
commands:

i2c dev 0
eeprom read 0 0x50 0 0x1804 0x400
env import -b 0 0x400 hw_rev serial ethaddr
setenv bootargs "root=ld0a"
fatload mmc 0 0x01f00000 device~1.dtb
fatload mmc 0 0x02000000 netbsd.ub
fdt addr 0x01f00000
fdt set /axi/ethernet@e000b000 local-mac-address $ethaddr
bootm 0x02000000 - 0x01f00000

Note that the ethernet PHY will not attach unless you have applied
the patches from Lloyd Parkes in kern/58083.
 1.1 26-Aug-2021  thorpej Device tree overlay for the FriendlyARM NanoPi NAS Dock for the NanoPi NEO,
NEO Air, and NEO2.
 1.1 20-Oct-2019  thorpej branches: 1.1.8;
Add a device tree Overlay for the Orange Pi Zero NAS expansion board for
Orange Pi Zero and Orange Pi Zero Plus.
 1.1.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.8.1 20-Oct-2019  martin file sunxi-h3-h5-orangepi-zero-nas.dts was added on branch phil-wifi on 2020-04-13 08:03:34 +0000
 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 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 11-Dec-2005  christos branches: 1.2.80;
merge ktrace-lwp.
 1.1 22-Dec-2004  joff branches: 1.1.4;
ep93xx ARM system-on-chip support
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file ep93xx_busdma.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.80.1 11-Mar-2010  yamt sync with head
 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.28 02-May-2023  jmcneill TS7200: Defer event counter registration until after evcnt is initialized

Patch from Lloyd Parkes <lloyd@must-have-coffee.gen.nz> in PR# kern/57386
 1.27 21-Nov-2021  skrll branches: 1.27.4;
Trailing whitespace.
 1.26 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.25 10-Nov-2019  chs branches: 1.25.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.24 08-Apr-2015  ozaki-r branches: 1.24.18;
Include sys/lwp.h instead of arm/cpu.h

sys/lwp.h is preferred because arm/cpu.h has a dependency on sys/lwp.h.

Suggested by skrll@ and matt@
 1.23 07-Apr-2015  ozaki-r Add missing #include <arm/cpu.h>
 1.22 26-Mar-2014  christos branches: 1.22.6;
kill sprintf
 1.21 02-Mar-2014  joerg GC ipending.
 1.20 18-Dec-2013  skrll Remove unused variable
 1.19 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.18 12-Nov-2012  skrll branches: 1.18.2;
C99 types
 1.17 02-Aug-2012  skrll branches: 1.17.2;
Remove irqframe and replace with identical trapframe.
 1.16 01-Jul-2011  dyoung branches: 1.16.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 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.14 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.13 28-Apr-2008  martin branches: 1.13.20; 1.13.22;
Remove clause 3 and 4 from TNF licenses
 1.12 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.11 06-Jan-2008  matt branches: 1.11.6; 1.11.8; 1.11.10;
Truly kill current_intr_depth once and for all.
 1.10 06-Jan-2008  matt Cleanup softint lossage.
 1.9 03-Dec-2007  ad branches: 1.9.6;
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.8 24-Nov-2006  wiz branches: 1.8.8; 1.8.24; 1.8.26; 1.8.28; 1.8.30; 1.8.36;
s/heirarchy/hierarchy/, from Zafer.
 1.7 24-Dec-2005  perry branches: 1.7.20; 1.7.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 12-Nov-2005  hamajima delete dummy entries for vmstat. (unnecessary since May 2005)
 1.5 12-Nov-2005  hamajima add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.4 14-Aug-2005  joff Fix argument mismatch (clockframe * vs. irqframe *) in ep93xx_intr_dispatch() that
has been causing compile failures.
 1.3 05-Jan-2005  joff branches: 1.3.4; 1.3.12;
Avoid duplicate IRQ deliveries by processing at most 1 IRQ for each VIC read
 1.2 29-Dec-2004  joff Fix the potential recursion processing soft interrupts that was eating
all the stack.
 1.1 22-Dec-2004  joff ep93xx processor VIC interrupt controller support
 1.3.12.4 21-Jan-2008  yamt sync with head
 1.3.12.3 07-Dec-2007  yamt sync with head
 1.3.12.2 30-Dec-2006  yamt sync with head.
 1.3.12.1 21-Jun-2006  yamt sync with head.
 1.3.4.4 11-Dec-2005  christos Sync with head.
 1.3.4.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.3.4.1 05-Jan-2005  skrll file ep93xx_intr.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.7.22.1 10-Dec-2006  yamt sync with head.
 1.7.20.1 12-Jan-2007  ad Sync with head.
 1.8.36.2 18-Feb-2008  mjf Sync with HEAD.
 1.8.36.1 08-Dec-2007  mjf Sync with HEAD.
 1.8.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.8.30.2 09-Jan-2008  matt sync with HEAD
 1.8.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.8.28.2 20-Jan-2008  chris Sync to HEAD.
 1.8.28.1 01-Jan-2008  chris Sync with HEAD.
 1.8.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.8.24.2 28-Feb-2008  rjs Sync with HEAD.
 1.8.24.1 26-Dec-2007  rjs Sync with HEAD.
 1.8.8.1 03-Dec-2007  ad Sync with HEAD.
 1.9.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.11.10.2 11-Aug-2010  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.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.22.2 05-Mar-2011  rmind sync with head
 1.13.22.1 03-Jul-2010  rmind sync with head
 1.13.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 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 16-Jan-2013  yamt sync with (a bit old) head
 1.16.2.1 30-Oct-2012  yamt sync with head
 1.17.2.3 03-Dec-2017  jdolecek update from HEAD
 1.17.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.2 18-May-2014  rmind sync with head
 1.18.2.1 28-Aug-2013  rmind sync with head
 1.22.6.2 06-Jun-2015  skrll Sync with HEAD
 1.22.6.1 06-Apr-2015  skrll Sync with HEAD
 1.24.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.27.4.1 02-May-2023  martin Pull up following revision(s) (requested by jmcneill in ticket #155):

sys/arch/arm/ep93xx/ep93xx_intr.c: revision 1.28
sys/arch/arm/ep93xx/ep93xxvar.h: revision 1.7
sys/arch/evbarm/tsarm/tsarm_machdep.c: revision 1.36

TS7200: Defer event counter registration until after evcnt is initialized

Patch from Lloyd Parkes in PR kern/57386
 1.5 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.4 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.3 06-Jan-2008  matt branches: 1.3.6; 1.3.8; 1.3.10;
Cleanup softint lossage.
 1.2 11-Dec-2005  christos branches: 1.2.46; 1.2.50; 1.2.52; 1.2.58; 1.2.66;
merge ktrace-lwp.
 1.1 22-Dec-2004  joff branches: 1.1.4; 1.1.12;
ep93xx processor VIC interrupt controller support
 1.1.12.1 21-Jan-2008  yamt sync with head
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file ep93xx_intr.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.2.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.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.2.52.1 09-Jan-2008  matt sync with HEAD
 1.2.50.1 20-Jan-2008  chris Sync to HEAD.
 1.2.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.3.10.2 11-Mar-2010  yamt sync with head
 1.3.10.1 16-May-2008  yamt sync with head.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 21-Nov-2021  skrll Trailing whitespace.
 1.6 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.5 01-Jul-2011  dyoung branches: 1.5.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.3 24-Nov-2005  yamt branches: 1.3.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.2 01-Apr-2005  yamt branches: 1.2.2; 1.2.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.1 22-Dec-2004  joff branches: 1.1.2; 1.1.4; 1.1.6;
ep93xx processor bus_space impl
 1.1.6.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.1.4.4 11-Dec-2005  christos Sync with head.
 1.1.4.3 01-Apr-2005  skrll Sync with HEAD.
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file ep93xx_space.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.1.2.1 29-Apr-2005  kent sync with -current
 1.2.8.1 29-Nov-2005  yamt sync with head.
 1.2.2.1 21-Jun-2006  yamt sync with head.
 1.3.80.1 11-Mar-2010  yamt sync with head
 1.5.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9 21-Nov-2021  skrll Trailing whitespace.
 1.8 17-Sep-2021  andvar some love to double letters (in comments).
 1.7 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.6 13-Feb-2006  hamajima branches: 1.6.74;
add SYSCON DeviceCfg register.
 1.5 12-Nov-2005  hamajima branches: 1.5.4; 1.5.6; 1.5.8;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.4 14-Aug-2005  joff SSP locations needs to be defined since tspld device uses it to talk to the
TS-7200 temperature sensor. While here, add some more GPIO registers too.
 1.3 31-Jan-2005  joff branches: 1.3.6;
Add Port-B GPIO register equates
 1.2 10-Jan-2005  joff branches: 1.2.2; 1.2.4; 1.2.6;
Add GPIO addresses
 1.1 22-Dec-2004  joff ep93xx ARM system-on-chip support
 1.2.6.1 12-Feb-2005  yamt sync with head.
 1.2.4.5 11-Dec-2005  christos Sync with head.
 1.2.4.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.4.3 04-Feb-2005  skrll Sync with HEAD.
 1.2.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.4.1 10-Jan-2005  skrll file ep93xxreg.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.2.1 29-Apr-2005  kent sync with -current
 1.3.6.1 21-Jun-2006  yamt sync with head.
 1.5.8.1 22-Apr-2006  simonb Sync with head.
 1.5.6.1 09-Sep-2006  rpaulo sync with head
 1.5.4.1 18-Feb-2006  yamt sync with head.
 1.6.74.1 11-Mar-2010  yamt sync with head
 1.7 02-May-2023  jmcneill TS7200: Defer event counter registration until after evcnt is initialized

Patch from Lloyd Parkes <lloyd@must-have-coffee.gen.nz> in PR# kern/57386
 1.6 12-Nov-2012  skrll branches: 1.6.68;
C99 types
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 11-Dec-2005  christos branches: 1.2.80;
merge ktrace-lwp.
 1.1 22-Dec-2004  joff branches: 1.1.4;
ep93xx ARM system-on-chip support
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file ep93xxvar.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.80.1 11-Mar-2010  yamt sync with head
 1.4.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.6.68.1 02-May-2023  martin Pull up following revision(s) (requested by jmcneill in ticket #155):

sys/arch/arm/ep93xx/ep93xx_intr.c: revision 1.28
sys/arch/arm/ep93xx/ep93xxvar.h: revision 1.7
sys/arch/evbarm/tsarm/tsarm_machdep.c: revision 1.36

TS7200: Defer event counter registration until after evcnt is initialized

Patch from Lloyd Parkes in PR kern/57386
 1.23 21-Nov-2021  skrll Trailing whitespace.
 1.22 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.21 06-Mar-2014  maxv Fix uninitialized variable. Found by my code scanner.

ok christos@
 1.20 12-Nov-2012  skrll branches: 1.20.2;
C99 types
 1.19 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.18 01-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.17 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.16 19-Dec-2008  kenh Switch back original ARM assembler code used to calculate the number of ticks
needed to wait in delay(). New code overflowed for large delay values. Broke,
among other things, the RTC probe for the TS-7200.
 1.15 27-May-2008  hamajima branches: 1.15.6;
- convert inline asm umull to C
- add "-march=armv4 -mtune=arm9" to CPUFLAGS

Relevant mailing list threads:
http://mail-index.netbsd.org/source-changes/2008/05/25/msg195537.html
http://mail-index.netbsd.org/port-arm/2008/05/26/msg000228.html
 1.14 25-May-2008  hamajima fix countdown of "remaining" variable in delay(). Armadillo9 works again.
speed up an initial value calculation of "remaining" variable in delay().
 1.13 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.12 28-Apr-2008  martin branches: 1.12.2;
Remove clause 3 and 4 from TNF licenses
 1.11 20-Jan-2008  joerg branches: 1.11.6; 1.11.8; 1.11.10;
Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 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 10-Sep-2006  gdamore branches: 1.9.4;
First pass at enabling a lot of ARM ports to convert swiftly to
__HAVE_GENERIC_TODR. Just put #define __HAVE_GENERIC_TODR in types.h
if your port uses one of these files.
 1.8 24-Dec-2005  perry branches: 1.8.8; 1.8.20;
bare asm -> __asm
 1.7 12-Nov-2005  hamajima add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.6 04-Jun-2005  he branches: 1.6.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.5 04-Jun-2005  he Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.4 26-Feb-2005  simonb Watch out for those unexpected tains.
 1.3 06-Jan-2005  joff branches: 1.3.2; 1.3.4; 1.3.6;
Add missing newline after preposterous time warning printf
 1.2 27-Dec-2004  joff do things the todr(9) way
 1.1 22-Dec-2004  joff ep93xx processor system tick timer and microtime()/delay() impl
 1.3.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.4.5 11-Dec-2005  christos Sync with head.
 1.3.4.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.4.3 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.3.4.1 06-Jan-2005  skrll file epclk.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.2.1 29-Apr-2005  kent sync with -current
 1.6.2.4 21-Jan-2008  yamt sync with head
 1.6.2.3 26-Feb-2007  yamt sync with head.
 1.6.2.2 30-Dec-2006  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.8.20.2 12-Jan-2007  ad Sync with head.
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.8.8.1 14-Sep-2006  yamt sync with head.
 1.9.4.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.10.38.1 20-Jan-2008  bouyer Sync with HEAD
 1.10.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.26.1 23-Mar-2008  matt sync with HEAD
 1.10.24.1 27-Jan-2008  chris Sync to HEAD.
 1.10.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.11.10.2 11-Mar-2010  yamt sync with head
 1.11.10.1 04-May-2009  yamt sync with head.
 1.11.8.1 04-Jun-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.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.15.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.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.18.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.20.2.1 18-May-2014  rmind sync with head
 1.4 21-Nov-2021  skrll Trailing whitespace.
 1.3 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 12-Nov-2005  hamajima branches: 1.2.82;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1 22-Dec-2004  joff branches: 1.1.4; 1.1.12;
ep93xx processor system tick timer and microtime()/delay() impl
 1.1.12.1 21-Jun-2006  yamt sync with head.
 1.1.4.3 11-Dec-2005  christos Sync with head.
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file epclkreg.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.82.1 11-Mar-2010  yamt sync with head
 1.36 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.35 12-Feb-2022  riastradh sys: Fix various abuse of struct device internals.

Will help to make struct device opaque later.
 1.34 21-Nov-2021  skrll PR port-evbarm/40307 options KGDB doesn't work for some evbarm hosts

Apply patch from Lloyd Parkes with some KNF tweaks from me.
 1.33 21-Nov-2021  skrll Trailing whitespace.
 1.32 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.31 10-Nov-2019  chs branches: 1.31.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.30 13-Apr-2015  riastradh branches: 1.30.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.29 15-Nov-2014  christos branches: 1.29.2;
centralize the call unit / dialout macros
 1.28 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.27 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.26 16-Mar-2014  dholland branches: 1.26.2;
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.25 08-Mar-2014  skrll Remove unused variables
 1.24 12-Nov-2012  skrll branches: 1.24.2;
C99 types
 1.23 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.22 02-Feb-2012  tls branches: 1.22.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.21 01-Jul-2011  dyoung branches: 1.21.2; 1.21.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.20 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.19 14-Mar-2009  dsl branches: 1.19.4; 1.19.6;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.18 11-Jun-2008  cegger branches: 1.18.4; 1.18.10;
use device_lookup_private to get softc
 1.17 28-Apr-2008  martin branches: 1.17.2; 1.17.4;
Remove clause 3 and 4 from TNF licenses
 1.16 06-Jan-2008  matt branches: 1.16.6; 1.16.8; 1.16.10;
Cleanup softint lossage.
 1.15 19-Nov-2007  ad branches: 1.15.6;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.14 04-Mar-2007  christos branches: 1.14.2; 1.14.16; 1.14.18; 1.14.20; 1.14.22; 1.14.26; 1.14.28;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 01-Oct-2006  elad branches: 1.13.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.12 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.11 23-Jul-2006  ad branches: 1.11.4; 1.11.6;
Use the LWP cached credentials where sane.
 1.10 14-May-2006  elad integrate kauth.
 1.9 26-Mar-2006  thorpej Use device_unit() (and remove a couple of places where it is not
needed).
 1.8 08-Mar-2006  he branches: 1.8.2;
Remove yet another instance of the macro triplet SET/CLR/ISSET, now
found in <sys/types.h>.
 1.7 20-Feb-2006  thorpej branches: 1.7.2; 1.7.4;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.6 14-Dec-2005  christos branches: 1.6.2; 1.6.4; 1.6.6;
proc -> lwp, ansi
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 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.3 04-Jun-2005  he branches: 1.3.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.2 29-Dec-2004  joff branches: 1.2.4;
improve intr handling behavior in light of the fact that there is no transmit completion irqs on epcom
 1.1 22-Dec-2004  joff ep93xx processor on-chip UART driver
 1.2.4.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.4.1 29-Dec-2004  skrll file epcom.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.2.5 21-Jan-2008  yamt sync with head
 1.3.2.4 07-Dec-2007  yamt sync with head
 1.3.2.3 03-Sep-2007  yamt sync with head.
 1.3.2.2 30-Dec-2006  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.6.6.2 01-Jun-2006  kardel 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.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.7.4.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.4.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.7.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.7.2.4 11-Aug-2006  yamt sync with head
 1.7.2.3 24-May-2006  yamt sync with head.
 1.7.2.2 01-Apr-2006  yamt sync with head.
 1.7.2.1 13-Mar-2006  yamt sync with head.
 1.8.2.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.2.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.11.6.1 22-Oct-2006  yamt sync with head
 1.11.4.1 18-Nov-2006  ad Sync with head.
 1.13.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.28.2 18-Feb-2008  mjf Sync with HEAD.
 1.14.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.14.26.1 21-Nov-2007  bouyer Sync with HEAD
 1.14.22.1 09-Jan-2008  matt sync with HEAD
 1.14.20.2 20-Jan-2008  chris Sync to HEAD.
 1.14.20.1 01-Jan-2008  chris Sync with HEAD.
 1.14.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.14.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.14.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.14.2.1 03-Dec-2007  ad Sync with HEAD.
 1.15.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.16.10.2 04-May-2009  yamt sync with head.
 1.16.10.1 16-May-2008  yamt sync with head.
 1.16.8.2 17-Jun-2008  yamt sync with head.
 1.16.8.1 18-May-2008  yamt sync with head.
 1.16.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.16.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.1 18-Jun-2008  simonb Sync with head.
 1.17.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.19.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.4.1 31-May-2011  rmind sync with head
 1.21.6.1 18-Feb-2012  mrg merge to -current.
 1.21.2.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.21.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.21.2.2 30-Oct-2012  yamt sync with head
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.22.6.3 03-Dec-2017  jdolecek update from HEAD
 1.22.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.1 18-May-2014  rmind sync with head
 1.26.2.2 10-Aug-2014  tls Rebase.
 1.26.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.29.2.1 06-Jun-2015  skrll Sync with HEAD
 1.30.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 21-Nov-2021  skrll Trailing whitespace.
 1.3 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 11-Dec-2005  christos branches: 1.2.80;
merge ktrace-lwp.
 1.1 22-Dec-2004  joff branches: 1.1.4;
ep93xx processor on-chip UART driver
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file epcomreg.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.80.1 11-Mar-2010  yamt sync with head
 1.9 21-Nov-2021  skrll PR port-evbarm/40307 options KGDB doesn't work for some evbarm hosts

Apply patch from Lloyd Parkes with some KNF tweaks from me.
 1.8 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.7 27-Oct-2012  chs branches: 1.7.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 02-Feb-2012  tls branches: 1.6.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.5 19-Nov-2011  tls branches: 1.5.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.4 23-Oct-2009  snj branches: 1.4.12;
Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.3 11-Dec-2005  christos branches: 1.3.80;
merge ktrace-lwp.
 1.2 29-Dec-2004  joff branches: 1.2.4;
improve intr handling behavior in light of the fact that there is no transmit completion irqs on epcom
 1.1 22-Dec-2004  joff ep93xx processor on-chip UART driver
 1.2.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.4.1 29-Dec-2004  skrll file epcomvar.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.80.1 11-Mar-2010  yamt sync with head
 1.4.12.2 30-Oct-2012  yamt sync with head
 1.4.12.1 17-Apr-2012  yamt sync with head
 1.5.2.1 18-Feb-2012  mrg merge to -current.
 1.6.6.2 03-Dec-2017  jdolecek update from HEAD
 1.6.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.14.1 06-Jun-2015  skrll Sync with HEAD
 1.52 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.51 05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.50 27-Sep-2022  skrll branches: 1.50.10;
Remove unnecessary sys/malloc.h include
 1.49 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.48 19-Feb-2020  thorpej When a media change is requested, don't just all (*if_init)(). That's
needlessly disruptive and incompatible with future locking changes.
We can use both ether_mediachange() and ether_mediastatus() instead.
 1.47 03-Feb-2020  skrll More if_stat*
 1.46 03-Feb-2020  skrll Adopt <net/if_stats.h>
 1.45 21-Oct-2019  msaitoh branches: 1.45.2;
if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.44 30-May-2019  msaitoh branches: 1.44.2;
Simplify MII structure initialization and reference. No functional change.
 1.43 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.42 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.41 23-May-2019  msaitoh No functional change:
- Change ac(was arpcom) to ec(ethercom)
- Simplify MII structure initialization.
- u_int*_t -> uint*_t.
- KNF
 1.40 05-Feb-2019  msaitoh Remove very old IFF_NOTRAILERS flag.
 1.39 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

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

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.37 22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.36 22-Feb-2017  nonaka branches: 1.36.6; 1.36.12;
Apply deferred if_start to more MD drivers.
 1.35 15-Dec-2016  ozaki-r branches: 1.35.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.34 10-Jun-2016  ozaki-r branches: 1.34.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.32 20-May-2015  ozaki-r Remove leftover use of AF_NS and NS option

Unnecessary NETISR_NS is also removed.
 1.31 08-Mar-2014  skrll branches: 1.31.6;
Remove unused variables
 1.30 02-Mar-2014  joerg Make the empty loop body explicit.
 1.29 12-Nov-2012  skrll branches: 1.29.2;
C99 types
 1.28 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.27 22-Jul-2012  matt branches: 1.27.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.26 01-Jul-2011  dyoung branches: 1.26.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.25 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.24 22-Jan-2010  martin branches: 1.24.2; 1.24.4;
Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
 1.23 19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.22 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.21 18-Mar-2009  cegger bzero -> memset
 1.20 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.19 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.18 10-May-2008  martin branches: 1.18.6; 1.18.12;
Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.17 28-Apr-2008  martin branches: 1.17.2;
Remove clause 3 and 4 from TNF licenses
 1.16 20-Jan-2008  dogcow branches: 1.16.10;
kill unused variables
 1.15 19-Jan-2008  dyoung Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

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

I have made a few miscellaneous changes, too:

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

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

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.14 19-Jan-2008  chris Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.13 17-Oct-2007  garbled branches: 1.13.2; 1.13.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

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

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.11 05-Mar-2007  he branches: 1.11.2; 1.11.4; 1.11.10;
Cast to char* before doing pointer arithmetic, convert one void* to char*
for ease of pointer arithmetic.
 1.10 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 24-Jan-2007  hubertf branches: 1.9.2;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.8 05-May-2006  thorpej branches: 1.8.8;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.7 29-Mar-2006  thorpej Use device_cfdata().
 1.6 18-Feb-2006  thorpej branches: 1.6.2; 1.6.4; 1.6.6;
- Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
associates the MAC address property with the epe device instance.
 1.5 24-Dec-2005  perry branches: 1.5.2; 1.5.4; 1.5.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 12-Nov-2005  hamajima add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.3 19-Oct-2005  hamajima Fix write sequence to PHY.
I write a data first, but I wrote a command first.
 1.2 17-Jan-2005  joff branches: 1.2.2; 1.2.8; 1.2.10; 1.2.12;
dont use TX intrs and various other performance improvements
 1.1 22-Dec-2004  joff branches: 1.1.2;
ep93xx processor on-chip 1/10/100 ethernet MAC driver
 1.1.2.1 29-Apr-2005  kent sync with -current
 1.2.12.1 26-Oct-2005  yamt sync with head
 1.2.10.4 21-Jan-2008  yamt sync with head
 1.2.10.3 03-Sep-2007  yamt sync with head.
 1.2.10.2 26-Feb-2007  yamt sync with head.
 1.2.10.1 21-Jun-2006  yamt sync with head.
 1.2.8.1 21-Oct-2005  riz Pull up following revision(s) (requested by hamajima in ticket #904):
sys/arch/arm/ep93xx/epe.c: revision 1.3
Fix write sequence to PHY.
I write a data first, but I wrote a command first.
 1.2.2.4 11-Dec-2005  christos Sync with head.
 1.2.2.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.2.1 17-Jan-2005  skrll file epe.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.5.6.2 01-Jun-2006  kardel Sync with head.
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Feb-2006  yamt sync with head.
 1.6.6.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.6.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.6.4.2 11-May-2006  elad sync with head
 1.6.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.6.2.2 24-May-2006  yamt sync with head.
 1.6.2.1 01-Apr-2006  yamt sync with head.
 1.8.8.1 01-Feb-2007  ad Sync with head.
 1.9.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.10.1 03-Oct-2007  garbled Sync with HEAD
 1.11.4.1 11-Jul-2007  mjf Sync with head.
 1.11.2.1 15-Jul-2007  ad Sync with head.
 1.12.12.2 23-Mar-2008  matt sync with HEAD
 1.12.12.1 06-Nov-2007  matt sync with HEAD
 1.12.10.2 20-Jan-2008  chris Sync to HEAD.
 1.12.10.1 01-Jan-2008  chris Sync with HEAD.
 1.12.6.1 28-Feb-2008  rjs Sync with HEAD.
 1.13.8.1 20-Jan-2008  bouyer Sync with HEAD
 1.13.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.10.3 11-Aug-2010  yamt sync with head.
 1.16.10.2 11-Mar-2010  yamt sync with head
 1.16.10.1 04-May-2009  yamt sync with head.
 1.17.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.4.1 30-May-2010  rmind sync with head
 1.24.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.26.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.26.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.26.2.1 30-Oct-2012  yamt sync with head
 1.27.2.3 03-Dec-2017  jdolecek update from HEAD
 1.27.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.29.2.1 18-May-2014  rmind sync with head
 1.31.6.5 28-Aug-2017  skrll Sync with HEAD
 1.31.6.4 05-Feb-2017  skrll Sync with HEAD
 1.31.6.3 09-Jul-2016  skrll Sync with HEAD
 1.31.6.2 19-Mar-2016  skrll Sync with HEAD
 1.31.6.1 06-Jun-2015  skrll Sync with HEAD
 1.34.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.34.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.35.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.36.12.3 26-Jan-2019  pgoyette Sync with HEAD
 1.36.12.2 28-Jul-2018  pgoyette Sync with HEAD
 1.36.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.36.6.2 24-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1416):

sys/dev/ic/i82586.c: revision 1.86
sys/arch/arm/ep93xx/epe.c: revision 1.45
sys/dev/pcmcia/if_cnw.c: revision 1.66
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.31
sys/dev/qbus/if_il.c: revision 1.36
sys/dev/pcmcia/if_ray.c: revision 1.95
sys/dev/qbus/if_qt.c: revision 1.24

if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.36.6.1 26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.38.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.38.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.38.2.1 10-Jun-2019  christos Sync with HEAD
 1.44.2.1 23-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #371):

sys/dev/ic/i82586.c: revision 1.86
sys/arch/arm/ep93xx/epe.c: revision 1.45
sys/dev/pcmcia/if_cnw.c: revision 1.66
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.31
sys/arch/arm/sunxi/sunxi_can.c: revision 1.2
sys/dev/qbus/if_il.c: revision 1.36
sys/dev/pcmcia/if_ray.c: revision 1.95
sys/dev/qbus/if_qt.c: revision 1.24

if_ipackets is incremented in can_input(), so don't increment it in
sunxi_can_rx_intr to prevent double count. OK'd by bouyer@.

if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.45.2.1 29-Feb-2020  ad Sync with head.
 1.50.10.1 02-Aug-2025  perseant Sync with HEAD
 1.5 21-Nov-2021  skrll Trailing whitespace.
 1.4 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.3 11-Dec-2005  christos branches: 1.3.80;
merge ktrace-lwp.
 1.2 17-Jan-2005  joff branches: 1.2.2;
dont use TX intrs and various other performance improvements
 1.1 22-Dec-2004  joff branches: 1.1.2;
ep93xx processor on-chip 1/10/100 ethernet MAC driver
 1.1.2.1 29-Apr-2005  kent sync with -current
 1.2.2.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.2.1 17-Jan-2005  skrll file epereg.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.80.1 11-Mar-2010  yamt sync with head
 1.8 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.7 12-Nov-2012  skrll C99 types
 1.6 22-Jul-2012  matt branches: 1.6.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.5 23-Oct-2009  snj branches: 1.5.12;
Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.4 04-Mar-2007  christos branches: 1.4.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 17-Jan-2005  joff branches: 1.2.2; 1.2.10;
dont use TX intrs and various other performance improvements
 1.1 22-Dec-2004  joff branches: 1.1.2;
ep93xx processor on-chip 1/10/100 ethernet MAC driver
 1.1.2.1 29-Apr-2005  kent sync with -current
 1.2.10.1 03-Sep-2007  yamt sync with head.
 1.2.2.2 17-Jan-2005  skrll Sync with HEAD.
 1.2.2.1 17-Jan-2005  skrll file epevar.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.4.46.1 11-Mar-2010  yamt sync with head
 1.5.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.5.12.1 30-Oct-2012  yamt sync with head
 1.6.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8 21-Nov-2021  skrll Trailing whitespace.
 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 27-Oct-2012  chs branches: 1.5.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 03-Aug-2009  he Move the include of <sys/gpio.h> up above <dev/gpio/gpiovar.h>, so that
GPIOMAXNAME gets defined before being used. Also remove the > 0 test on
NGPIO around the include of <sys/gpio.h>.
 1.2 27-Feb-2009  kenh Improved support for GPIO support on the EP93xx ARM processors.
Specifically:

Support disabling specific pins on specific ports.
Modification of TS7200 kernel config file for GPIO support.
Documentatin for the current and improved GPIO interface (epgpio).
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22; 1.1.86; 1.1.94; 1.1.100;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.100.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.94.1 03-Mar-2009  skrll Sync with HEAD.
 1.1.86.2 19-Aug-2009  yamt sync with head.
 1.1.86.1 04-May-2009  yamt sync with head.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epgpio.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epgpio.c was added on branch ktrace-lwp on 2005-12-11 10:28:15 +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.5.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.5.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.5.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.5.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.5.52.2 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.5.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epgpioreg.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epgpioreg.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epgpiovar.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epgpiovar.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.5 21-Nov-2021  skrll Trailing whitespace.
 1.4 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.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 26-Mar-2006  thorpej branches: 1.2.6;
Use device_unit() (and remove a couple of places where it is not
needed).
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.8; 1.1.10; 1.1.12; 1.1.14; 1.1.16;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.16.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.14.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.12.1 01-Apr-2006  yamt sync with head.
 1.1.10.1 22-Apr-2006  simonb Sync with head.
 1.1.8.1 09-Sep-2006  rpaulo sync with head
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epled.c was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.2.6.2 21-Jun-2006  yamt sync with head.
 1.2.6.1 26-Mar-2006  yamt file epled.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epledvar.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epledvar.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 09-Apr-2018  jakllsch branches: 1.9.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.8 23-Apr-2016  skrll branches: 1.8.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.7 12-Nov-2012  skrll branches: 1.7.12; 1.7.14; 1.7.18;
C99 types
 1.6 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.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 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.3 03-Apr-2008  drochner branches: 1.3.4; 1.3.12; 1.3.18;
update for device/softc split,
compile-tested by yamt -- could someone please give it a functional test?
 1.2 11-Dec-2005  christos branches: 1.2.76;
merge ktrace-lwp.
 1.1 22-Dec-2004  joff branches: 1.1.4;
ep93xx processor on-chip USB OHCI driver glue
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file epohci.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.4.1 04-May-2009  yamt sync with head.
 1.5.12.2 03-Dec-2017  jdolecek update from HEAD
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.7.18.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.7.14.4 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.7.14.3 05-Dec-2014  skrll KNF. Remove ( ) from return statements.
 1.7.14.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.7.14.1 03-Dec-2014  skrll Trailing whitespace.
 1.7.12.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.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.9.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.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.12 27-Sep-2022  skrll malloc -> kmem
 1.11 21-Nov-2021  skrll Trailing whitespace.
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 10-Nov-2019  chs branches: 1.8.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.7 27-Oct-2012  chs branches: 1.7.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 26-Jul-2011  dyoung branches: 1.6.2; 1.6.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 29-Jun-2008  hamajima fixed some bugs.
- correct argument of eppcic_set_pcreg()
- add wait after set of timing register
 1.3 17-Oct-2007  garbled branches: 1.3.16; 1.3.20; 1.3.22; 1.3.24;
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.2 09-Jul-2007  ad branches: 1.2.10; 1.2.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22; 1.1.36; 1.1.38; 1.1.44;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.44.1 03-Oct-2007  garbled Sync with HEAD
 1.1.38.1 11-Jul-2007  mjf Sync with head.
 1.1.36.1 15-Jul-2007  ad Sync with head.
 1.1.22.3 03-Sep-2007  yamt sync with head.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file eppcic.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file eppcic.c was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.2.12.1 06-Nov-2007  matt sync with HEAD
 1.2.10.1 01-Jan-2008  chris Sync with HEAD.
 1.3.24.1 03-Jul-2008  simonb Sync with head.
 1.3.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.20.1 04-May-2009  yamt sync with head.
 1.3.16.1 29-Jun-2008  mjf 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.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.10.2 18-Apr-2021  thorpej config_found() takes a device_t, not a softc. This is a bug left-over
from decoupling of device_t / softcs long ago.
 1.8.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 12-Nov-2012  skrll C99 types
 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 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22; 1.1.120; 1.1.130;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.130.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.120.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.120.1 30-Oct-2012  yamt sync with head
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file eppcicvar.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file eppcicvar.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.9 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.8 07-Sep-2025  thorpej Remove unnecessary NULL-initialization of TODR handle fields.
 1.7 21-Nov-2021  skrll Trailing whitespace.
 1.6 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.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 05-Jan-2010  mbalmer One semicolon is enough.
 1.3 12-Dec-2009  tsutsui Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
 1.2 04-Sep-2006  gdamore branches: 1.2.62;
Remove unused todr_setcal/todr_getcal and all the assorted stub
implementations.
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.8; 1.1.12; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.3 30-Dec-2006  yamt sync with head.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file eprtc.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.12.1 14-Sep-2006  yamt sync with head.
 1.1.8.1 09-Sep-2006  rpaulo sync with head
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file eprtc.c was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.2.62.1 11-Mar-2010  yamt sync with head
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.2 24-Mar-2022  andvar s/interger/integer/ and s/Compensatin/Compensation/ in comments.
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file eprtcreg.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file eprtcreg.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epsmcreg.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epsmcreg.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.16 21-Nov-2021  skrll Trailing whitespace.
 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 12-Nov-2012  skrll branches: 1.13.52;
C99 types
 1.12 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.11 01-Jul-2011  dyoung branches: 1.11.2; 1.11.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.9 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.8 10-May-2008  martin branches: 1.8.6; 1.8.12;
Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.7 28-Apr-2008  martin branches: 1.7.2;
Remove clause 3 and 4 from TNF licenses
 1.6 08-Mar-2006  lukem branches: 1.6.70;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.5 12-Nov-2005  hamajima branches: 1.5.6; 1.5.8; 1.5.10; 1.5.12;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 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 04-Jun-2005  he 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 22-Dec-2004  joff branches: 1.1.4;
ep93xx ARM system-on-chip support
 1.1.4.4 11-Dec-2005  christos Sync with head.
 1.1.4.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file epsoc.c was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.5.12.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.10.1 13-Mar-2006  yamt sync with head.
 1.5.8.1 22-Apr-2006  simonb Sync with head.
 1.5.6.1 09-Sep-2006  rpaulo sync with head
 1.6.70.2 11-Mar-2010  yamt sync with head
 1.6.70.1 04-May-2009  yamt sync with head.
 1.7.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.11.2.1 30-Oct-2012  yamt sync with head
 1.13.52.8 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.13.52.7 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.6 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.13.52.5 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.13.52.4 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.13.52.3 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 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.6 12-Nov-2012  skrll C99 types
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Oct-2009  snj Switch to a 2 clause license. Approved by joff@ (copyright holder).
 1.2 12-Nov-2005  hamajima branches: 1.2.82;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1 22-Dec-2004  joff branches: 1.1.4; 1.1.12;
ep93xx ARM system-on-chip support
 1.1.12.1 21-Jun-2006  yamt sync with head.
 1.1.4.3 11-Dec-2005  christos Sync with head.
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file epsocvar.h was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.82.1 11-Mar-2010  yamt sync with head
 1.4.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.6 21-Nov-2021  skrll Trailing whitespace.
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 21-Aug-2006  hamajima fix unterminated #ifdef. PR34240.
 1.2 26-Mar-2006  thorpej branches: 1.2.6; 1.2.8;
Use device_unit() (and remove a couple of places where it is not
needed).
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.8; 1.1.10; 1.1.12; 1.1.14; 1.1.16;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.16.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.1.14.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.12.2 03-Sep-2006  yamt sync with head.
 1.1.12.1 01-Apr-2006  yamt sync with head.
 1.1.10.1 22-Apr-2006  simonb Sync with head.
 1.1.8.1 09-Sep-2006  rpaulo sync with head
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epwdog.c was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.2.8.1 23-Aug-2006  tron Pull up following revision(s) (requested by hamajima in ticket #44):
sys/arch/arm/ep93xx/epwdog.c: revision 1.3
fix unterminated #ifdef. PR34240.
 1.2.6.3 30-Dec-2006  yamt sync with head.
 1.2.6.2 21-Jun-2006  yamt sync with head.
 1.2.6.1 26-Mar-2006  yamt file epwdog.c was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +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.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epwdogreg.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epwdogreg.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.1 12-Nov-2005  hamajima branches: 1.1.4; 1.1.22;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1.22.2 21-Jun-2006  yamt sync with head.
 1.1.22.1 12-Nov-2005  yamt file epwdogvar.h was added on branch yamt-lazymbuf on 2006-06-21 14:49:16 +0000
 1.1.4.2 11-Dec-2005  christos Sync with head.
 1.1.4.1 12-Nov-2005  christos file epwdogvar.h was added on branch ktrace-lwp on 2005-12-11 10:28:15 +0000
 1.4 27-Feb-2009  kenh Improved support for GPIO support on the EP93xx ARM processors.
Specifically:

Support disabling specific pins on specific ports.
Modification of TS7200 kernel config file for GPIO support.
Documentatin for the current and improved GPIO interface (epgpio).
 1.3 27-May-2008  hamajima branches: 1.3.6; 1.3.12;
- convert inline asm umull to C
- add "-march=armv4 -mtune=arm9" to CPUFLAGS

Relevant mailing list threads:
http://mail-index.netbsd.org/source-changes/2008/05/25/msg195537.html
http://mail-index.netbsd.org/port-arm/2008/05/26/msg000228.html
 1.2 12-Nov-2005  hamajima branches: 1.2.78; 1.2.80; 1.2.82; 1.2.84;
add new EP93xx device drivers.
epgpio: GPIO Interface (support gpio(4))
epled: LED on epgpio
eppcic: PCMCIA Interface
eprtc: Realtime clock
epwdog: Watchdog timer

changes
ep93xx_intr: add dummy entries to keep vmstat happy.
epclk: I use Timer1 and generate 100Hz if set.
epe: attach epclk and epgpio first.
fetch the Ethernet address from property if set.
I use config flags and modify MDCDIV.
 1.1 22-Dec-2004  joff branches: 1.1.4; 1.1.12;
ep93xx ARM system-on-chip support
 1.1.12.1 21-Jun-2006  yamt sync with head.
 1.1.4.3 11-Dec-2005  christos Sync with head.
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 22-Dec-2004  skrll file files.ep93xx was added on branch ktrace-lwp on 2005-01-17 19:29:12 +0000
 1.2.84.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.82.1 04-May-2009  yamt sync with head.
 1.2.80.1 04-Jun-2008  yamt sync with head
 1.2.78.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.6.1 03-Mar-2009  skrll Sync with HEAD.
 1.7 05-Nov-2022  jmcneill Handle speed change events
 1.6 01-Nov-2022  jmcneill On a system with both global and private timers, we cannot drive hardclock
from both or else time will move too fast.

Check MPIDR and install the global timer interrupt handler on uniprocessor
configs, and the private timer interrupt handler on MPCore configs.
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.1 10-Aug-2019  skrll branches: 1.1.2; 1.1.10; 1.1.12;
Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 10-Aug-2019  martin file a9ptmr_fdt.c was added on branch phil-wifi on 2020-04-13 08:03:34 +0000
 1.1.2.2 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.1.2.1 10-Aug-2019  martin file a9ptmr_fdt.c was added on branch netbsd-9 on 2019-08-15 09:49:49 +0000
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8 01-Nov-2022  jmcneill On a system with both global and private timers, we cannot drive hardclock
from both or else time will move too fast.

Check MPIDR and install the global timer interrupt handler on uniprocessor
configs, and the private timer interrupt handler on MPCore configs.
 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 27-Jan-2021  thorpej branches: 1.5.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.3 22-Jan-2019  jmcneill branches: 1.3.12;
Listen for PMFE_SPEED_CHANGED events and automatically update a9tmr frequency
 1.2 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.1 05-Jun-2018  hkenken branches: 1.1.2; 1.1.4;
Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 05-Jun-2018  pgoyette file a9tmr_fdt.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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-Jan-2021  thorpej branches: 1.2.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 10-Aug-2019  skrll branches: 1.1.2; 1.1.10; 1.1.12;
Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 10-Aug-2019  martin file a9wdt_fdt.c was added on branch phil-wifi on 2020-04-13 08:03:34 +0000
 1.1.2.2 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.1.2.1 10-Aug-2019  martin file a9wdt_fdt.c was added on branch netbsd-9 on 2019-08-15 09:49:49 +0000
 1.2.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.1 08-Jun-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.8; 1.1.24;
Add fdt glue for ARM PrimeCell Advanced Audio CODEC interface (PL041).
 1.1.24.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 08-Jun-2017  jdolecek file aaci_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 08-Jun-2017  skrll file aaci_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.2.2 09-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #17):
sys/arch/arm/fdt/aaci_fdt.c: revision 1.1
sys/arch/arm/fdt/files.fdt: revision 1.10
sys/arch/evbarm/conf/VEXPRESS_A15: revisions 1.14, 1.15
sys/conf/files: revision 1.1174
sys/dev/ic/pl041.c: revisions 1.1-1.3
sys/dev/ic/pl041var.h: revision 1.1
Add driver for ARM PrimeCell Advanced Audio CODEC interface (PL041).
Don't expect this driver to work on real hardware, but QEMU emulates it.
--
Add fdt glue for ARM PrimeCell Advanced Audio CODEC interface (PL041).
--
Add aaci at fdt, commented out for now. Driver should work (tm) but QEMU
and my old Thinkpad can't seem to keep up.
--
Fix two bugs:
- Inverted test for fifo status in aaci_write_data
- Return success from trigger_output (thanks nat)
--
Enable aaci
--
bus_space_write_multi_4 takes a count, not number of bytes. With this,
audio works in qemu.
 1.1.2.1 08-Jun-2017  snj file aaci_fdt.c was added on branch netbsd-8 on 2017-06-09 16:59:20 +0000
 1.25 08-Dec-2024  jmcneill acpi: Try PSCI before UEFI RT for shutdown/reset.

BSA says that an OS can use either UEFI RT or PSCI, and that the RT
implementation should just call PSCI.

Given the amount of implementation issues with UEFI RT, let's try PSCI
first, because it's nice to be able to reboot and poweroff even with
buggy firmware.
 1.24 25-Nov-2022  mrg branches: 1.24.8;
move the creation of machdep.smbios into platform_init().

"dmidecode -d /dev/smbios" now works on x86. also tested on arm64 (lx2k.)
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Jul-2021  jmcneill branches: 1.22.2;
smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.
 1.21 23-Jul-2021  jmcneill smbios: Support SMBIOS 2.x tables.
 1.20 22-Jul-2021  jmcneill Expose SMBIOS tables using sysctl machdep.dmi.*, same as x86.
 1.19 24-Apr-2021  thorpej branches: 1.19.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17 17-Jan-2021  jmcneill trailing whitespace
 1.16 10-Oct-2020  jmcneill branches: 1.16.2;
Support using EFI runtime services for RTC when booting in devicetree mode.
 1.15 15-Sep-2020  jmcneill If acpi_probe() falis, just panic now instead of failing mysteriously later.
 1.14 17-Jan-2020  jmcneill Add support for Arm N1 SDP PCIe host controller.

The N1 SDP has a few bugs that we need to work around:
- PCIe root port config space lives in a non-standard location.
- Access to PCIe config space of devices that do not exist results in
an sync SError. Firmware creates a "known devices" table at a fixed
physical address that we use to filter PCI conf access to only known
devices.

This change splits the Arm ACPI PCI quirks into separate files for each
host controller, and allows per-segment quirks to be applied.

These changes exposed some bugs in the MI ACPI layer related to
multi-segment support. The MI ACPI PCI code was using a shared PCI
chipset tag to access devices, and these accesses can happen before our
PCI host bridge drivers are attached! The global chipset tag is now gone,
and an MD callback can provide a custom tag on a per-segment basis.
 1.13 29-Dec-2019  jmcneill branches: 1.13.2;
Allow MD code to provide custom bus_dma tags on a per-node basis. On Arm
this is required to return non-coherent bus_dma tags for device nodes with
_CCA=0
 1.12 22-Jun-2019  jmcneill Finish the job
 1.11 22-Jun-2019  jakllsch Restore previous range of aa_dmat.

Should fix ahcisata_acpi on OverDrive 1000, which has no DRAM below 4GiB.
 1.10 19-Jun-2019  jmcneill Provide a 64-bit dma tag and use a coherent tag unless CCA=0
 1.9 12-Nov-2018  jmcneill branches: 1.9.4;
Support building kernels with ACPI and no PCI.
 1.8 31-Oct-2018  jmcneill Add MSI-X support
 1.7 28-Oct-2018  jmcneill Add support for EFI runtime services on aarch64.
 1.6 23-Oct-2018  jmcneill Expose SMBIOS table pointer via machdep.smbios sysctl
 1.5 21-Oct-2018  jmcneill Some parts of the ACPI subsystem depend on a valid PCI chipset tag in the
ACPI softc. Provide one here, and assume segment 0.
 1.4 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.3 15-Oct-2018  jmcneill branches: 1.3.2;
Add ARM ACPI PCI support.
 1.2 13-Oct-2018  jmcneill Support poweroff via PSCI
 1.1 12-Oct-2018  jmcneill Add acpi @ fdt glue
 1.3.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.2 20-Oct-2018  pgoyette Sync with head
 1.3.2.1 15-Oct-2018  pgoyette file acpi_fdt.c was added on branch pgoyette-compat on 2018-10-20 06:58:25 +0000
 1.9.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.4.2 10-Jun-2019  christos Sync with HEAD
 1.9.4.1 12-Nov-2018  christos file acpi_fdt.c was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.13.2.1 17-Jan-2020  ad Sync with head.
 1.16.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.18.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.19.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.22.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.24.8.1 02-Aug-2025  perseant Sync with HEAD
 1.3 05-Jan-2020  jmcneill Make the generic Arm platform available for arm32 as well.
 1.2 05-Jan-2020  jmcneill Use arm_fdt_cpu_bootstrap
 1.1 05-Jan-2020  jmcneill Add a generic Arm64 platform definition that is used as a fallback.

The generic platform assumes PSCI, a generic timer, pre-initialized UART
clocks, and adds a 4KB entry to the devmap for the console UART device.
 1.24 07-Sep-2025  thorpej No need to initialize efi_todr.cookie to NULL.
 1.23 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.22 30-Jan-2025  jmcneill Ignore broken UEFI RTS on Radxa Orion O6
 1.21 07-Apr-2023  skrll branches: 1.21.6;
Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.20 10-Oct-2021  jmcneill efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
 1.19 05-Sep-2021  jmcneill Remove unused arm_fdt_memory_dump
 1.18 30-Aug-2021  jmcneill Add FIQ support.
 1.17 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.16 24-Apr-2021  thorpej branches: 1.16.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.15 23-Feb-2021  jmcneill branches: 1.15.2;
Install a default irq handler that panics when no interrupt controller
driver is installed.
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 17-Dec-2020  skrll No need for PMAP_WRITE_BACK here (also aa32 pmap doesn't know about it)
 1.12 10-Oct-2020  jmcneill branches: 1.12.2;
Support using EFI runtime services for RTC when booting in devicetree mode.
 1.11 21-Jun-2020  jmcneill Add support for installing modules that were loaded by the bootloader.
 1.10 05-Jan-2020  jmcneill Add a generic Arm64 platform definition that is used as a fallback.

The generic platform assumes PSCI, a generic timer, pre-initialized UART
clocks, and adds a 4KB entry to the devmap for the console UART device.
 1.9 03-Jan-2019  jmcneill Remove unused variable
 1.8 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.7 10-Dec-2017  skrll branches: 1.7.2; 1.7.4;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.6 21-Sep-2017  skrll branches: 1.6.2;
Spaces to TABs
 1.5 24-Aug-2017  jmcneill branches: 1.5.2;
Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.4 29-Jun-2017  jmcneill Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
 1.3 30-May-2017  jmcneill branches: 1.3.2;
Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.2 30-May-2017  jmcneill Allow ARM FDT drivers to register per-cpu init callbacks. Run through this
callback list when a CPU hatches instead of calling gtmr_init_cpu_clock
directly.
 1.1 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.3.2.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.5.2.2 28-Aug-2017  skrll Sync with HEAD
 1.5.2.1 24-Aug-2017  skrll file arm_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 21-Sep-2017  jdolecek file arm_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.7.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.4.1 10-Jun-2019  christos Sync with HEAD
 1.7.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.7.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.12.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.15.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.16.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.21.6.1 02-Aug-2025  perseant Sync with HEAD
 1.20 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.19 05-Sep-2021  jmcneill Remove unused arm_fdt_memory_dump
 1.18 30-Aug-2021  jmcneill Add FIQ support.
 1.17 21-Jun-2020  jmcneill Add support for installing modules that were loaded by the bootloader.
 1.16 05-Jan-2020  jmcneill Add a generic Arm64 platform definition that is used as a fallback.

The generic platform assumes PSCI, a generic timer, pre-initialized UART
clocks, and adds a 4KB entry to the devmap for the console UART device.
 1.15 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.14 03-Jan-2019  jmcneill Remove unused variable
 1.13 03-Jan-2019  jmcneill Add a link set for cpu enable methods.
 1.12 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.11 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.10 12-Oct-2018  jmcneill Add optional ap_startup callback to struct arm_platform. This allows for
late (post-UVM init) initialization of platform specific stuff.
 1.9 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.8 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.7 24-Aug-2017  jmcneill branches: 1.7.2; 1.7.4; 1.7.6; 1.7.8;
Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.6 29-Jun-2017  jmcneill Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
 1.5 02-Jun-2017  jmcneill branches: 1.5.2;
Allow platform code to specify the UART frequency for consinit
 1.4 02-Jun-2017  jmcneill FDT-ize "delay" by having fdt_machdep provide the delay() function and
move the implementations into the platform code.
 1.3 30-May-2017  jmcneill Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.2 30-May-2017  jmcneill Allow ARM FDT drivers to register per-cpu init callbacks. Run through this
callback list when a CPU hatches instead of calling gtmr_init_cpu_clock
directly.
 1.1 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.5.2.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.7.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.8.1 10-Jun-2019  christos Sync with HEAD
 1.7.6.5 18-Jan-2019  pgoyette Synch with HEAD
 1.7.6.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.7.6.3 20-Oct-2018  pgoyette Sync with head
 1.7.6.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.7.6.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7.4.2 03-Dec-2017  jdolecek update from HEAD
 1.7.4.1 24-Aug-2017  jdolecek file arm_fdtvar.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.7.2.2 28-Aug-2017  skrll Sync with HEAD
 1.7.2.1 24-Aug-2017  skrll file arm_fdtvar.h was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.9 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.8 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.7 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.6 25-Feb-2023  skrll Restore the ability to have EARLYCONS work for the QEMU virt after
SOC_VIRT got removed.
 1.5 24-Apr-2021  thorpej 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 04-Feb-2021  thorpej branches: 1.4.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.3 28-Sep-2020  jmcneill branches: 1.3.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.2 06-Jan-2020  skrll branches: 1.2.6;
Fix DEVMAP build losage by reducing diffs between arm and aarch64

*sigh*
 1.1 05-Jan-2020  jmcneill Make the generic Arm platform available for arm32 as well.
 1.2.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.6.1 06-Jan-2020  martin file arm_platform.c was added on branch phil-wifi on 2020-04-08 14:07:29 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.13 14-Oct-2022  jmcneill Add a PCI resource manager and use it on Arm ACPI platforms.

The Arm ACPI code relied on PCI_NETBSD_CONFIGURE to configure devices that
were not enabled by system firmware. This is not safe to do unless the
firmware explicitly permits it using a device specific method defined in
the PCI firmware spec.

Introduce a new PCI resource manager that discovers what has already been
configured by firmware and allocates from the remaining space. This will
ensure that devices setup by firmware are untouched and only will program
BARs of devices that are not enabled at boot time.

The current implementation assumes that the parent PCI-PCI bridge's
are already configured. A worthwhile improvement in the future would be
to support programming windows for bridges that are not fully configured.
 1.12 17-Jul-2022  riastradh wsdisplay(4): Make most of struct vcons_data private.

More importantly, make sizeof(struct vcons_data) independent of
whether VCONS_DRAW_INTR &c. is defined.

Allocate the private space with kmem rather than in the caller.

This still doesn't have very good separation between interface
parameters and internal state, but it's better than before, and is
necessary to make genfb usable in modules.

In arm_simplefb.c, this removes use of the use_intr member. That
assignment became redundant with the introduction of vcons_earlyinit,
so there's no need to replace it by anything.
 1.11 30-Aug-2021  jmcneill Add 10-bit pixel format support.
 1.10 02-Mar-2021  jmcneill Fix previous: Each line is "stride" bytes wide, not "width * depth".

While here, add a comment explaining what this test is doing.
 1.9 02-Mar-2021  skrll Sanity check size vs width x height x depth. Buggy firmware exists.
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 17-Jan-2021  jmcneill Fit in 80 columns. NFC.
 1.6 17-Jan-2021  jmcneill Use vcons_earlyinit
 1.5 17-Jan-2021  jmcneill fix build without VCONS_DRAW_INTR
 1.4 21-Oct-2020  rin branches: 1.4.2;
Fix build for some arm32 kernels; arm_simplefb_reconfig() is used
only when NPCI > 0 && defined(PCI_NETBSD_CONFIGURE).
 1.3 20-Oct-2020  jmcneill Instead of trying to prevent pciconf from reconfiguring the firmware's
framebuffer, instead allow MD code to register callbacks. If a resource is
changed, the driver can unmap the old resource and remap the new. Do this
with simplefb so the console doesn't explode when the VGA device is
(potentially) reconfigured at boot.
 1.2 19-Oct-2020  rin Fix colors of 32-bpp raster console for evbarm/aarch64eb and armeb.

Most boards are configured to little-endian in initial, and switched
to big-endian after kernel is loaded. In this case, framebuffer seems
byte-swapped to CPU.

It is best to reconfigure framebuffer (as done recently for sunxi_mixer
by jmcneill), but in most cases, HW is incapable, or we just don't know
register bits to configure them.

Therefore, override "format" FDT property for "simple-framebuffer" to
let drivers know byte-order for 32-bpp framebuffer.

Then, make fdt/simplefb (genfb) and arm_simplefb (early console) detect
byte-swapped FB, and configure genfb(4) or rasops(4) layers accordingly.

Tested on Pine A64+ (arm_simplefb) and Cubietruck (both fdt/simplefb and
arm_simplefb).

Discussed with jmcneill. Thanks!!
 1.1 10-Oct-2020  jmcneill Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 20-Oct-2020  jmcneill Instead of trying to prevent pciconf from reconfiguring the firmware's
framebuffer, instead allow MD code to register callbacks. If a resource is
changed, the driver can unmap the old resource and remap the new. Do this
with simplefb so the console doesn't explode when the VGA device is
(potentially) reconfigured at boot.
 1.1 10-Oct-2020  jmcneill Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.4 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.3 29-May-2017  jmcneill Move console initialization out of platform code into the console drivers
themselves.
 1.2 28-May-2017  jmcneill Add a facility for platform-specific callbacks and use it to remove most
of the Tegra-specific code from tegra_machdep.c.

Platform code matches on the compatible property of the root ("/") DT node
and allows for chip-specific implementations of the following:

- devmap: Return a 0-terminated list of static device map entries.
- bootstrap: Early initialization of platform-specific facilities.
- early_putchar: Provides an implementation of putchar for use in early
debug messages.
- device_register: Platform-specific device register callback.
- reset: Platform-specific CPU reset implementation.
- consinit: Platform-specific console init implementation.
 1.1 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.3 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.2 29-May-2017  jmcneill Move console initialization out of platform code into the console drivers
themselves.
 1.1 28-May-2017  jmcneill Add a facility for platform-specific callbacks and use it to remove most
of the Tegra-specific code from tegra_machdep.c.

Platform code matches on the compatible property of the root ("/") DT node
and allows for chip-specific implementations of the following:

- devmap: Return a 0-terminated list of static device map entries.
- bootstrap: Early initialization of platform-specific facilities.
- early_putchar: Provides an implementation of putchar for use in early
debug messages.
- device_register: Platform-specific device register callback.
- reset: Platform-specific CPU reset implementation.
- consinit: Platform-specific console init implementation.
 1.44 10-May-2024  riastradh arm/fdt/cpu_fdt.c: Use `cpu' iattr to attach cpufreq.

Now that cpu has an explicit interface attribute, cpufeaturebus,
_all_ children of cpu must use an explicit interface attribute to
disambiguate. For children that weren't previously attached using an
explicit interface attribute, the name of the parent, `cpu', serves
as the iattr.

XXX I think we should either
(a) not use cpufreqbus, since in the aarch64 case it doesn't seem to
be passing any information through attach args, or
(b) create another iattr like cpufdtbus for use by cpufreq_dt.c,
which does rely on attach args, if it has to attach differently
from the rest of fdtbus.
But for now this should get aarch64 on fdt booting again.
 1.43 09-May-2024  pho kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.
 1.42 03-Mar-2022  riastradh arm: Use device_set_private for cpuN.

For cpu at fdt, nix the fdt softc -- this was leaked and never used
for anything. The device's private storage is the cpu_info.
 1.41 30-Aug-2021  jmcneill Inspect #address-cells to determine if the cpu-release-addr requires
a 32- or 64-bit write.
 1.40 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.39 24-Apr-2021  thorpej branches: 1.39.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.38 03-Dec-2020  skrll branches: 1.38.2;
Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.37 25-Nov-2020  skrll Fix comment. Spotted by jmcneill@
 1.36 10-Jun-2020  jmcneill branches: 1.36.2;
If enable-method is missing, try psci
 1.35 21-Feb-2020  skrll Improve a comment
 1.34 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.33 27-Jan-2020  jmcneill Match any node with device_type = "cpu"
 1.32 25-Jan-2020  skrll Wrap a long line
 1.31 12-Jan-2020  mrg provide some semblance of valid cpu topology for big.little systems.

while attaching cpus, if the FDT provides "capacity-dmips-mhz" track
the fastest set, and call cpu_topology_set() with slow=true for any
cpus that are not the fastest.

bug fix for cpu_topology_set(): actually set ci_is_slow for slow cpus.

with this change, and -current's recent scheduler changes, this means
that long running processes run on the faster cores. on RK3399 based
systems, i am seeing 20-50% speed ups for many tasks.


XXX: all this can be made common with armv7 big.little.
 1.30 01-Nov-2019  bad branches: 1.30.2;
fix typos in comment in previous.
 1.29 01-Nov-2019  bad re-apply r1.26. but only #if !defined(AARCH64).

not necessary on armv8 and cache ops are not available that early there.
 1.28 19-Oct-2019  jmcneill Increase aarch64 MAXCPUS to 256.
 1.27 17-Oct-2019  bad back out r1.26. it makes the pinebook fail to boot.
 1.26 15-Oct-2019  bad flush the dcache in cpu_enable_psci() before calling psci_cpu_on().

fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.

OK jmcneill@, skrll@

XXX pullup-9
 1.25 13-Apr-2019  jmcneill branches: 1.25.4;
If an enable-method property is present on the cpu node and not supported
by the kernel, try to use the enable-method from the cpus node instead.
 1.24 13-Apr-2019  jmcneill Fix build w/o PSCI
 1.23 13-Apr-2019  jmcneill The spin-table CPU enable method is only valid for 64-bit kernels.
 1.22 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.21 19-Jan-2019  jmcneill Add support for (FDT-ized) Amlogic Meson8b.
 1.20 03-Jan-2019  jmcneill No need to swap cpu-release-addr twice
 1.19 03-Jan-2019  jmcneill Add a link set for cpu enable methods.
 1.18 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.17 02-Jan-2019  skrll Avoid double negative
 1.16 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.15 04-Oct-2018  ryo fix to boot APs of RPI3 with GENERIC64.
if no psci, try other methods.
 1.14 13-Sep-2018  jmcneill Wrap arm_fdt_cpu_okay with #ifdef MULTIPROCESSOR
 1.13 10-Sep-2018  jmcneill Re-add support for cpu nodes with status = "disabled", lost in previous commit
 1.12 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.11 09-Sep-2018  jmcneill Ditch arm,arm-v8 compatible string (everything uses arm,armv8)
 1.10 05-Sep-2018  jmcneill Match non-standard compat string "arm,armv8" (should be "arm,arm-v8")
 1.9 26-Aug-2018  ryo add support multiple cpu clusters.
* pass cpu index as an argument to secondary processors when hatching.
* keep cpu cache confituration per cpu clusters.

Hello big.LITTLE!
 1.8 02-Jul-2018  jmcneill Attach cpufreq scaling provider to ourself, as cpus doesn't do this anymore
 1.7 22-Jun-2018  jmcneill branches: 1.7.2;
Match generic arm,arm-v8 compatible string
 1.6 15-Jun-2018  jakllsch Add "arm,arm-v7" to compatible strings.

(for `qemu-system-arm -M virt`)
 1.5 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.4 10-Dec-2017  skrll branches: 1.4.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.3 18-Sep-2017  jmcneill branches: 1.3.2;
Add support for arm,arm1176jzf-s
 1.2 18-Jun-2017  jmcneill branches: 1.2.4;
Only try to attach to CPUs with the same cluster ID as the boot processor.
 1.1 28-May-2017  jmcneill branches: 1.1.2;
Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.1.2.1 21-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #49):
sys/arch/arm/fdt/cpu_fdt.c: revision 1.2
Only try to attach to CPUs with the same cluster ID as the boot processor.
 1.2.4.2 28-Aug-2017  skrll Sync with HEAD
 1.2.4.1 18-Jun-2017  skrll file cpu_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 18-Sep-2017  jdolecek file cpu_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.4.2.8 26-Jan-2019  pgoyette Sync with HEAD
 1.4.2.7 18-Jan-2019  pgoyette Synch with HEAD
 1.4.2.6 20-Oct-2018  pgoyette Sync with head
 1.4.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.4.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.4.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.4.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.7.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.2.1 10-Jun-2019  christos Sync with HEAD
 1.25.4.2 01-Nov-2019  martin Pull up following revision(s) (requested by bad in ticket #342):

sys/arch/arm/fdt/cpu_fdt.c: revision 1.29
sys/arch/arm/fdt/cpu_fdt.c: revision 1.30

re-apply r1.26:
flush the dcache in cpu_enable_psci() before calling psci_cpu_on().
fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.
but only #if !defined(AARCH64).

not necessary on armv8 and cache ops are not available that early there.

fix typos in comment in previous.
 1.25.4.1 23-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #359):

sys/arch/aarch64/aarch64/locore.S: revision 1.42
sys/arch/aarch64/aarch64/locore.S: revision 1.43
sys/arch/aarch64/aarch64/locore.S: revision 1.44
sys/arch/arm/fdt/cpu_fdt.c: revision 1.28
sys/arch/aarch64/include/cpu.h: revision 1.14
sys/arch/aarch64/include/param.h: revision 1.12
sys/arch/arm/arm32/cpu.c: revision 1.133
sys/arch/arm/arm32/cpu.c: revision 1.134
sys/arch/arm/include/cpu.h: revision 1.101
sys/arch/arm/acpi/cpu_acpi.c: revision 1.7
sys/arch/aarch64/aarch64/cpu.c: revision 1.23
sys/arch/aarch64/aarch64/cpu.c: revision 1.24
sys/arch/aarch64/aarch64/cpu.c: revision 1.25

Increase aarch64 MAXCPUS to 256.

-

Invalidate dcache before polling AP hatched status

-

Avoid overlap between BP and last AP stack. AP stacks are now in order of
increasing address order.

Spotted by and idea from mlelstv.

-

Use separate cacheline aligned arrays for mbox and hatched as before.

-

cpu_hatched_p only for MULTIPROCESSOR
 1.30.2.3 29-Feb-2020  ad Sync with head.
 1.30.2.2 25-Jan-2020  ad Sync with head.
 1.30.2.1 17-Jan-2020  ad Sync with head.
 1.36.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.38.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.39.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 12-Jun-2023  skrll Call / define fdtbus_cpus_md_attach for platforms with cpus @ fdt.

The RISC-V binding here seems somewhat of an abuse, but it exists in
mainline linux.
 1.8 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.7 20-Sep-2021  jmcneill Make _splraise/_spllower/splx functions available to modules again.
 1.6 30-Aug-2021  jmcneill Add FIQ support.
 1.5 09-Nov-2018  jmcneill Increase max PIC sources
 1.4 05-Sep-2018  jmcneill Bump PIX_MAXSOURCES to 480
 1.3 15-Jun-2018  jakllsch branches: 1.3.2;
Bump PIC_MAXSOURCES to 352.

(`qemu-system-arm -M virt` currently needs 288)
 1.2 25-Aug-2017  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
Add initial support for Allwinner A13 and R8 SoCs.
 1.1 30-May-2017  jmcneill Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.2.6.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.6.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.6.1 25-Jun-2018  pgoyette Sync with HEAD
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 25-Aug-2017  jdolecek file fdt_intr.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 25-Aug-2017  skrll file fdt_intr.h was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.37 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.36 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.35 12-Jun-2023  skrll branches: 1.35.8;
Call / define fdtbus_cpus_md_attach for platforms with cpus @ fdt.

The RISC-V binding here seems somewhat of an abuse, but it exists in
mainline linux.
 1.34 22-Jul-2021  jmcneill Expose SMBIOS tables using sysctl machdep.dmi.*, same as x86.
 1.33 26-Apr-2021  thorpej armfdt does not need its own interface attribute; all of its children
attach to the "fdt" interface attribute.
 1.32 10-Oct-2020  jmcneill branches: 1.32.6;
Support early FB console attachment when booting with a devicetree
(non-ACPI mode). Inform the pciconf code about the framebuffer to
prevent pciconf from changing resources out from under us when framebuffer
memory is in VRAM.
 1.31 07-Jan-2020  skrll arm_platform requires gtmr and psci. Should fix build failures.
 1.30 05-Jan-2020  jmcneill Make the generic Arm platform available for arm32 as well.
 1.29 10-Aug-2019  skrll Add a driver for the A5/A9 Private timer.

While here FDTise the Watchdog driver.
 1.28 05-Dec-2018  jmcneill branches: 1.28.4;
Split armv7/armv8 tprof backend config logic from the fdt bus glue.
 1.27 12-Oct-2018  jmcneill Add acpi @ fdt glue
 1.26 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.25 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.24 08-Sep-2018  jmcneill Add FDT generic PCI host controller driver.
 1.23 17-Aug-2018  skrll Whitespace
 1.22 08-Aug-2018  jmcneill Add GICv3 FDT glue
 1.21 15-Jul-2018  jmcneill Add support for ARMv7 performance monitor (PMU).
 1.20 15-Jul-2018  jmcneill Add glue for ARMv8 performance monitor (PMU).
 1.19 30-Jun-2018  jmcneill cpus: use fdt_add_bus
 1.18 30-Jun-2018  jmcneill Allow nodes to attach child devices using the same sorting rules as used
by the simplebus driver.
 1.17 20-Jun-2018  hkenken branches: 1.17.2;
Add l2cc support.
 1.16 05-Jun-2018  hkenken Rename ARM A9 Global Timer driver name to support fdt.

- Rename a9tmr to arma9tmr.
- Add a9tmr_fdt.c based gtmr_fdt.c.
 1.15 19-Feb-2018  jmcneill branches: 1.15.2;
move plfb glue to the correct location
 1.14 02-Oct-2017  jmcneill branches: 1.14.2;
Add generic DT cpu frequency and voltage scaling driver.
 1.13 26-Aug-2017  jmcneill Until config supports multiple 'attach driver at bus with <foo>' lines,
move plfb from common files.fdt to files.vexpress
 1.12 28-Jun-2017  jmcneill Add support for ARM Power State Coordination Interface (PSCI).
 1.11 08-Jun-2017  jmcneill Add fdt glue for plrtc
 1.10 08-Jun-2017  jmcneill Add fdt glue for ARM PrimeCell Advanced Audio CODEC interface (PL041).
 1.9 03-Jun-2017  jmcneill branches: 1.9.2;
Add and enable FDT glue for ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse
interface.
 1.8 03-Jun-2017  jmcneill Add driver for ARM PrimeCell Color LCD controller (PL111).
 1.7 02-Jun-2017  jmcneill Add fdt glue for ARM PrimeCell UART (PL011).
 1.6 02-Jun-2017  jmcneill Add fdt glue for ARM PrimeCell Multimedia Card Interface (MMCI).
 1.5 02-Jun-2017  jmcneill Add fdt glue for SMSC LAN9118 ethernet.
 1.4 30-May-2017  jmcneill Fix VERBOSE_INIT_ARM build with TEGRA kernel.
 1.3 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.2 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.1 13-Dec-2015  jmcneill branches: 1.1.2;
fdt glue for gic
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 13-Dec-2015  skrll file files.fdt was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.9.2.3 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.9.2.2 10-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #19):
sys/arch/arm/fdt/files.fdt: revision 1.11
sys/arch/arm/fdt/plrtc_fdt.c: revision 1.1
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.16
sys/conf/files: revision 1.1175
sys/dev/ic/pl031.c: revision 1.1
sys/dev/ic/pl031var.h: revision 1.1
Add driver for ARM PrimeCell PL031 (RTC) Real Time Clock.
--
Add fdt glue for plrtc
--
Add plrtc driver
 1.9.2.1 09-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #17):
sys/arch/arm/fdt/aaci_fdt.c: revision 1.1
sys/arch/arm/fdt/files.fdt: revision 1.10
sys/arch/evbarm/conf/VEXPRESS_A15: revisions 1.14, 1.15
sys/conf/files: revision 1.1174
sys/dev/ic/pl041.c: revisions 1.1-1.3
sys/dev/ic/pl041var.h: revision 1.1
Add driver for ARM PrimeCell Advanced Audio CODEC interface (PL041).
Don't expect this driver to work on real hardware, but QEMU emulates it.
--
Add fdt glue for ARM PrimeCell Advanced Audio CODEC interface (PL041).
--
Add aaci at fdt, commented out for now. Driver should work (tm) but QEMU
and my old Thinkpad can't seem to keep up.
--
Fix two bugs:
- Inverted test for fifo status in aaci_write_data
- Return success from trigger_output (thanks nat)
--
Enable aaci
--
bus_space_write_multi_4 takes a count, not number of bytes. With this,
audio works in qemu.
 1.14.2.2 03-Dec-2017  jdolecek update from HEAD
 1.14.2.1 02-Oct-2017  jdolecek file files.fdt was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.15.2.6 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.15.2.5 20-Oct-2018  pgoyette Sync with head
 1.15.2.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.15.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.15.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.15.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.17.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.2.1 10-Jun-2019  christos Sync with HEAD
 1.28.4.1 15-Aug-2019  martin Pull up following revision(s) (requested by skrll in ticket #55):

sys/arch/arm/cortex/a9wdt.c: revision 1.10
sys/arch/evbarm/conf/HUMMINGBOARD: revision 1.9
sys/arch/evbarm/conf/GENERIC: revision 1.50
sys/arch/evbarm/conf/NITROGEN6X: revision 1.24
sys/arch/arm/cortex/a9tmr_var.h: revision 1.7
sys/arch/arm/fdt/files.fdt: revision 1.29
sys/arch/arm/amlogic/meson_platform.c: revision 1.12
sys/arch/arm/amlogic/meson8b_pinctrl.c: revision 1.2
sys/arch/arm/amlogic/meson_platform.c: revision 1.13
sys/arch/evbarm/conf/BCM5301X: revision 1.34
sys/arch/arm/dts/meson8b.dtsi: revision 1.6
sys/arch/arm/fdt/a9ptmr_fdt.c: revision 1.1
sys/arch/arm/dts/meson8b.dtsi: revision 1.7
sys/arch/arm/cortex/a9ptmr_var.h: revision 1.1
sys/arch/evbarm/conf/PANDABOARD: revision 1.30
sys/arch/evbarm/conf/DUOVERO: revision 1.14
sys/arch/arm/cortex/a9ptmr.c: revision 1.1
sys/arch/arm/cortex/a9ptmr.c: revision 1.2
sys/arch/arm/fdt/a9wdt_fdt.c: revision 1.1
sys/arch/evbarm/conf/BCM56340: revision 1.19
sys/arch/evbarm/conf/CUBOX-I: revision 1.23
sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.4
sys/arch/evbarm/conf/PARALLELLA: revision 1.7
sys/arch/arm/cortex/files.cortex: revision 1.12
sys/arch/arm/dts/meson8b-odroidc1.dts: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revision 1.9
sys/arch/evbarm/conf/ZEDBOARD: revision 1.6

spaces to tab

-

Add a driver for the A5/A9 Private timer.
While here FDTise the Watchdog driver.

-

Update for recent a9wdt changes
-

Trailing whitespace

-
Updates to get Odroid-C1 in better shape since the last DTS import

-

Various fixes / changes
- don't use prescaler
- improve AB_DEBUG output
- fix a9ptmr_delay to work with a decrementing counter!
Thanks to jmcneill@ for proving I'm an idiot

-

Add eth_rxd3 and eth_rxd2 pinctrl groups

-

Catch up to recent mainline dts changes
 1.32.6.2 01-Aug-2021  thorpej Sync with HEAD.
 1.32.6.1 13-May-2021  thorpej Sync with HEAD.
 1.35.8.1 16-Sep-2025  snj Pull up following revision(s) (requested by rin in ticket #31):

sys/arch/arm/fdt/files.fdt: revision 1.37
sys/arch/riscv/fdt/files.fdt: revision 1.5
sys/dev/fdt/files.fdt: revision 1.75 via patch

Prune fdt_platform.c from sys/dev/fdt/files.fdt and explicitly pull
in at sys/arch/arm/fdt/files.fdt and sys/arch/riscv/fdt/files.fdt.
Unbreaks OCTEON build.
 1.26 02-Dec-2024  skrll Fix attachment for GICs above 4GB
 1.25 11-Aug-2022  riastradh branches: 1.25.10;
gic at fdt: Don't assume all irqs are established on disestablish.

Fixes panic on detach of PCI devices on pcihost.
 1.24 04-Nov-2021  jakllsch make compilable at NPCI==0
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.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.21 27-Jan-2021  thorpej branches: 1.21.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.20 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.19 25-Nov-2020  jmcneill Fix off-by-one when printing the range of SPIs in a GICv2m frame
 1.18 24-Nov-2019  skrll branches: 1.18.8;
Remove unnecessary cast and wrap a long line.
 1.17 19-Jul-2019  hkenken Fixed compile error.
 1.16 26-Jan-2019  thorpej Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.15 12-Nov-2018  jmcneill Only attach v2m if PCI support is present
 1.14 11-Nov-2018  jmcneill Add GICv2m support
 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 15-Jul-2018  jmcneill Return the real interrupt handle from gic_fdt_establish
 1.11 03-Jul-2018  jmcneill Make IRQ sharing work again
 1.10 20-Jun-2018  hkenken branches: 1.10.2;
Support Cortex-A9 (addr_d > addr_c).
 1.9 06-Jun-2018  jakllsch more completely gic_fdt_disestablish() such that it's possible to
re-establish later
 1.8 30-Nov-2017  skrll branches: 1.8.2; 1.8.4;
Handle NULL arg interrupt handlers that want the clock frame.
 1.7 02-Jul-2017  jmcneill Disallow sharing between MPSAFE and non-MPSAFE handlers.
 1.6 29-Jun-2017  jmcneill Don't allow sharing edge and level triggered interrupts.
 1.5 28-Jun-2017  jmcneill Support interrupt sharing.
 1.4 30-May-2017  jmcneill branches: 1.4.2;
Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.3 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.2 05-Jan-2016  marty FDT: Interrupts -- add support for interrupt maps

The mct on exynos uses an interrupt map so we add support now. Devices
represent their interrupts either through a combination of interrupt-parent
and interrupts properties, where the 'interrupts' property is an array of
one or more interrupt specifiers; or through a combination of an
interrupt-parent that points to an interrupt-map, where the interrupt-map
contains 2 or more entries consisting of an index, a pointer to an
interrupt-controller, and a specifier for that controller.

This code adds the ability to walk the interrupt-map and return a specifier.
Unfortunately, the addition requires changing the interface to the
interrupt-controllers' _establish and _intstr functions, so this check in
contains a rototill of the three existing fdt interrupt controllers to use
the new interface.
 1.1 13-Dec-2015  jmcneill branches: 1.1.2;
fdt glue for gic
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 19-Mar-2016  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 13-Dec-2015  skrll file gic_fdt.c was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.4.2.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.8.4.5 26-Jan-2019  pgoyette Sync with HEAD
 1.8.4.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.8.4.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.8.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.8.2.2 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 30-Nov-2017  jdolecek file gic_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.10.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.18.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.18.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.21.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.25.10.1 02-Aug-2025  perseant Sync with HEAD
 1.16 17-Nov-2021  jmcneill gicv3: add support for mbi-alias property

The mbi-alias property, if present, contains the base address of a GICD
alias frame that contains only SET/CLRSPI registers. Use this instead of
the GICD register frame if present.
 1.15 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.14 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.13 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.12 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() for the GICv3
quirk table.
 1.11 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.10 25-Nov-2020  jmcneill Add support for message-based interrupts.
 1.9 24-Nov-2020  jmcneill Improve detection of NS vs S views of priorities.

For PMR, write a 0 to bit7 and see if it sticks. This is only possible from
NS EL1 if we have a non-secure view of ICC_PMR_EL1.

For int priorities (GICD/GICR interfaces and LPIs), assume that the
GICD_CTLR.DS bit is telling us the truth.

RK3399 is special here when using the vendor bootloader, so keep the
auto-detection from the previous commit but limit the scope to only run
on RK3399 SOCs.
 1.8 19-Jul-2019  hkenken branches: 1.8.10;
Fixed compile error.
 1.7 26-Jan-2019  thorpej branches: 1.7.4;
Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.6 24-Nov-2018  jakllsch attach GICv3 ITS where applicable
 1.5 19-Nov-2018  jakllsch avoid NULL deref in gicv3_fdt_disestablish()
 1.4 10-Nov-2018  jmcneill Initialize gic softc dma tag
 1.3 29-Sep-2018  jmcneill Stop searching for redistributors in a region after we find a redistributor
with the Last bit set in GICR_TYPER.
 1.2 12-Aug-2018  jmcneill branches: 1.2.2;
Use aprint_debug for redist count print
 1.1 08-Aug-2018  jmcneill Add GICv3 FDT glue
 1.2.2.5 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.1 12-Aug-2018  pgoyette file gicv3_fdt.c was added on branch pgoyette-compat on 2018-09-06 06:55:26 +0000
 1.7.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.4.2 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 26-Jan-2019  christos file gicv3_fdt.c was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.8.10.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.12 12-Nov-2021  jmcneill gtmr: Add support for arm,cpu-registers-not-fw-configured property.

On armv7, arm,cpu-registers-not-fw-configured means that firmware hasn't
bothered to configure any generic timer registers and we need to
initialize cntfrq ourselves.
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 27-Jan-2021  thorpej branches: 1.9.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.7 30-Nov-2017  skrll branches: 1.7.2; 1.7.18;
typo
 1.6 30-Nov-2017  skrll When attaching gtmr at fdt use fdtbus_intr_establish to establish the
gtmr interrupt.
 1.5 24-Aug-2017  jmcneill branches: 1.5.2;
Add __HAVE_GENERIC_CPU_INITCLOCKS option. If set, don't export
cpu_initclocks from device drivers as common code (in this case FDT) will
provide its own copy.
 1.4 20-Jul-2017  jmcneill Match arm,armv8-timer compat string
 1.3 30-May-2017  jmcneill Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.2 30-May-2017  jmcneill Allow ARM FDT drivers to register per-cpu init callbacks. Run through this
callback list when a CPU hatches instead of calling gtmr_init_cpu_clock
directly.
 1.1 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.5.2.2 28-Aug-2017  skrll Sync with HEAD
 1.5.2.1 24-Aug-2017  skrll file gtmr_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.7.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 30-Nov-2017  jdolecek file gtmr_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.9.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 19-Jan-2019  jmcneill branches: 1.2.12;
Add support for (FDT-ized) Amlogic Meson8b.
 1.1 20-Jun-2018  hkenken branches: 1.1.2; 1.1.4;
Add l2cc support.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 20-Jun-2018  pgoyette file l2cc_fdt.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.33 12-Jan-2024  skrll Trailing whitespace.
 1.32 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.31 06-Sep-2022  skrll pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.
 1.30 04-Sep-2022  skrll Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes
 1.29 04-Sep-2022  skrll pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.
 1.28 13-Aug-2022  jmcneill Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.
 1.27 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 12-May-2021  thorpej branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.
 1.24 24-Apr-2021  thorpej branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.22 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.21 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.20 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.19 15-Jan-2021  ryo add fdtbus_intr_establish_xname() function
 1.18 10-Oct-2020  jmcneill branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node
 1.17 07-Jul-2020  thorpej 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.16 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.15 07-Jan-2020  skrll Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())
 1.14 07-Jan-2020  skrll oops more KNF
 1.13 07-Jan-2020  skrll KNF
 1.12 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.11 23-Jun-2019  jmcneill branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies
 1.10 12-Jun-2019  jmcneill Support configuring ranges where only prefetchable memory is defined
 1.9 12-Jun-2019  jmcneill Enable RK3399 PCIe.
 1.8 28-Feb-2019  jakllsch branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.
 1.7 28-Feb-2019  jakllsch Implement support for IO space, and better-handle both variants of MMIO space.
 1.6 19-Nov-2018  jmcneill Clear PCI_FLAGS_IO_OKAY as we don't support it yet.
 1.5 16-Nov-2018  jakllsch make pcihost_intr_evcnt static, like the other functions
 1.4 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.3 11-Nov-2018  jmcneill Add MSI/MSI-X support.
 1.2 09-Sep-2018  jmcneill branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.
 1.1 08-Sep-2018  jmcneill Add FDT generic PCI host controller driver.
 1.2.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.1 09-Sep-2018  pgoyette file pcihost_fdt.c was added on branch pgoyette-compat on 2018-09-30 01:45:38 +0000
 1.8.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.4.2 10-Jun-2019  christos Sync with HEAD
 1.8.4.1 28-Feb-2019  christos file pcihost_fdt.c was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.11.2.1 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.18.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.23.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.24.4.1 31-May-2021  cjep sync with head
 1.24.2.1 13-May-2021  thorpej Sync with HEAD.
 1.25.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 06-Sep-2022  skrll pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.
 1.4 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.3 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.2 12-Jun-2019  jmcneill branches: 1.2.2;
Enable RK3399 PCIe.
 1.1 28-Feb-2019  jakllsch branches: 1.1.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.
 1.1.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 28-Feb-2019  christos file pcihost_fdtvar.h was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.2.2.1 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.7 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.6 24-Jan-2023  mlelstv Add support for FIFOs and hardware flow-control to plcom driver.
Add a PLCOM_TYPE_GENERIC_UART variant to match SBSA requirements.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.3 23-Oct-2018  jmcneill branches: 1.3.12;
Fix blank line printed at attach on ACPI
 1.2 07-Sep-2018  jmcneill Print interrupt info
 1.1 02-Jun-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.12; 1.1.14;
Add fdt glue for ARM PrimeCell UART (PL011).
 1.1.14.1 10-Jun-2019  christos Sync with HEAD
 1.1.12.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.12.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 02-Jun-2017  jdolecek file plcom_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jun-2017  skrll file plcom_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 23-Jul-2019  jmcneill branches: 1.4.10;
Add support for WSDISPLAY_MULTICONS
 1.3 06-Jul-2019  jmcneill If panel timings are missing, assume 800x600
 1.2 06-Jun-2017  jmcneill branches: 1.2.4; 1.2.6; 1.2.10;
Allow plfb to be the console device
 1.1 03-Jun-2017  jmcneill branches: 1.1.2;
Add driver for ARM PrimeCell Color LCD controller (PL111).
 1.1.2.1 06-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #13):
sys/arch/arm/fdt/plfb_fdt.c: revision 1.2
sys/arch/arm/vexpress/vexpress_platform.c: revision 1.3
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.13
sys/arch/evbarm/fdt/fdt_machdep.c: revisions 1.5, 1.6
sys/dev/ic/pl050.c: revision 1.2
Fix spelling of WS_DEFAULT_FG and WS_KERNEL_FG options.
--
Attach kbd slot to console
--
Allow plfb to be the console device
--
Add support for stdout-path= kernel cmdline option to override the
console device specified in the FDT.
--
Initialize boot_args before bootstrap for the benefit of platform code.
--
Allow 'console=fb' to act as a shortcut on vexpress for
'stdout-path=/smb@08000000/motherboard/iofpga@3,00000000/clcd@1f0000'
 1.2.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.2 03-Dec-2017  jdolecek update from HEAD
 1.2.6.1 06-Jun-2017  jdolecek file plfb_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.2.4.2 28-Aug-2017  skrll Sync with HEAD
 1.2.4.1 06-Jun-2017  skrll file plfb_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.4.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.1 03-Jun-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.26;
Add and enable FDT glue for ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse
interface.
 1.1.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 03-Jun-2017  jdolecek file plkmi_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 03-Jun-2017  skrll file plkmi_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.2 12-Jun-2019  skrll branches: 1.2.10;
Print interrupt details
 1.1 02-Jun-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.14;
Add fdt glue for ARM PrimeCell Multimedia Card Interface (MMCI).
 1.1.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 02-Jun-2017  jdolecek file plmmc_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jun-2017  skrll file plmmc_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.2.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 08-Sep-2025  thorpej Garbage-collect fdtbus_todr_attach(); todr_attach() does all the
necessary work now.

kern/59630
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 08-Jun-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.8; 1.1.24;
Add fdt glue for plrtc
 1.1.24.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 08-Jun-2017  jdolecek file plrtc_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 08-Jun-2017  skrll file plrtc_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.2.2 10-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #19):
sys/arch/arm/fdt/files.fdt: revision 1.11
sys/arch/arm/fdt/plrtc_fdt.c: revision 1.1
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.16
sys/conf/files: revision 1.1175
sys/dev/ic/pl031.c: revision 1.1
sys/dev/ic/pl031var.h: revision 1.1
Add driver for ARM PrimeCell PL031 (RTC) Real Time Clock.
--
Add fdt glue for plrtc
--
Add plrtc driver
 1.1.2.1 08-Jun-2017  snj file plrtc_fdt.c was added on branch netbsd-8 on 2017-06-10 05:57:08 +0000
 1.12 02-Oct-2023  riastradh armpmu(4): Add missing newline to error message.
 1.11 09-Nov-2022  ryo fdt/pmu was not working. do return only if there is an error.
 1.10 25-Nov-2021  skrll Improve error handling.

Hypervisors can return a PMCR.N of 0.
 1.9 27-Sep-2021  jmcneill No longer need to call arm_pmu_init on all CPUs.
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.6 29-Jun-2019  jmcneill branches: 1.6.10;
Add support for multiple PMUs
 1.5 21-Jan-2019  skrll branches: 1.5.4;
Use ci_{package,core,smt}_id instead of ci_data.cpu_{package,core,smt}_id

NFC
 1.4 12-Aug-2018  jmcneill Only attempt to set interrupt affinity if we have more than one IRQ.
 1.3 16-Jul-2018  jmcneill branches: 1.3.2;
aarch64 build fix
 1.2 15-Jul-2018  jmcneill Add support for ARMv7 performance monitor (PMU).
 1.1 15-Jul-2018  jmcneill Add glue for ARMv8 performance monitor (PMU).
 1.3.2.4 26-Jan-2019  pgoyette Sync with HEAD
 1.3.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.1 16-Jul-2018  pgoyette file pmu_fdt.c was added on branch pgoyette-compat on 2018-07-28 04:37:28 +0000
 1.5.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 21-Jan-2019  christos file pmu_fdt.c was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.6.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.21 06-Aug-2021  jmcneill Arm: Add support for SMC Calling Convention

Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
version.
 1.20 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.19 17-Oct-2018  skrll branches: 1.19.12;
KNF
 1.18 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.17 09-Sep-2018  jmcneill Boot APs with status "disabled" if they have an enable-method property
 1.16 09-Sep-2018  jmcneill Fix previous; PSCI_CPU_ON requires an MPIDR!
 1.15 26-Aug-2018  ryo add support multiple cpu clusters.
* pass cpu index as an argument to secondary processors when hatching.
* keep cpu cache confituration per cpu clusters.

Hello big.LITTLE!
 1.14 24-Aug-2018  ryo /cpus node may have any nodes except cpu. count only nodes of device_type "cpu"
 1.13 13-Aug-2018  skrll Need to use fdtbus_get_reg64 for mpidr
 1.12 12-Aug-2018  skrll Provide and use cpu_mpidr_aff_read in psci_fdt_bootstrap
 1.11 10-Aug-2018  jmcneill Pass full mpidr (instead of just aff0) to psci_cpu_on
 1.10 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.9 14-Jul-2018  jmcneill Fix non-MULTIPROCESSOR build
 1.8 09-Jul-2018  jmcneill Fix arm32 build
 1.7 09-Jul-2018  jmcneill Add aarch64 support.
 1.6 07-Jul-2018  jmcneill Switch to PSCI 0.1 mode only if the first compatible string listed on /psci is "arm,psci"
 1.5 15-Jun-2018  jakllsch branches: 1.5.2;
Fix PSCI 0.1 detection.
 1.4 26-May-2018  jmcneill Export a psci_fdt_reset function, usable from FDT platform code.
 1.3 11-Sep-2017  jmcneill branches: 1.3.2; 1.3.4;
Use PSCI for reset and poweroff when available.
 1.2 05-Aug-2017  jmcneill branches: 1.2.2;
Wrap MP-specific code in ifdef MULTIPROCESSOR
 1.1 28-Jun-2017  jmcneill branches: 1.1.4;
Add support for ARM Power State Coordination Interface (PSCI).
 1.1.4.3 18-Jun-2018  martin Pull up following revision(s) (requested by jakllsch in ticket #883):

sys/arch/arm/fdt/psci_fdt.c: revision 1.5
sys/arch/arm/arm/psci.c: revision 1.2

Use correct value for PSCI 0.2+ PSCI_CPU_ON.

Fix PSCI 0.1 detection.
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file psci_fdt.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 05-Aug-2017  skrll file psci_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.3.4.5 20-Oct-2018  pgoyette Sync with head
 1.3.4.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.3.4.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.3.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 11-Sep-2017  jdolecek file psci_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.5.2.1 10-Jun-2019  christos Sync with HEAD
 1.19.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.2 26-May-2018  jmcneill branches: 1.2.2;
Export a psci_fdt_reset function, usable from FDT platform code.
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add support for ARM Power State Coordination Interface (PSCI).
 1.1.10.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.10.1 25-Jun-2018  pgoyette Sync with HEAD
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 28-Jun-2017  jdolecek file psci_fdt.h was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file psci_fdt.h was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file psci_fdt.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.1 10-Sep-2018  ryo branches: 1.1.2; 1.1.6;
cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 10-Sep-2018  christos file psci_fdtvar.h was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.1.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.1 10-Sep-2018  pgoyette file psci_fdtvar.h was added on branch pgoyette-compat on 2018-09-30 01:45:38 +0000
 1.5 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.2 03-Nov-2019  jmcneill branches: 1.2.8;
Match smsc,lan9115 and honour local-mac-address/mac-address properties
 1.1 02-Jun-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.14; 1.1.18;
Add fdt glue for SMSC LAN9118 ethernet.
 1.1.18.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 02-Jun-2017  jdolecek file smsh_fdt.c was added on branch tls-maxphys on 2017-12-03 11:35:52 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jun-2017  skrll file smsh_fdt.c was added on branch nick-nhusb on 2017-08-28 17:51:30 +0000
 1.2.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.3 25-Oct-2002  jdolecek do not install footbridge_irqhandler.h
 1.2 22-Oct-2002  chris netwinder and cats can share irqhandler.h, so move (and rename) into the
footbridge dir, and share it.
 1.1 28-Sep-2002  chris branches: 1.1.2; 1.1.4; 1.1.6;
cats and netwinder can share a common footbridge_intr.h file, so install and
share a common file.
 1.1.6.2 09-Nov-2002  bjh21 Catch up with -current.
 1.1.6.1 24-Oct-2002  bjh21 Sync with trunk.
 1.1.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 28-Sep-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-10-18 02:35:24 +0000
 1.1.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.1 28-Sep-2002  jdolecek file Makefile was added on branch kqueue on 2002-10-10 18:31:47 +0000
 1.2 20-Jun-2001  chris branches: 1.2.8;
Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.1 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.2.8.2 20-Jun-2001  chris Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.2.8.1 20-Jun-2001  chris file cyclone_boot.h was added on branch nathanw_sa on 2001-06-20 22:14:34 +0000
 1.3 24-Aug-2021  skrll lower case for hex numbers.
consistent #define<tab>
same binary before and after.
 1.2 09-Jun-2001  chris branches: 1.2.8;
Typo police: 28285 -> 21285
Also garbage collect the old kernel VM map defines for footbridge.
 1.1 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.2.8.2 09-Jun-2001  chris Typo police: 28285 -> 21285
Also garbage collect the old kernel VM map defines for footbridge.
 1.2.8.1 09-Jun-2001  chris file dc21285mem.h was added on branch nathanw_sa on 2001-06-09 10:44:12 +0000
 1.5 14-Dec-2007  chris Fix for PR cats/18026.

cats was never able to dump a kernel core dump because reading from
VGA addresses (0xb8000) was causing the system to hang.

To workaround this reprogram the footbridge to map the memory to appear on
the PCI bus at 0x20000000, rather than at 0x0. Also configure the pci bus
to have a DMA range so that data is mapped correctly.

Note that -current kernels seem to hang when unmounting the fs. This
is a seperate issue, and appears to be because interrupts need to be
enabled to unmount filesystems.

So using reboot 0x104 does work, as it does a sync without unmounting the
filesystems.

Also arm savecore doesn't do anything with the memroy dump, as on arm we
currently just dump the raw memory, there's no header block to indicate
memory sizes or other useful information.
 1.4 17-Jan-2003  thorpej branches: 1.4.18; 1.4.76; 1.4.80; 1.4.82; 1.4.92; 1.4.96;
Merge the nathanw_sa branch.
 1.3 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.2 28-Sep-2002  chris branches: 1.2.2;
Interrupt 19 does actually do something:
19 PMCSR written by host
(all to do with power management)
 1.1 09-Jun-2001  chris branches: 1.1.2; 1.1.8;
Move the footbridge dir out of arm32 into arm.
 1.1.8.4 11-Nov-2002  nathanw Catch up to -current
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 11-Apr-2002  thorpej TIMER_MAX -> TIMER_MAX_VAL, so as not to conflict with TIMER_MAX
in <sys/time.h>
 1.1.8.1 09-Jun-2001  thorpej file dc21285reg.h was added on branch nathanw_sa on 2002-04-11 06:29:40 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.4.96.1 02-Jan-2008  bouyer Sync with HEAD
 1.4.92.1 26-Dec-2007  ad Sync with head.
 1.4.82.1 09-Jan-2008  matt sync with HEAD
 1.4.80.1 01-Jan-2008  chris Sync with HEAD.
 1.4.76.1 26-Dec-2007  rjs Sync with HEAD.
 1.4.18.1 21-Jan-2008  yamt sync with head
 1.5 20-Jun-2001  chris branches: 1.5.8;
Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.4 19-Jun-2001  wiz `response', not `responce'
 1.3 19-Jun-2001  wiz `accessible' only has one `a'.
 1.2 09-Jun-2001  chris Typo police: 28285 -> 21285
Also garbage collect the old kernel VM map defines for footbridge.
 1.1 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.5.8.2 20-Jun-2001  chris Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.5.8.1 20-Jun-2001  chris file ebsa285_machdep.c was added on branch nathanw_sa on 2001-06-20 22:14:34 +0000
 1.30 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.29 13-Aug-2021  skrll Trailing whitespace
 1.28 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.27 24-Apr-2021  thorpej branches: 1.27.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.26 10-Oct-2012  skrll branches: 1.26.52;
Update comments to reflect the real function prototypes.

From chuq.
 1.25 01-Jul-2011  dyoung branches: 1.25.2; 1.25.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.24 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.23 18-Nov-2010  skrll branches: 1.23.2;
Comment KNF.
 1.22 18-Nov-2010  skrll Remove commented out setting of SDRAM_MEMORY_ADDR - it's set later on.
 1.21 21-Jul-2009  skrll branches: 1.21.4;
device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.20 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.19 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.18 14-Dec-2007  chris branches: 1.18.10; 1.18.18; 1.18.24;
Fix for PR cats/18026.

cats was never able to dump a kernel core dump because reading from
VGA addresses (0xb8000) was causing the system to hang.

To workaround this reprogram the footbridge to map the memory to appear on
the PCI bus at 0x20000000, rather than at 0x0. Also configure the pci bus
to have a DMA range so that data is mapped correctly.

Note that -current kernels seem to hang when unmounting the fs. This
is a seperate issue, and appears to be because interrupts need to be
enabled to unmount filesystems.

So using reboot 0x104 does work, as it does a sync without unmounting the
filesystems.

Also arm savecore doesn't do anything with the memroy dump, as on arm we
currently just dump the raw memory, there's no header block to indicate
memory sizes or other useful information.
 1.17 06-Jan-2007  christos branches: 1.17.20; 1.17.24; 1.17.26; 1.17.34; 1.17.38;
Add generic TOD support. From Bucky Katz.
 1.16 11-Dec-2005  christos branches: 1.16.20; 1.16.24;
merge ktrace-lwp.
 1.15 30-Aug-2004  drochner branches: 1.15.12;
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.14 15-Jun-2003  fvdl branches: 1.14.2;
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.13 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.12 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.11 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.10 02-Oct-2002  thorpej branches: 1.10.2;
Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.7 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.6 04-May-2002  chris branches: 1.6.2;
Implement a proper delay routine for footbridge based systems. Note that
until the footbridge is attached we still have to rely on a loop. This
uses TIMER_3 running at 100Hz.
Sadly this doesn't appear to fix the tlp problems, which either means that this
delay routine is not as accurate as it should/could be or tlp is still broken.
 1.5 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.4 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.3 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.2 05-Sep-2001  matt branches: 1.2.6;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.9 03-Jan-2003  thorpej Sync with HEAD.
 1.2.6.8 11-Nov-2002  nathanw Catch up to -current
 1.2.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.2.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.2.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.3 11-Jan-2002  nathanw More catchup.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 05-Sep-2001  nathanw file footbridge.c was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.6.2.1 30-May-2002  gehenna Catch up with -current.
 1.10.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Sep-2004  skrll Sync with HEAD
 1.15.12.2 21-Jan-2008  yamt sync with head
 1.15.12.1 26-Feb-2007  yamt sync with head.
 1.16.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.16.20.1 12-Jan-2007  ad Sync with head.
 1.17.38.1 02-Jan-2008  bouyer Sync with HEAD
 1.17.34.1 26-Dec-2007  ad Sync with head.
 1.17.26.1 09-Jan-2008  matt sync with HEAD
 1.17.24.2 01-Jan-2008  chris Sync with HEAD.
 1.17.24.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.17.20.1 26-Dec-2007  rjs Sync with HEAD.
 1.18.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.10.2 19-Aug-2009  yamt sync with head.
 1.18.10.1 04-May-2009  yamt sync with head.
 1.21.4.2 31-May-2011  rmind sync with head
 1.21.4.1 05-Mar-2011  rmind sync with head
 1.23.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.1 30-Oct-2012  yamt sync with head
 1.26.52.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.27.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 04-May-2002  chris branches: 1.2.120; 1.2.128; 1.2.134;
Implement a proper delay routine for footbridge based systems. Note that
until the footbridge is attached we still have to rely on a loop. This
uses TIMER_3 running at 100Hz.
Sadly this doesn't appear to fix the tlp problems, which either means that this
delay routine is not as accurate as it should/could be or tlp is still broken.
 1.1 05-Jan-2002  chris branches: 1.1.2; 1.1.4;
Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.4.1 05-Jan-2002  nathanw file footbridge.h was added on branch nathanw_sa on 2002-01-11 23:38:02 +0000
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 05-Jan-2002  thorpej file footbridge.h was added on branch kqueue on 2002-01-10 19:37:51 +0000
 1.2.134.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.128.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.120.1 04-May-2009  yamt sync with head.
 1.27 13-Aug-2021  skrll Trailing whitespace
 1.26 21-Jul-2009  skrll device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.25 20-Sep-2008  chris Fix kernel boot issue on cats.

The delay(9) loop, used before the clock device is probed and a hardware timer
is available, was out by a factor of 625.

This wasn't an issue until revision 1.45 of sys/dev/ic/pckbc.c which switched
to using delay(9) when polling the keyboard controller.

Cats attaches the console (and pckbc) before the clock has been probed, and so
the delay loop code is used causing issue with the keyboard polling.
 1.24 03-Dec-2007  ad branches: 1.24.14; 1.24.18; 1.24.20; 1.24.24;
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.23 11-Sep-2006  gdamore branches: 1.23.10; 1.23.26; 1.23.28; 1.23.30; 1.23.32; 1.23.38;
Convert netwinder and cats (and any other footbridge based system in the
future) to timecounters, using the dc21285_fclk. ok nick@, chris@.
 1.22 11-Sep-2006  gdamore ANSIfy, and KNF fixes.
 1.21 17-Apr-2006  chris branches: 1.21.8;
Simplify delay loop by moving the maths to before the loop.
There is minimal risk of overflow unless something delays >134s.
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.6; 1.20.8; 1.20.10; 1.20.12;
merge ktrace-lwp.
 1.19 02-Jun-2005  he branches: 1.19.2;
Adapt to shadowing and qualifier-cast warnings.
 1.18 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.17 23-Mar-2003  chris branches: 1.17.2;
Add __KERNEL_RCSID tags to footbridge files.
 1.16 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.14 29-Oct-2002  tsutsui Initialize statprev in setstatclockrate().
 1.13 10-Oct-2002  chris branches: 1.13.2;
Fix thinko from this morning, delay is reentrant, so resetting the timer
to 0 on entry will confuse any already running delay.
 1.12 10-Oct-2002  chris Minor tweaks to footbridge's delay, always reset the timer when starting delay run (and set last to the counter value).
When the read value is 0, reset the timer (don't wait till the next loop round to reset it)
Add a bit of debug to the calibration stuff to make sure its working ok.
 1.11 05-Oct-2002  chris Add random jitter to stat clock, the random jitter is +- 511 usec's, so
we should average the nominal clock rate.

stathz now runs at hz (the hard clock hz), without getting high amounts of
time in interrupt handling.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 28-Sep-2002  chris Enable the use of a seperate statclock.

Currently statclock runs at 64hz, maybe it should be faster or slower, I did
try it being the same as hz, but that just made it look like we spent 10% of
time handling interrupts, rather than the 3% that this gives.

Also fix the IPL_LEVELS for netwinder.
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 04-May-2002  chris Implement a proper delay routine for footbridge based systems. Note that
until the footbridge is attached we still have to rely on a loop. This
uses TIMER_3 running at 100Hz.
Sadly this doesn't appear to fix the tlp problems, which either means that this
delay routine is not as accurate as it should/could be or tlp is still broken.
 1.5 02-May-2002  mycroft Fix off-by-one error in delay().
 1.4 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.3 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.2 05-Sep-2001  matt branches: 1.2.6;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.8 11-Nov-2002  nathanw Catch up to -current
 1.2.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.2.6.5 11-Apr-2002  thorpej TIMER_MAX -> TIMER_MAX_VAL, so as not to conflict with TIMER_MAX
in <sys/time.h>
 1.2.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.3 11-Jan-2002  nathanw More catchup.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 05-Sep-2001  nathanw file footbridge_clock.c was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.13.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.17.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.2.3 07-Dec-2007  yamt sync with head
 1.19.2.2 30-Dec-2006  yamt sync with head.
 1.19.2.1 21-Jun-2006  yamt sync with head.
 1.20.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.20.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.20.8.2 14-Sep-2006  yamt sync with head.
 1.20.8.1 24-May-2006  yamt sync with head.
 1.20.6.1 22-Apr-2006  simonb Sync with head.
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.21.8.1 18-Nov-2006  ad Sync with head.
 1.23.38.1 08-Dec-2007  mjf Sync with HEAD.
 1.23.32.1 09-Jan-2008  matt sync with HEAD
 1.23.30.1 01-Jan-2008  chris Sync with HEAD.
 1.23.28.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.23.26.1 26-Dec-2007  rjs Sync with HEAD.
 1.23.10.1 03-Dec-2007  ad Sync with HEAD.
 1.24.24.1 19-Oct-2008  haad Sync with HEAD.
 1.24.20.1 10-Oct-2008  skrll Sync with HEAD.
 1.24.18.2 19-Aug-2009  yamt sync with head.
 1.24.18.1 04-May-2009  yamt sync with head.
 1.24.14.1 28-Sep-2008  mjf Sync with HEAD.
 1.40 13-Aug-2021  skrll Trailing whitespace
 1.39 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.38 25-Jul-2014  dholland branches: 1.38.40;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.37 16-Mar-2014  dholland branches: 1.37.2;
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.36 17-Nov-2013  skrll Remove unused variables.
 1.35 10-Oct-2012  skrll branches: 1.35.2;
Update comments to reflect the real function prototypes.

From chuq.
 1.34 01-Jul-2011  dyoung branches: 1.34.2; 1.34.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.33 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.32 21-Jul-2009  skrll branches: 1.32.4; 1.32.6;
device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.31 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.30 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.29 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.28 13-Jun-2008  cegger branches: 1.28.4; 1.28.10;
use device_lookup_private to get softc
 1.27 19-Nov-2007  ad branches: 1.27.14; 1.27.16; 1.27.18; 1.27.20; 1.27.22;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.26 18-Oct-2007  joerg branches: 1.26.2;
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.25 17-Oct-2007  garbled 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 09-Jul-2007  ad branches: 1.24.6; 1.24.8; 1.24.10; 1.24.12; 1.24.16;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.23 04-Mar-2007  christos branches: 1.23.2; 1.23.4; 1.23.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 01-Oct-2006  elad branches: 1.22.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.21 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.20 23-Jul-2006  ad branches: 1.20.4; 1.20.6;
Use the LWP cached credentials where sane.
 1.19 14-May-2006  elad integrate kauth.
 1.18 26-Mar-2006  thorpej Use device_unit().
 1.17 06-Mar-2006  he branches: 1.17.2; 1.17.4;
Delete the local definitions of CLR, SET and ISSET, since they are
now in <sys/types.h>.
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.6; 1.16.8;
merge ktrace-lwp.
 1.15 29-Jun-2003  fvdl branches: 1.15.2; 1.15.18;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.14 29-Jun-2003  chris Fixes to get cats build going following proc to lwp changes.
 1.13 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.12 06-Mar-2003  skrll Add NULL cn_halt and cn_flush entries to consdevs. Hi Matt!
 1.11 04-Nov-2002  itohy Dump DDB_* and SYMTAB_SPACE options to opt_ddbparam.h rather than opt_ddb.h.
These options are used in limited files but #include "opt_ddb.h" are
everywhere, and changing them caused almost full recompilation.
 1.10 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.9 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.8 02-Oct-2002  thorpej branches: 1.8.2;
Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.5 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.4 17-Mar-2002  atatat branches: 1.4.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.3 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.2 05-Sep-2001  matt branches: 1.2.2; 1.2.6;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.7 11-Nov-2002  nathanw Catch up to -current
 1.2.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.5 17-Sep-2002  nathanw Catch up to -current.
 1.2.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.2 11-Jan-2002  nathanw More catchup.
 1.2.6.1 05-Sep-2001  nathanw file footbridge_com.c was added on branch nathanw_sa on 2002-01-11 23:38:03 +0000
 1.2.2.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.2.2.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.4.4.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.8.2.2 09-Nov-2002  bjh21 Catch up with -current.
 1.8.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.15.18.5 07-Dec-2007  yamt sync with head
 1.15.18.4 27-Oct-2007  yamt sync with head.
 1.15.18.3 03-Sep-2007  yamt sync with head.
 1.15.18.2 30-Dec-2006  yamt sync with head.
 1.15.18.1 21-Jun-2006  yamt sync with head.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 13-Aug-2004  skrll Adapt to branch.

cats GENERIC compiles.
 1.16.8.4 11-Aug-2006  yamt sync with head
 1.16.8.3 24-May-2006  yamt sync with head.
 1.16.8.2 01-Apr-2006  yamt sync with head.
 1.16.8.1 13-Mar-2006  yamt sync with head.
 1.16.6.2 01-Jun-2006  kardel Sync with head.
 1.16.6.1 22-Apr-2006  simonb Sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.4.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.17.4.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.17.2.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.17.2.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.17.2.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.17.2.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.20.6.1 22-Oct-2006  yamt sync with head
 1.20.4.1 18-Nov-2006  ad Sync with head.
 1.22.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.23.10.1 03-Oct-2007  garbled Sync with HEAD
 1.23.4.1 11-Jul-2007  mjf Sync with head.
 1.23.2.3 03-Dec-2007  ad Sync with HEAD.
 1.23.2.2 23-Oct-2007  ad Sync with head.
 1.23.2.1 15-Jul-2007  ad Sync with head.
 1.24.16.2 21-Nov-2007  bouyer Sync with HEAD
 1.24.16.1 25-Oct-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 21-Nov-2007  joerg Sync with HEAD.
 1.24.8.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.24.6.2 26-Dec-2007  rjs Sync with HEAD.
 1.24.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.26.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.27.22.1 18-Jun-2008  simonb Sync with head.
 1.27.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.27.18.2 19-Aug-2009  yamt sync with head.
 1.27.18.1 04-May-2009  yamt sync with head.
 1.27.16.1 17-Jun-2008  yamt sync with head.
 1.27.14.1 29-Jun-2008  mjf Sync with HEAD.
 1.28.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.32.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.32.4.1 31-May-2011  rmind sync with head
 1.34.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.34.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.34.2.1 30-Oct-2012  yamt sync with head
 1.35.2.1 18-May-2014  rmind sync with head
 1.37.2.1 10-Aug-2014  tls Rebase.
 1.38.40.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.10 13-Aug-2021  skrll Trailing whitespace
 1.9 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.8 12-Feb-2012  matt branches: 1.8.46;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.7 01-Jul-2011  dyoung branches: 1.7.2; 1.7.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 23-Mar-2003  chris branches: 1.5.110; 1.5.118; 1.5.124;
Add __KERNEL_RCSID tags to footbridge files.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.2 10-Sep-2001  chris branches: 1.2.4;
Add stubs for mmap to footbridge, must implement proper mmap real soon.
 1.1 09-Jun-2001  chris branches: 1.1.2; 1.1.4;
Move the footbridge dir out of arm32 into arm.
 1.1.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.1 10-Sep-2001  nathanw file footbridge_com_io.c was added on branch nathanw_sa on 2002-04-17 00:02:28 +0000
 1.5.124.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.118.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.110.1 04-May-2009  yamt sync with head.
 1.7.6.1 18-Feb-2012  mrg merge to -current.
 1.7.2.1 17-Apr-2012  yamt sync with head
 1.8.46.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.1 09-Jun-2001  chris branches: 1.1.2; 1.1.8;
Move the footbridge dir out of arm32 into arm.
 1.1.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.8.1 09-Jun-2001  nathanw file footbridge_com_io_asm.S was added on branch nathanw_sa on 2002-04-17 00:02:29 +0000
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.22 13-Aug-2021  skrll Trailing whitespace
 1.21 09-Dec-2020  martin Remove <sys/param.h> include and assume users already include that.
Removes an include cycle when including <sys/resource.h> via:
ys/time.h, sys/timevar.h, sys/mutex.h, sys/intr.h on top of this
file, and sys/param.h, uvm/uvm_param.h, sys/resourcevar.h below.
 1.20 01-Jun-2018  mrg branches: 1.20.14;
include <sys/param.h> for the cddl proc.h vs our lwp.h.

this fixes build issues with cats/netwinder since the zfs/dtrace update.
 1.19 25-Jan-2016  christos branches: 1.19.16;
protect locore.
 1.18 25-Jan-2016  christos Move the ipl_cookie_t definition earlier, since the mutex internal impl
uses it.
 1.17 25-Jan-2016  christos This is a mess:

-> sys/mutex.h -> sys/intr.h -> machine/intr.h -> footbridge/footbridge_intr.h
-> arm/cpu.h -> sys/cpu_data.h -> sys/sched.h -> sys/time.h -> sys/timevar.h
-> sys/systm.h -> sys/param.h -> uvm_param.h -> sys/resourcevar.h

Now sys/resourcevar.h needs a concrete definition of kmutex_t, and
although we started including sys/mutex.h we never got to include
machine/mutex.h which actually defines it, since the footbridge_intr.h
took us for a long ride. Take the easy way out and include
arm/mutex.h in footbridge_intr.h so that we get the definition we
need.
 1.16 04-Feb-2014  matt branches: 1.16.6;
_setsoftintr is long dead. reap any leftovers from arm.
 1.15 10-Jun-2012  skrll branches: 1.15.2; 1.15.4;
Remove unused __NEWINTR defines
 1.14 13-Feb-2009  he branches: 1.14.12;
Allow kern_ssp.c to build. That file includes <sys/intr.h> without
first including <sys/cpu.h>, so include <arm/cpu.h> here so that
curcpl() and set_curcpl() are declared before they are used.
 1.13 27-Apr-2008  matt branches: 1.13.8; 1.13.10; 1.13.14;
Merge kernel changes in matt-armv6 to HEAD.
 1.12 04-Jan-2008  ad branches: 1.12.6; 1.12.8; 1.12.10;
Header cleanup.
 1.11 03-Dec-2007  ad branches: 1.11.6;
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.10 09-Mar-2007  thorpej branches: 1.10.2; 1.10.16; 1.10.18; 1.10.20; 1.10.22; 1.10.28;
Make ipl_t and ipl_cookie_t 8-bit values. kmutex is now down to 12 bytes
(from 20) on ARM.

Approved by Matt Thomas.
 1.9 21-Dec-2006  yamt branches: 1.9.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.8 16-Apr-2006  chris branches: 1.8.8; 1.8.10;
Use __insn_barrier() to prevent the compiler reordering splx/splraise
relative to the code they're supposed to protect.
 1.7 01-Jan-2006  yamt branches: 1.7.2; 1.7.4; 1.7.6; 1.7.8; 1.7.10;
implement splraiseipl() for the following ports.
evbarm, iyonix, cats, netwinder, acorn26

reviewed by Bill Studenmund.
 1.6 24-Dec-2005  perry branches: 1.6.2;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 16-Jun-2003  thorpej branches: 1.5.18;
Rename IPL_IMP -> IPL_VM.
 1.4 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.3 11-Nov-2002  chris Belatedly correct the copyright notice. I ported the new footbridge IRQ code
from the xscale interrupt code, it therefore should have Jason/Wasabi
copyright.

There is none of the original arm32 derived interrupt code here.
 1.2 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.1 28-Sep-2002  chris branches: 1.1.2; 1.1.4; 1.1.6;
cats and netwinder can share a common footbridge_intr.h file, so install and
share a common file.
 1.1.6.1 09-Nov-2002  bjh21 Catch up with -current.
 1.1.4.5 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.3 11-Nov-2002  nathanw Catch up to -current
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 28-Sep-2002  nathanw file footbridge_intr.h was added on branch nathanw_sa on 2002-10-18 02:35:25 +0000
 1.1.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.1 28-Sep-2002  jdolecek file footbridge_intr.h was added on branch kqueue on 2002-10-10 18:31:47 +0000
 1.5.18.5 21-Jan-2008  yamt sync with head
 1.5.18.4 07-Dec-2007  yamt sync with head
 1.5.18.3 03-Sep-2007  yamt sync with head.
 1.5.18.2 30-Dec-2006  yamt sync with head.
 1.5.18.1 21-Jun-2006  yamt sync with head.
 1.6.2.1 15-Jan-2006  yamt sync with head.
 1.7.10.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.8.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.6.1 24-May-2006  yamt sync with head.
 1.7.4.1 22-Apr-2006  simonb Sync with head.
 1.7.2.1 09-Sep-2006  rpaulo sync with head
 1.8.10.1 21-Sep-2006  yamt implement new api for cats and netwinder.
 1.8.8.1 12-Jan-2007  ad Sync with head.
 1.9.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.28.2 18-Feb-2008  mjf Sync with HEAD.
 1.10.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.10.22.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.22.2 09-Jan-2008  matt sync with HEAD
 1.10.22.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.10.20.5 20-Jan-2008  chris Sync to HEAD.
 1.10.20.4 01-Jan-2008  chris Sync with HEAD.
 1.10.20.3 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.10.20.2 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.10.20.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.10.18.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.10.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.10.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.10.2.1 03-Dec-2007  ad Sync with HEAD.
 1.11.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.10.2 04-May-2009  yamt 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.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.10.1 15-Mar-2009  snj Pull up following revision(s) (requested by christos in ticket #458):
sys/arch/arm/footbridge/footbridge_intr.h: revision 1.14
Allow kern_ssp.c to build. That file includes <sys/intr.h> without
first including <sys/cpu.h>, so include <arm/cpu.h> here so that
curcpl() and set_curcpl() are declared before they are used.
 1.13.8.1 03-Mar-2009  skrll Sync with HEAD.
 1.14.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.12.1 30-Oct-2012  yamt sync with head
 1.15.4.1 18-May-2014  rmind sync with head
 1.15.2.2 03-Dec-2017  jdolecek update from HEAD
 1.15.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.6.1 19-Mar-2016  skrll Sync with HEAD
 1.19.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.20.14.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.26 23-May-2022  andvar s/boundries/boundaries/, s/itterate/iterate/ and few more typos.
 1.25 13-Aug-2021  skrll Trailing whitespace
 1.24 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.23 13-Jun-2017  skrll branches: 1.23.4;
Use devmap if available
 1.22 22-Feb-2014  matt branches: 1.22.6; 1.22.22;
Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.21 12-Feb-2012  matt branches: 1.21.6; 1.21.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.20 01-Jul-2011  dyoung branches: 1.20.2; 1.20.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 22-Nov-2010  skrll Fix thinko in previous.
 1.18 18-Nov-2010  skrll Implement footbridge_io_bs_mmap.
 1.17 18-Nov-2010  skrll Whitespace.
 1.16 15-Dec-2009  skrll branches: 1.16.4;
Fix ancient bug. footbridge_mem_bs_mmap should return a page number.
 1.15 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.14 17-Oct-2007  garbled branches: 1.14.20; 1.14.28; 1.14.34;
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.13 18-Jul-2007  uwe branches: 1.13.6; 1.13.8;
Implement footbridge_mem_bs_mmap. Needed for mmaping igsfb(4)
framebuffer on netwinder.
 1.12 24-Nov-2005  yamt branches: 1.12.24; 1.12.30; 1.12.38; 1.12.40; 1.12.42; 1.12.44;
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.11 30-Jul-2005  chris branches: 1.11.6;
When the footbridge does a bus space mapping it should default to
making the mapping not cacheable, and only allow caching if the relevant
flag is passed in.

This doesn't seem to fix, or break anything, but it matches the expected
bus space API.
 1.10 01-Apr-2005  yamt branches: 1.10.2;
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 01-Apr-2003  thorpej branches: 1.9.2; 1.9.10; 1.9.12;
Use PAGE_SIZE rather than NBPG.
 1.8 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.5 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.4 10-Sep-2001  chris branches: 1.4.4;
Add stubs for mmap to footbridge, must implement proper mmap real soon.
 1.3 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.2 28-Jul-2001  chris branches: 1.2.2;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.4.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.4.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.4.4.2 11-Jan-2002  nathanw More catchup.
 1.4.4.1 10-Sep-2001  nathanw file footbridge_io.c was added on branch nathanw_sa on 2002-01-11 23:38:03 +0000
 1.9.12.2 11-Feb-2005  yamt fix a typo.
 1.9.12.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.9.10.1 29-Apr-2005  kent sync with -current
 1.9.2.3 11-Dec-2005  christos Sync with head.
 1.9.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.1 01-Apr-2005  skrll 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.6.1 29-Nov-2005  yamt sync with head.
 1.12.44.1 15-Aug-2007  skrll Sync with HEAD.
 1.12.42.1 07-Aug-2007  matt Sync with HEAD.
 1.12.40.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.12.38.1 03-Oct-2007  garbled Sync with HEAD
 1.12.30.1 20-Aug-2007  ad Sync with HEAD.
 1.12.24.1 23-Jul-2007  liamjfoy Pull up following revision(s) (requested by uwe in ticket #784):
sys/arch/arm/footbridge/footbridge_io.c: revision 1.13
Implement footbridge_mem_bs_mmap. Needed for mmaping igsfb(4)
framebuffer on netwinder.
 1.13.8.1 06-Nov-2007  matt sync with HEAD
 1.13.6.1 01-Jan-2008  chris Sync with HEAD.
 1.14.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.20.2 11-Mar-2010  yamt sync with head
 1.14.20.1 04-May-2009  yamt sync with head.
 1.16.4.1 05-Mar-2011  rmind sync with head
 1.20.6.1 18-Feb-2012  mrg merge to -current.
 1.20.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.20.2.1 17-Apr-2012  yamt sync with head
 1.21.10.1 18-May-2014  rmind sync with head
 1.21.6.2 03-Dec-2017  jdolecek update from HEAD
 1.21.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.22.1 05-Jul-2017  martin Pull up following revision(s) (requested by skrll in ticket #83):
sys/arch/cats/cats/cats_machdep.c: revision 1.84
sys/arch/arm/footbridge/footbridge_io.c: revision 1.23
sys/arch/cats/conf/GENERIC: revision 1.162
Use devmap if available
Now that bus_space can use devmap - use it for early console
Comment out a bunch of thing so that a GENERIC kernel boots on my cats
with cyclone firmware
 1.22.6.1 28-Aug-2017  skrll Sync with HEAD
 1.23.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.1 09-Jun-2001  chris branches: 1.1.2; 1.1.8;
Move the footbridge dir out of arm32 into arm.
 1.1.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.8.1 09-Jun-2001  nathanw file footbridge_io_asm.S was added on branch nathanw_sa on 2002-04-17 00:02:29 +0000
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.5 02-Jan-2003  thorpej Garbage-collect prev_intr_depth; nothing uses it.
 1.4 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.3 14-Oct-2002  bjh21 branches: 1.3.2;
Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.2 19-Aug-2001  matt branches: 1.2.6;
Change local offset/label for irqhandlers to Lirqhandlers. Because in
ELF _C_LABEL(irqhandlers) == irqhandlers so we were getting self-referential
pointer which causes the IRQ to fall on itself. [With this change the
netwinder kernel can now be *ELF* and boots to multiuser]
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.2.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.2.6.3 11-Nov-2002  nathanw Catch up to -current
 1.2.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.1 19-Aug-2001  nathanw file footbridge_irq.S was added on branch nathanw_sa on 2002-10-18 02:35:25 +0000
 1.3.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.28 13-Aug-2021  skrll Trailing whitespace
 1.27 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.26 10-Nov-2019  chs branches: 1.26.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.25 02-Apr-2014  matt branches: 1.25.30;
Defer intr evcnt_attach to cpu_configure
 1.24 26-Mar-2014  christos kill sprintf
 1.23 20-Dec-2010  matt branches: 1.23.8; 1.23.18; 1.23.22;
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.22 17-Jun-2009  skrll branches: 1.22.4;
Remove incorrect KASSERT.

footbridge_intr_calculate_masks is called multiple times and the KASSERT
isn't valid in (at least) the first call.
 1.21 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.20 06-Jan-2008  chris branches: 1.20.6; 1.20.8; 1.20.10;
curcpu()->ci_depth is now updated in irq_dispatch.S, remove duplication
from footbridge.
 1.19 04-Jan-2008  ad Adjust ci_idepth for cpu_intr_p().
 1.18 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.17 25-Dec-2006  wiz branches: 1.17.6; 1.17.20; 1.17.22; 1.17.24; 1.17.26; 1.17.32;
Spell "separate" correctly. From Zafer Aydogan.
 1.16 24-Nov-2006  wiz s/heirarchy/hierarchy/, from Zafer.
 1.15 17-May-2006  mrg branches: 1.15.8; 1.15.10;
remove 'inline' from the xxx_do_pending() function that is called from
external sources, and conflicts with it's prototype.
 1.14 24-Dec-2005  perry branches: 1.14.4; 1.14.6; 1.14.8; 1.14.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.13 11-Dec-2005  christos merge ktrace-lwp.
 1.12 02-Jun-2005  he branches: 1.12.2;
Adapt to shadowing and qualifier-cast warnings.
 1.11 24-Feb-2004  wiz occured -> occurred. From Peter Postma.
 1.10 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.9 16-Jun-2003  thorpej branches: 1.9.2;
Rename IPL_IMP -> IPL_VM.
 1.8 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.7 11-Nov-2002  chris Belatedly correct the copyright notice. I ported the new footbridge IRQ code
from the xscale interrupt code, it therefore should have Jason/Wasabi
copyright.

There is none of the original arm32 derived interrupt code here.
 1.6 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.5 27-Sep-2002  provos branches: 1.5.2;
remove trailing \n in panic(). approved perry.
 1.4 07-Jan-2002  chris Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
 1.3 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.2 05-Sep-2001  matt branches: 1.2.6;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 09-Jun-2001  chris branches: 1.1.2;
Move the footbridge dir out of arm32 into arm.
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.6 11-Dec-2002  thorpej Sync with HEAD.
 1.2.6.5 11-Nov-2002  nathanw Catch up to -current
 1.2.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.2 11-Jan-2002  nathanw More catchup.
 1.2.6.1 05-Sep-2001  nathanw file footbridge_irqhandler.c was added on branch nathanw_sa on 2002-01-11 23:38:03 +0000
 1.5.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.9.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.3 07-Dec-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.14.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.8.1 24-May-2006  yamt sync with head.
 1.14.6.1 01-Jun-2006  kardel Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.10.1 10-Dec-2006  yamt sync with head.
 1.15.8.1 12-Jan-2007  ad Sync with head.
 1.17.32.2 18-Feb-2008  mjf Sync with HEAD.
 1.17.32.1 08-Dec-2007  mjf Sync with HEAD.
 1.17.26.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.17.26.1 09-Jan-2008  matt sync with HEAD
 1.17.24.7 24-Feb-2008  chris Fix up footbridge code to work with changed arm_intr_register.

Cats now boots again.
 1.17.24.6 26-Jan-2008  chris Rename some structures, eg intrq->intrline, irqgroup->pic. A lot of
member variables have changed name to reflect this.

Change the API for registering a PIC with the common code, so that it
passes a structure to the common code, rather than lots of parameters.
 1.17.24.5 20-Jan-2008  chris Sync to HEAD.
 1.17.24.4 01-Jan-2008  chris Sync with HEAD.
 1.17.24.3 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.17.24.2 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.17.24.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.17.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.17.20.1 26-Dec-2007  rjs Sync with HEAD.
 1.17.6.1 03-Dec-2007  ad Sync with HEAD.
 1.20.10.2 20-Jun-2009  yamt sync with head
 1.20.10.1 16-May-2008  yamt sync with head.
 1.20.8.1 18-May-2008  yamt sync with head.
 1.20.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.4.1 05-Mar-2011  rmind sync with head
 1.23.22.1 18-May-2014  rmind sync with head
 1.23.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.8.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.25.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.26.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6 02-Apr-2014  matt Defer intr evcnt_attach to cpu_configure
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.114; 1.5.124; 1.5.130;
merge ktrace-lwp.
 1.4 02-Jun-2005  he Adapt to shadowing and qualifier-cast warnings.
 1.3 11-Nov-2002  chris branches: 1.3.2; 1.3.8;
Belatedly correct the copyright notice. I ported the new footbridge IRQ code
from the xscale interrupt code, it therefore should have Jason/Wasabi
copyright.

There is none of the original arm32 derived interrupt code here.
 1.2 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.1 22-Oct-2002  chris branches: 1.1.2;
netwinder and cats can share irqhandler.h, so move (and rename) into the
footbridge dir, and share it.
 1.1.2.3 09-Nov-2002  bjh21 Catch up with -current.
 1.1.2.2 24-Oct-2002  bjh21 Sync with trunk.
 1.1.2.1 22-Oct-2002  bjh21 file footbridge_irqhandler.h was added on branch bjh21-hydra on 2002-10-24 22:33:48 +0000
 1.3.8.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.3 11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.2 11-Nov-2002  nathanw Catch up to -current
 1.3.2.1 11-Nov-2002  nathanw file footbridge_irqhandler.h was added on branch nathanw_sa on 2002-11-11 21:56:43 +0000
 1.5.130.1 18-May-2014  rmind sync with head
 1.5.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.114.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.5.50.1 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.11 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.10 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.9 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.8 03-May-2002  rjs Use processor specific versions of ARM cache control functions for SA1100
and SA1110 instead of using SA110 ones.

Rename common StrongARM functions from sa110_* to sa1_*.

Reviewed by Jason Thorpe.
 1.7 09-Apr-2002  thorpej Use abstract names for the protection and PTE type bits in
L1 and L2 descriptors. This will allow us to support different
PTE layouts that enable the use of extensions on different
processor models.
 1.6 24-Mar-2002  thorpej Use vtopte() instead of pmap_pte().
 1.5 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.4 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.3 28-Jul-2001  chris branches: 1.3.6;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.2 09-Jun-2001  chris branches: 1.2.2;
Typo police: 28285 -> 21285
Also garbage collect the old kernel VM map defines for footbridge.
 1.1 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.6.7 20-Jun-2002  nathanw Catch up to -current.
 1.3.6.6 17-Apr-2002  nathanw Catch up to -current.
 1.3.6.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.3.6.3 11-Jan-2002  nathanw More catchup.
 1.3.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.6.1 28-Jul-2001  nathanw file footbridge_machdep.c was added on branch nathanw_sa on 2002-01-08 00:23:10 +0000
 1.34 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.33 13-Aug-2021  skrll Trailing whitespace
 1.32 24-Feb-2020  rin 0x%p --> %p for non-external codes.
 1.31 17-Nov-2018  rjs branches: 1.31.6;
Add xname to footbridge_pci_intr_establish().
 1.30 23-Oct-2018  jmcneill Fix printf format strings - pci_intr_handle_t is uint64_t now on arm
 1.29 19-Apr-2017  skrll branches: 1.29.10; 1.29.12;
Use designated initialisers and fix build in process.
 1.28 02-Oct-2015  msaitoh branches: 1.28.2; 1.28.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.27 30-Mar-2014  christos branches: 1.27.6;
wrap a few lines
 1.26 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.25 26-Mar-2014  christos kill sprintf
 1.24 27-Oct-2012  chs branches: 1.24.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.23 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.22 12-Feb-2012  matt branches: 1.22.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.21 01-Jul-2011  dyoung branches: 1.21.2; 1.21.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.20 30-Jun-2011  wiz dependant -> dependent
 1.19 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.18 14-Mar-2009  dsl branches: 1.18.4; 1.18.6;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.17 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.16 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.15 10-May-2008  chris branches: 1.15.6; 1.15.12;
Fix 9.5 year old buffer overflow.

It wasn't noticed till now as it wasn't overflowing onto anything
important (or was overwritten by the correct data). Recent changes
meant irqstr was placed just before footbridge_intrq and so it trashed
the interrupt linked list, and so caused an alignment fault.

Note that cats still doesn't boot even with the change, as it hangs when
starting userland, I suspect an interrupt issue.
 1.14 14-Dec-2007  chris branches: 1.14.6; 1.14.8; 1.14.10; 1.14.12;
Fix for PR cats/18026.

cats was never able to dump a kernel core dump because reading from
VGA addresses (0xb8000) was causing the system to hang.

To workaround this reprogram the footbridge to map the memory to appear on
the PCI bus at 0x20000000, rather than at 0x0. Also configure the pci bus
to have a DMA range so that data is mapped correctly.

Note that -current kernels seem to hang when unmounting the fs. This
is a seperate issue, and appears to be because interrupts need to be
enabled to unmount filesystems.

So using reboot 0x104 does work, as it does a sync without unmounting the
filesystems.

Also arm savecore doesn't do anything with the memroy dump, as on arm we
currently just dump the raw memory, there's no header block to indicate
memory sizes or other useful information.
 1.13 25-Feb-2007  chris branches: 1.13.18; 1.13.22; 1.13.24; 1.13.32; 1.13.36;
Make this file compile with PCI_DEBUG defined. Needed to figure out why
the latest ABLE firmware was causing an interrupt mapping issue on cats.
It seems that the latest ABLE firmware is using native-PCI mode, rather
than compatibility mode, but doesn't setup an irq for us to use, so we fail
to map the interrupt handler.
 1.12 11-Dec-2005  christos branches: 1.12.26;
merge ktrace-lwp.
 1.11 22-May-2005  christos branches: 1.11.2;
No 0x in front of %p...
 1.10 30-Jul-2003  he Initialize the new _cookie member of arm32_bus_dma_tag to NULL.
 1.9 23-Mar-2003  chris branches: 1.9.2;
Add __KERNEL_RCSID tags to footbridge files.
 1.8 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.7 09-Oct-2002  thorpej branches: 1.7.2;
Properly prototype the netwinder isa/pci init funcs.
 1.6 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.5 17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.4 05-Sep-2001  matt branches: 1.4.6; 1.4.14;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.3 20-Jun-2001  chris branches: 1.3.2;
Remove defopt EBSA285.
Move the files from footbridge that are cats specific.
Remove EBSA285 kernel as people should be able to use the generic cats kernel for EBSA285 systems.
 1.2 12-Jun-2001  matt Move netwinder_machdep.c to files.netwinder. Eliminate opt_netwinder.h and
use #ifdef netwinder insead. XXX ebsa285_machdep.c should move to the cats
directory and files.cats
 1.1 09-Jun-2001  chris Move the footbridge dir out of arm32 into arm.
 1.3.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.14.1 30-Aug-2002  gehenna catch up with -current.
 1.4.6.4 11-Nov-2002  nathanw Catch up to -current
 1.4.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.6.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.4.6.1 05-Sep-2001  thorpej file footbridge_pci.c was added on branch nathanw_sa on 2002-08-19 21:39:08 +0000
 1.7.2.1 09-Nov-2002  bjh21 Catch up with -current.
 1.9.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.2 21-Jan-2008  yamt sync with head
 1.11.2.1 03-Sep-2007  yamt sync with head.
 1.12.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.36.1 02-Jan-2008  bouyer Sync with HEAD
 1.13.32.1 26-Dec-2007  ad Sync with head.
 1.13.24.1 09-Jan-2008  matt sync with HEAD
 1.13.22.1 01-Jan-2008  chris Sync with HEAD.
 1.13.18.1 26-Dec-2007  rjs Sync with HEAD.
 1.14.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14.10.2 04-May-2009  yamt sync with head.
 1.14.10.1 16-May-2008  yamt sync with head.
 1.14.8.1 18-May-2008  yamt sync with head.
 1.14.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.12.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.6.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.18.4.1 21-Apr-2011  rmind sync with head
 1.21.6.1 18-Feb-2012  mrg merge to -current.
 1.21.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.21.2.2 30-Oct-2012  yamt sync with head
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.22.6.3 03-Dec-2017  jdolecek update from HEAD
 1.22.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.1 18-May-2014  rmind sync with head
 1.27.6.2 28-Aug-2017  skrll Sync with HEAD
 1.27.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.28.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.28.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.29.12.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.29.12.1 10-Jun-2019  christos Sync with HEAD
 1.29.10.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.31.6.1 29-Feb-2020  ad Sync with head.
 1.7 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.6 21-Jul-2009  skrll device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.5 06-Jan-2007  christos branches: 1.5.50;
Add generic TOD support. From Bucky Katz.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.24;
merge ktrace-lwp.
 1.3 02-Jun-2005  he branches: 1.3.2;
Adapt to shadowing and qualifier-cast warnings.
 1.2 10-Feb-2002  chris branches: 1.2.18;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1 09-Jun-2001  chris branches: 1.1.2; 1.1.8;
Move the footbridge dir out of arm32 into arm.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 09-Jun-2001  nathanw file footbridgevar.h was added on branch nathanw_sa on 2002-02-28 04:07:28 +0000
 1.1.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.18.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.1 26-Feb-2007  yamt sync with head.
 1.4.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.4.20.1 12-Jan-2007  ad Sync with head.
 1.5.50.1 19-Aug-2009  yamt sync with head.
 1.3 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.2 20-Dec-2001  thorpej branches: 1.2.2; 1.2.4; 1.2.16;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1 27-Nov-2001  thorpej Move interrupt-related stuff out of the generic 32-bit ARM genassym.cf
and into platform-specific genassym.cf files.
 1.2.16.1 09-Nov-2002  bjh21 Catch up with -current.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 20-Dec-2001  thorpej file genassym.cf was added on branch kqueue on 2002-01-10 19:37:51 +0000
 1.2.2.3 11-Nov-2002  nathanw Catch up to -current
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1 20-Dec-2001  nathanw file genassym.cf was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.15 11-Oct-2012  skrll Remove files not used since Sep 2006
 1.14 21-Jul-2009  skrll branches: 1.14.12; 1.14.22;
device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.13 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.12 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.11 15-Jan-2008  joerg branches: 1.11.10; 1.11.18; 1.11.24;
Convert to generic TODR.

XXX Is this file used at all?
 1.10 11-Sep-2006  gdamore branches: 1.10.26; 1.10.30; 1.10.32; 1.10.38; 1.10.46;
Convert netwinder and cats (and any other footbridge based system in the
future) to timecounters, using the dc21285_fclk. ok nick@, chris@.
 1.9 24-Dec-2005  perry branches: 1.9.8; 1.9.20;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 02-Jun-2005  he branches: 1.7.2;
Adapt to shadowing and qualifier-cast warnings.
 1.6 05-Jul-2004  pk Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
 1.5 23-Mar-2003  chris branches: 1.5.2;
Add __KERNEL_RCSID tags to footbridge files.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 26-May-2002  bjh21 Remove #ifdef NC stuff, syncing with iomd/todclock.c.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.8; 1.1.12;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.12.1 30-May-2002  gehenna Catch up with -current.
 1.1.8.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 10-Feb-2002  jdolecek file todclock.c was added on branch kqueue on 2002-03-16 15:56:06 +0000
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file todclock.c was added on branch nathanw_sa on 2002-02-28 04:07:28 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.2.3 21-Jan-2008  yamt sync with head
 1.7.2.2 30-Dec-2006  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.20.1 18-Nov-2006  ad Sync with head.
 1.9.8.1 14-Sep-2006  yamt sync with head.
 1.10.46.1 19-Jan-2008  bouyer Sync with HEAD
 1.10.38.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.32.1 23-Mar-2008  matt sync with HEAD
 1.10.30.1 20-Jan-2008  chris Sync to HEAD.
 1.10.26.1 28-Feb-2008  rjs Sync with HEAD.
 1.11.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.10.2 19-Aug-2009  yamt sync with head.
 1.11.10.1 04-May-2009  yamt sync with head.
 1.14.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.12.1 30-Oct-2012  yamt sync with head
 1.3 11-Oct-2012  skrll Remove files not used since Sep 2006
 1.2 14-Mar-2009  dsl branches: 1.2.12; 1.2.22;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.8; 1.1.130; 1.1.138; 1.1.144;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.144.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.138.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.130.1 04-May-2009  yamt sync with head.
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 10-Feb-2002  jdolecek file todclockvar.h was added on branch kqueue on 2002-03-16 15:56:07 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file todclockvar.h was added on branch nathanw_sa on 2002-02-28 04:07:28 +0000
 1.2.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.12.1 30-Oct-2012  yamt sync with head
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file ds1687reg.h was added on branch kqueue on 2002-06-23 17:34:49 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file ds1687reg.h was added on branch nathanw_sa on 2002-02-28 04:07:29 +0000
 1.14 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.13 13-Aug-2021  skrll Trailing whitespace
 1.12 11-Oct-2012  skrll Complete the device_t/softc split I attempted previously.

From chuq.
 1.11 21-Jul-2009  skrll branches: 1.11.12; 1.11.22;
device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.10 06-Jan-2007  christos branches: 1.10.50;
Add generic TOD support. From Bucky Katz.
 1.9 11-Sep-2006  gdamore branches: 1.9.4;
ANSIfy and KNF.
 1.8 11-Dec-2005  christos branches: 1.8.8; 1.8.20;
merge ktrace-lwp.
 1.7 16-Sep-2004  drochner branches: 1.7.12;
forgot one ISACF_*_DEFAULT conversion, noticed by Nick Hudson
 1.6 21-Oct-2003  skrll Rename dsrtc to ds1687rtc to avoid conflicting with the MI i2c
ds1307 driver.

Hi Jason.
 1.5 23-Mar-2003  chris branches: 1.5.2;
Add __KERNEL_RCSID tags to footbridge files.
 1.4 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file dsrtc.c was added on branch kqueue on 2002-06-23 17:34:49 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file dsrtc.c was added on branch nathanw_sa on 2002-02-28 04:07:29 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.12.2 26-Feb-2007  yamt sync with head.
 1.7.12.1 30-Dec-2006  yamt sync with head.
 1.8.20.2 12-Jan-2007  ad Sync with head.
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.8.8.1 14-Sep-2006  yamt sync with head.
 1.9.4.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.10.50.1 19-Aug-2009  yamt sync with head.
 1.11.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.12.1 30-Oct-2012  yamt sync with head
 1.3 11-Dec-2005  christos branches: 1.3.50;
merge ktrace-lwp.
 1.2 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.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14; 1.1.22;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file icu.h was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file icu.h was added on branch nathanw_sa on 2002-02-28 04:07:29 +0000
 1.3.50.1 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.10 13-Aug-2021  skrll Trailing whitespace
 1.9 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.8 13-Sep-2014  matt branches: 1.8.18;
Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.7 12-Feb-2012  matt branches: 1.7.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.4 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.3 23-Mar-2003  chris branches: 1.3.110; 1.3.118; 1.3.124;
Add __KERNEL_RCSID tags to footbridge files.
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file isa_io.c was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file isa_io.c was added on branch nathanw_sa on 2002-02-28 04:07:29 +0000
 1.3.124.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.118.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.110.1 04-May-2009  yamt 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.7.6.1 03-Dec-2017  jdolecek update from HEAD
 1.8.18.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.3 13-Aug-2021  skrll Trailing whitespace
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14; 1.1.126; 1.1.128; 1.1.130;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.130.1 16-May-2008  yamt sync with head.
 1.1.128.1 18-May-2008  yamt sync with head.
 1.1.126.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file isa_io_asm.S was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file isa_io_asm.S was added on branch nathanw_sa on 2002-02-28 04:07:30 +0000
 1.24 13-Aug-2021  skrll Trailing whitespace
 1.23 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.22 10-Nov-2019  chs branches: 1.22.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.21 26-Mar-2014  christos branches: 1.21.30;
kill sprintf
 1.20 17-Nov-2013  skrll Remove unused variables.
 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 01-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.17 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.16 20-Aug-2009  he branches: 1.16.2; 1.16.4;
Typo correction: it's isa_dmadestroy(), not isa_dma_destroy(), apparently.
 1.15 19-Aug-2009  dyoung isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t.
 1.14 18-Aug-2009  dyoung These are stragglers from my last commit ("Let us safely detach
the ISA bus and devices attaching to the ISA bus"). Define
isa_detach_hook() in MD ISA implementations. Define isa_dmadestroy().
 1.13 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.12 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.11 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.10 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.9 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.8 28-Apr-2008  martin branches: 1.8.8; 1.8.14;
Remove clause 3 and 4 from TNF licenses
 1.7 03-Dec-2007  ad branches: 1.7.14; 1.7.16; 1.7.18;
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.6 11-Dec-2005  christos branches: 1.6.30; 1.6.46; 1.6.48; 1.6.50; 1.6.52; 1.6.58;
merge ktrace-lwp.
 1.5 07-Aug-2003  agc branches: 1.5.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 16-Jun-2003  thorpej branches: 1.4.2;
Rename IPL_IMP -> IPL_VM.
 1.3 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.2 03-Nov-2002  chris Checkin new interrupt handling code for the footbridge.
This is based upon Jason's work on xscale.

Most of the interrupt handling code is now written in C using an asm stub to
call into the C code.

spl* now only updates a software mask, and does not update the hardware,
this should be much faster.

The new code works well on cats, it's untested on netwinder, but should work.

The code implements generic soft interrupts.

More work is still required to bring the isa interrupt handling code upto
scratch currently all isa interrupts are handled at IPL_BIO on the footbridge.
This may cause isa interrupts to be handled later than they should be.
I plan to fix this in the near future.
 1.1 12-Oct-2002  chris branches: 1.1.2; 1.1.4; 1.1.6;
Merge isa_machdep.c from netwinder and cats into footbridge/isa (where it
joins other machdep files)
Saves maintaining multiple copies of the same thing, the only differences
were:
IRQ line used on the footbridge (made that a define in include/isa_machdep.h)
name of a dma_ranges variable contained arch name, so just made it generic.
 1.1.6.1 09-Nov-2002  bjh21 Catch up with -current.
 1.1.4.2 18-Oct-2002  jdolecek sync with -current:
Merge isa_machdep.c from netwinder and cats into footbridge/isa
 1.1.4.1 12-Oct-2002  jdolecek file isa_machdep.c was added on branch kqueue on 2002-10-18 10:55:06 +0000
 1.1.2.3 11-Nov-2002  nathanw Catch up to -current
 1.1.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.1 12-Oct-2002  nathanw file isa_machdep.c was added on branch nathanw_sa on 2002-10-18 02:35:27 +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.5.16.1 07-Dec-2007  yamt sync with head
 1.6.58.1 08-Dec-2007  mjf Sync with HEAD.
 1.6.52.1 09-Jan-2008  matt sync with HEAD
 1.6.50.5 24-Feb-2008  chris Fix up footbridge code to work with changed arm_intr_register.

Cats now boots again.
 1.6.50.4 26-Jan-2008  chris Rename some structures, eg intrq->intrline, irqgroup->pic. A lot of
member variables have changed name to reflect this.

Change the API for registering a PIC with the common code, so that it
passes a structure to the common code, rather than lots of parameters.
 1.6.50.3 01-Jan-2008  chris Sync with HEAD.
 1.6.50.2 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.6.50.1 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.6.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.6.46.1 26-Dec-2007  rjs Sync with HEAD.
 1.6.30.1 03-Dec-2007  ad Sync with HEAD.
 1.7.18.5 11-Aug-2010  yamt sync with head.
 1.7.18.4 16-Sep-2009  yamt sync with head
 1.7.18.3 19-Aug-2009  yamt sync with head.
 1.7.18.2 04-May-2009  yamt sync with head.
 1.7.18.1 16-May-2008  yamt sync with head.
 1.7.16.1 18-May-2008  yamt sync with head.
 1.7.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.4.1 03-Jul-2010  rmind sync with head
 1.16.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.18.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.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.18.2.1 30-Oct-2012  yamt sync with head
 1.19.2.1 18-May-2014  rmind sync with head
 1.21.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.17 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.16 21-Sep-2012  matt Switch to the generic bounce buffer support.
 1.15 12-Feb-2012  matt branches: 1.15.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.14 01-Jul-2011  dyoung branches: 1.14.2; 1.14.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.13 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.12 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.11 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.14;
Remove clause 3 and 4 from TNF licenses
 1.9 04-Mar-2007  chris branches: 1.9.42; 1.9.44; 1.9.46;
Fix caddr_t fallout for cats kernel builds.
 1.8 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 30-Jul-2003  he branches: 1.6.16;
Initialize the new _cookie member of arm32_bus_dma_tag to NULL.
 1.5 01-Apr-2003  thorpej branches: 1.5.2;
Use PAGE_SIZE rather than NBPG.
 1.4 23-Mar-2003  chris Add __KERNEL_RCSID tags to footbridge files.
 1.3 17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.2 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.10; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file isadma_machdep.c was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.10.1 30-Aug-2002  gehenna catch up with -current.
 1.1.2.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file isadma_machdep.c was added on branch nathanw_sa on 2002-02-28 04:07:30 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.46.2 04-May-2009  yamt sync with head.
 1.9.46.1 16-May-2008  yamt sync with head.
 1.9.44.1 18-May-2008  yamt sync with head.
 1.9.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.6.1 18-Feb-2012  mrg merge to -current.
 1.14.2.2 30-Oct-2012  yamt sync with head
 1.14.2.1 17-Apr-2012  yamt sync with head
 1.15.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.6 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.5 21-Oct-2009  snj Drop 3rd and 4th clauses. Approved by thomas@ (copyright holder).
 1.4 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.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 23-Mar-2003  chris branches: 1.2.106; 1.2.108; 1.2.110;
Add __KERNEL_RCSID tags to footbridge files.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file isapnp_machdep.c was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file isapnp_machdep.c was added on branch nathanw_sa on 2002-02-28 04:07:30 +0000
 1.2.110.3 11-Mar-2010  yamt sync with head
 1.2.110.2 04-May-2009  yamt sync with head.
 1.2.110.1 16-May-2008  yamt sync with head.
 1.2.108.1 18-May-2008  yamt sync with head.
 1.2.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4 18-Feb-2005  drochner The joystick driver is using mi timing code for many months.
Noone complained, so we can remove the unused md versions.
 1.3 23-Mar-2003  chris branches: 1.3.2; 1.3.10; 1.3.12;
Add __KERNEL_RCSID tags to footbridge files.
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.10; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file joy_timer.c was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.10.1 19-May-2002  gehenna Remove unnecessary #include
 1.1.2.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file joy_timer.c was added on branch nathanw_sa on 2002-02-28 04:07:31 +0000
 1.3.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.10.1 29-Apr-2005  kent sync with -current
 1.3.2.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11 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.10 21-Jul-2009  skrll branches: 1.10.12; 1.10.22;
device_t/softc split
CFATTACH_DECL -> CFATTACH_DECL_NEW
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.9 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.8 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.7 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 28-Apr-2008  martin branches: 1.6.8; 1.6.14;
Remove clause 3 and 4 from TNF licenses
 1.5 23-Mar-2003  chris branches: 1.5.106; 1.5.108; 1.5.110;
Add __KERNEL_RCSID tags to footbridge files.
 1.4 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.3 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.2 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.1 10-Feb-2002  chris branches: 1.1.2; 1.1.14;
Following the demise of arch/arm32 update cats, and restore the isa files to a more sane location.
Also fix build break on GENERIC cats kernel, seems that conf.h should have been including arm/conf.h.

This completes the removal of arch/arm32.
 1.1.14.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 10-Feb-2002  jdolecek file sysbeep_isa.c was added on branch kqueue on 2002-06-23 17:34:50 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 10-Feb-2002  nathanw file sysbeep_isa.c was added on branch nathanw_sa on 2002-02-28 04:07:31 +0000
 1.5.110.3 19-Aug-2009  yamt sync with head.
 1.5.110.2 04-May-2009  yamt sync with head.
 1.5.110.1 16-May-2008  yamt sync with head.
 1.5.108.1 18-May-2008  yamt sync with head.
 1.5.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.12.1 30-Oct-2012  yamt sync with head
 1.13 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.12 06-Jun-2012  skrll branches: 1.12.38; 1.12.40;
Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.11 11-Mar-2011  bsh branches: 1.11.4; 1.11.10;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.10 14-Dec-2008  matt branches: 1.10.2; 1.10.6; 1.10.10; 1.10.12;
Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.9 06-Dec-2008  cliff add gemini pseudo-nic and support code.
 1.8 26-Nov-2008  matt Add children of geminiipi
 1.7 20-Nov-2008  cliff add GPIO driver for Gemini
 1.6 20-Nov-2008  cliff add driver for low level inter-processor-interrupt
provides functions for establish/disestablish IPI ISR,
and function to signal IPI to the other CPU.
 1.5 13-Nov-2008  cliff add option GEMINI_BUSBASE to define kernel offset between
kernel physical addr and (DMA master) bus addr
 1.4 11-Nov-2008  cliff - add option GEMINI_SINGLE for single-core system model
- add "re" interface to GEMINI configuration
 1.3 09-Nov-2008  cliff - add autoconfig support for wdc at Gemini obio
- add autoconfig support for com type UART on IT8712 superio chip
attached at lpc bus at lpc host controller at Gemini obio.
 1.2 24-Oct-2008  matt branches: 1.2.2;
Add EHCI attachment for GEMINI port.
 1.1 24-Oct-2008  matt Add support for Cortina Systems SL3516 eval board.
 1.2.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.12.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.10.1 21-Apr-2011  rmind sync with head
 1.10.6.2 04-May-2009  yamt sync with head.
 1.10.6.1 14-Dec-2008  yamt file files.gemini was added on branch yamt-nfs-mp on 2009-05-04 08:10:40 +0000
 1.10.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.10.2.1 14-Dec-2008  mjf file files.gemini was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.11.10.1 10-Aug-2012  jdc Pull up revisions:
src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
src/sys/arch/arm/gemini/files.gemini revision 1.12
src/sys/arch/arm/mpcore/files.mpcore revision 1.2
src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
src/sys/arch/arm/omap/files.omap revision 1.6
src/sys/arch/arm/omap/files.omap2 revision 1.9
src/sys/arch/arm/omap/omap_a2x_io.S delete
src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.11.4.1 30-Oct-2012  yamt sync with head
 1.12.40.1 10-Jun-2019  christos Sync with HEAD
 1.12.38.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.3 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.2 01-Jul-2011  dyoung branches: 1.2.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_a4x_space.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:40 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_a4x_space.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.2.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.3 01-Jul-2011  dyoung branches: 1.3.52; 1.3.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 08-Nov-2008  cliff branches: 1.2.4; 1.2.8;
on-chip gemini uart is a COM_TYPE_16550_NOERS
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.8.2 04-May-2009  yamt sync with head.
 1.2.8.1 08-Nov-2008  yamt file gemini_com.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:40 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 08-Nov-2008  mjf file gemini_com.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3.54.1 10-Jun-2019  christos Sync with HEAD
 1.3.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_com.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:40 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_com.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.4 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.3 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_dma.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_dma.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.22 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21 24-Apr-2021  thorpej branches: 1.21.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.20 04-Feb-2020  skrll branches: 1.20.8;
Trailing whitespace
 1.19 04-Feb-2020  skrll Adopt <net/if_stats.h>
 1.18 30-Oct-2019  msaitoh branches: 1.18.2;
ether_input() automatically add input bytes to if_ibytes, so it's not
required to do in the driver who use ether_input().
 1.17 22-Jan-2019  msaitoh branches: 1.17.4;
Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

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

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.15 09-May-2018  maxv Remove nonsensical KASSERT.
 1.14 26-Apr-2018  maxv Fix inverted arguments in m_gethdr().
 1.13 01-Jun-2017  chs branches: 1.13.2; 1.13.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.12 28-Mar-2017  ozaki-r Avoid touching a mbuf after enqueuing it
 1.11 15-Dec-2016  ozaki-r branches: 1.11.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.10 06-Dec-2016  ozaki-r Use if_percpuq_enqueue, not if_input

Because gmac_hwqueue_rxconsume is called in hardware interrupt.
 1.9 10-Jun-2016  ozaki-r branches: 1.9.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.7 01-Jul-2011  dyoung branches: 1.7.12; 1.7.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.5 19-Jan-2010  pooka branches: 1.5.2; 1.5.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.4 18-Jan-2010  pooka Pass correct pointer to bpf_mtap() and most likely avoid a crash
if bpf is activated.

not even compile-tested, since i can't find any config in the tree
which uses this(?)
 1.3 23-Dec-2008  matt branches: 1.3.2; 1.3.4; 1.3.8;
Baby steps to a working driver. transmit works. receive sometimes works
but the h/w is doing really weird shit.
 1.2 15-Dec-2008  matt Get the gmac driver close to working.
 1.1 14-Dec-2008  matt Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.3.8.4 11-Aug-2010  yamt sync with head.
 1.3.8.3 11-Mar-2010  yamt sync with head
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 23-Dec-2008  yamt file gemini_gmac.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.4.1 23-Dec-2008  skrll file gemini_gmac.c was added on branch nick-hppapmap on 2009-01-19 13:15:57 +0000
 1.3.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.2.1 23-Dec-2008  mjf file gemini_gmac.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.5.4.1 30-May-2010  rmind sync with head
 1.5.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.7.30.4 28-Aug-2017  skrll Sync with HEAD
 1.7.30.3 05-Feb-2017  skrll Sync with HEAD
 1.7.30.2 09-Jul-2016  skrll Sync with HEAD
 1.7.30.1 19-Mar-2016  skrll Sync with HEAD
 1.7.12.1 03-Dec-2017  jdolecek update from HEAD
 1.9.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.9.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.11.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.13.8.4 26-Jan-2019  pgoyette Sync with HEAD
 1.13.8.3 28-Jul-2018  pgoyette Sync with HEAD
 1.13.8.2 21-May-2018  pgoyette Sync with HEAD
 1.13.8.1 02-May-2018  pgoyette Synch with HEAD
 1.13.2.1 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1427):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.16.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16.2.1 10-Jun-2019  christos Sync with HEAD
 1.17.4.1 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #403):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.18.2.1 29-Feb-2020  ad Sync with head.
 1.20.8.2 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.20.8.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.21.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 13-May-2024  msaitoh emtpy -> empty in comment.
 1.3 23-Dec-2008  matt branches: 1.3.2; 1.3.4; 1.3.8;
Baby steps to a working driver. transmit works. receive sometimes works
but the h/w is doing really weird shit.
 1.2 15-Dec-2008  matt Get the gmac driver close to working.
 1.1 14-Dec-2008  matt Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 23-Dec-2008  yamt file gemini_gmacreg.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.4.1 23-Dec-2008  skrll file gemini_gmacreg.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.2.1 23-Dec-2008  mjf file gemini_gmacreg.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3 23-Dec-2008  matt branches: 1.3.2; 1.3.4; 1.3.8;
Baby steps to a working driver. transmit works. receive sometimes works
but the h/w is doing really weird shit.
 1.2 15-Dec-2008  matt Get the gmac driver close to working.
 1.1 14-Dec-2008  matt Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 23-Dec-2008  yamt file gemini_gmacvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.4.1 23-Dec-2008  skrll file gemini_gmacvar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.2.1 23-Dec-2008  mjf file gemini_gmacvar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 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 01-Jul-2011  dyoung branches: 1.3.68;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 14-Dec-2008  matt branches: 1.2.2; 1.2.4; 1.2.8;
Rename gpio.h to gpiovar.h. Make the pin routines usable by others
than the gpio code. (gmac driver needs access to gpio to do mii ops).
 1.1 20-Nov-2008  cliff add GPIO driver for Gemini
 1.2.8.2 04-May-2009  yamt sync with head.
 1.2.8.1 14-Dec-2008  yamt file gemini_gpio.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.2.4.1 14-Dec-2008  skrll file gemini_gpio.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.2.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.2.1 14-Dec-2008  mjf file gemini_gpio.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3.68.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.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 14-Dec-2008  matt Rename gpio.h to gpiovar.h. Make the pin routines usable by others
than the gpio code. (gmac driver needs access to gpio to do mii ops).
 1.1 20-Nov-2008  cliff add GPIO driver for Gemini
 1.1 14-Dec-2008  matt branches: 1.1.2; 1.1.4; 1.1.8;
Rename gpio.h to gpiovar.h. Make the pin routines usable by others
than the gpio code. (gmac driver needs access to gpio to do mii ops).
 1.1.8.2 04-May-2009  yamt sync with head.
 1.1.8.1 14-Dec-2008  yamt file gemini_gpiovar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.4.1 14-Dec-2008  skrll file gemini_gpiovar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.2.1 14-Dec-2008  mjf file gemini_gpiovar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.7 03-Mar-2022  riastradh arm: Use device_set_private for various drivers.
 1.6 26-Sep-2020  skrll G/C arm/atomic.h
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 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.3 14-Jun-2009  rjs branches: 1.3.4;
Fix CVS header.
 1.2 24-Oct-2008  matt branches: 1.2.8; 1.2.14;
Add irq source names.
 1.1 24-Oct-2008  matt Add support for Cortina Systems SL3516 eval board.
 1.2.14.3 20-Jun-2009  yamt sync with head
 1.2.14.2 04-May-2009  yamt sync with head.
 1.2.14.1 24-Oct-2008  yamt file gemini_icu.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.8.1 24-Oct-2008  mjf file gemini_icu.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3.4.1 05-Mar-2011  rmind sync with head
 1.4 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.3 30-Sep-2021  skrll More catching up with spl changes.
 1.2 24-Oct-2008  matt branches: 1.2.8; 1.2.14;
Make this reflect reality.
 1.1 24-Oct-2008  matt Add support for Cortina Systems SL3516 eval board.
 1.2.14.2 04-May-2009  yamt sync with head.
 1.2.14.1 24-Oct-2008  yamt file gemini_intr.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.8.1 24-Oct-2008  mjf file gemini_intr.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 20-Nov-2020  thorpej branches: 1.9.2;
malloc(9) -> kmem(9)
 1.8 10-Nov-2019  chs branches: 1.8.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.7 30-Aug-2019  riastradh Don't dereference pointer when we're about to panic because it's null.

Reported by Dr Silvio Cesare of InfoSect.
 1.6 27-Oct-2012  chs branches: 1.6.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 25-Nov-2009  rmind branches: 1.5.12; 1.5.22;
Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.
 1.4 06-Dec-2008  cliff branches: 1.4.4; 1.4.6; 1.4.10;
add gemini pseudo-nic and support code.
 1.3 26-Nov-2008  matt gpn, not gnp.
 1.2 26-Nov-2008  matt Add children of geminiipi
 1.1 20-Nov-2008  cliff add driver for low level inter-processor-interrupt
provides functions for establish/disestablish IPI ISR,
and function to signal IPI to the other CPU.
 1.4.10.3 11-Mar-2010  yamt sync with head
 1.4.10.2 04-May-2009  yamt sync with head.
 1.4.10.1 06-Dec-2008  yamt file gemini_ipi.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.4.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.4.6.1 06-Dec-2008  skrll file gemini_ipi.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.4.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.4.4.1 06-Dec-2008  mjf file gemini_ipi.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.5.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.12.1 30-Oct-2012  yamt sync with head
 1.6.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.9.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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 20-Nov-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10; 1.1.22; 1.1.32;
add driver for low level inter-processor-interrupt
provides functions for establish/disestablish IPI ISR,
and function to signal IPI to the other CPU.
 1.1.32.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.22.1 30-Oct-2012  yamt sync with head
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 20-Nov-2008  yamt file gemini_ipivar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 20-Nov-2008  skrll file gemini_ipivar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 20-Nov-2008  mjf file gemini_ipivar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.7 26-May-2023  andvar include arm/arm32/pte.h to gemini_ipm.c to fix GEMINI_MASTER/SLAVE config builds.
They fail with 'L1_S_SIZE' undeclared error otherwise from gemini.h declarations.
gemini_machdep.c includes it transitively, thus doesn't faili on GEMINI config.
Likely nobody is using them anyway though...
 1.6 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.5 09-Aug-2021  andvar fix various typos in comments and messages.
 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 06-Dec-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10; 1.1.22; 1.1.32;
add gemini pseudo-nic and support code.
 1.1.32.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.22.1 30-Oct-2012  yamt sync with head
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 06-Dec-2008  yamt file gemini_ipm.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 06-Dec-2008  skrll file gemini_ipm.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 06-Dec-2008  mjf file gemini_ipm.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.2.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.1 06-Dec-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10; 1.1.32;
add gemini pseudo-nic and support code.
 1.1.32.1 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 06-Dec-2008  yamt file gemini_ipm.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 06-Dec-2008  skrll file gemini_ipm.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 06-Dec-2008  mjf file gemini_ipm.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.2 10-Feb-2024  andvar s/indicies/indices/ in comments.
 1.1 06-Dec-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10;
add gemini pseudo-nic and support code.
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 06-Dec-2008  yamt file gemini_ipmvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 06-Dec-2008  skrll file gemini_ipmvar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 06-Dec-2008  mjf file gemini_ipmvar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 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 27-Oct-2012  chs branches: 1.4.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 15-Nov-2008  cliff branches: 1.3.4; 1.3.6; 1.3.10; 1.3.22; 1.3.32;
further abstraction of LPC bus
 1.2 10-Nov-2008  cliff gemini_lpc_bus_ops is needed for consinit(), so remove 'static'
 1.1 09-Nov-2008  cliff preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.3.32.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.22.1 30-Oct-2012  yamt sync with head
 1.3.10.2 04-May-2009  yamt sync with head.
 1.3.10.1 15-Nov-2008  yamt file gemini_lpc.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.6.1 15-Nov-2008  skrll file gemini_lpc.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.4.1 15-Nov-2008  mjf file gemini_lpc.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.4.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.4.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.4.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.4.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.4.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.5.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 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.2 01-Jul-2011  dyoung branches: 1.2.52; 1.2.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 09-Nov-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10;
preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 09-Nov-2008  yamt file gemini_lpchc.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 09-Nov-2008  skrll file gemini_lpchc.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 09-Nov-2008  mjf file gemini_lpchc.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.2.54.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.54.1 10-Jun-2019  christos Sync with HEAD
 1.2.52.1 18-Jan-2019  pgoyette Synch with HEAD
 1.4.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 20-Nov-2008  cliff branches: 1.3.4; 1.3.6; 1.3.10;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.2 15-Nov-2008  cliff further abstraction of LPC bus
 1.1 09-Nov-2008  cliff preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.3.10.2 04-May-2009  yamt sync with head.
 1.3.10.1 20-Nov-2008  yamt file gemini_lpchcvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.6.1 20-Nov-2008  skrll file gemini_lpchcvar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.4.1 20-Nov-2008  mjf file gemini_lpchcvar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.4 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.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 15-Nov-2008  cliff branches: 1.2.4; 1.2.6; 1.2.10;
further abstraction of LPC bus
 1.1 09-Nov-2008  cliff preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.2.10.2 04-May-2009  yamt sync with head.
 1.2.10.1 15-Nov-2008  yamt file gemini_lpcvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.2.6.1 15-Nov-2008  skrll file gemini_lpcvar.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 15-Nov-2008  mjf file gemini_lpcvar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt 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 01-Jul-2011  dyoung branches: 1.10.68;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 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.8 05-Jan-2010  mbalmer branches: 1.8.4; 1.8.6;
One semicolon is enough.
 1.7 20-Nov-2008  cliff branches: 1.7.4; 1.7.8;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.6 13-Nov-2008  cliff add option GEMINI_BUSBASE to define kernel offset between
kernel physical addr and (DMA master) bus addr
 1.5 13-Nov-2008  cliff on the Slave CPU where memory is remaped, use 'struct arm32_dma_range'
to manage kernel physical address unequal to DMA master bus address.

when Slave CPU configures PCI bus, program PCI memory window
to allow only bus addresses into memory owned by the Slave CPU.

Note: this code assumes that the CPU performing
PCI bus configuration has exclusive use of that bus.
 1.4 11-Nov-2008  cliff - add option GEMINI_SINGLE for single-core system model
- add "re" interface to GEMINI configuration
 1.3 10-Nov-2008  cliff in critical_devs[], master cpu gets com0;
slave cpu gets geminilpchc0 (and children)
 1.2 09-Nov-2008  cliff - use #if NPCI > 0 arond pci stuff so we can compile when pci is not configured
- in critical_devs[], divide up timers attachment between master and slave CPUs
and provide icu#1 attachment for slave cpu
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.7.8.3 11-Mar-2010  yamt sync with head
 1.7.8.2 04-May-2009  yamt sync with head.
 1.7.8.1 20-Nov-2008  yamt file gemini_obio.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.7.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.7.4.1 20-Nov-2008  mjf file gemini_obio.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.8.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1 31-May-2011  rmind sync with head
 1.10.68.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.10.68.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.10.68.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.10.68.2 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.10.68.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.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 20-Nov-2008  cliff branches: 1.3.4; 1.3.8;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.2 13-Nov-2008  cliff on the Slave CPU where memory is remaped, use 'struct arm32_dma_range'
to manage kernel physical address unequal to DMA master bus address.

when Slave CPU configures PCI bus, program PCI memory window
to allow only bus addresses into memory owned by the Slave CPU.

Note: this code assumes that the CPU performing
PCI bus configuration has exclusive use of that bus.
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 20-Nov-2008  yamt file gemini_obiovar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.4.1 20-Nov-2008  mjf file gemini_obiovar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.23 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.22 07-Jul-2020  thorpej branches: 1.22.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.21 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.20 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.19 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.18 02-Oct-2015  msaitoh branches: 1.18.16; 1.18.18;
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.17 30-Mar-2014  christos branches: 1.17.6;
wrap a few lines
 1.16 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.15 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.14 27-Oct-2012  chs branches: 1.14.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13 07-Sep-2012  matt branches: 1.13.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.12 06-Sep-2012  matt Change pci_conf_hook to pass pc->conf_v
Add pci_conf_interrupt
 1.11 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 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.8 05-Jan-2010  mbalmer branches: 1.8.4; 1.8.6;
One semicolon is enough.
 1.7 04-Dec-2008  cliff branches: 1.7.4; 1.7.8;
remove old debug stuff, including Debugger() call that was not #ifdef DDB
 1.6 20-Nov-2008  cliff use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.5 13-Nov-2008  cliff add option GEMINI_BUSBASE to define kernel offset between
kernel physical addr and (DMA master) bus addr
 1.4 13-Nov-2008  cliff on the Slave CPU where memory is remaped, use 'struct arm32_dma_range'
to manage kernel physical address unequal to DMA master bus address.

when Slave CPU configures PCI bus, program PCI memory window
to allow only bus addresses into memory owned by the Slave CPU.

Note: this code assumes that the CPU performing
PCI bus configuration has exclusive use of that bus.
 1.3 28-Oct-2008  cliff set up PCI memory size based on MEMSIZE (actual memory size)
instead of GEMINI_DRAM_SIZE (size of DRAM physical address space).
 1.2 24-Oct-2008  cliff branches: 1.2.2;
fix comment regarding IO extent.
 1.1 24-Oct-2008  matt Add support for Cortina Systems SL3516 eval board.
 1.2.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.7.8.3 11-Mar-2010  yamt sync with head
 1.7.8.2 04-May-2009  yamt sync with head.
 1.7.8.1 04-Dec-2008  yamt file gemini_pci.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.7.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.7.4.1 04-Dec-2008  mjf file gemini_pci.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.8.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1 21-Apr-2011  rmind sync with head
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.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.10.2.2 30-Oct-2012  yamt sync with head
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.13.2.3 03-Dec-2017  jdolecek update from HEAD
 1.13.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.2 18-May-2014  rmind sync with head
 1.14.2.1 28-Aug-2013  rmind sync with head
 1.17.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.18.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.18.18.1 10-Jun-2019  christos Sync with HEAD
 1.18.16.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.22.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_pcivar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_pcivar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.10 19-Nov-2024  andvar fix couple of typos in comments.
 1.9 22-Nov-2009  mbalmer branches: 1.9.100;
more s/the the/the/
 1.8 15-Dec-2008  matt branches: 1.8.2; 1.8.6;
Get the gmac driver close to working.
 1.7 14-Dec-2008  matt Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.6 20-Nov-2008  cliff add GPIO driver for Gemini
 1.5 20-Nov-2008  cliff add memory remap and inter-processor-interrupt register defines
 1.4 09-Nov-2008  cliff - GEMINI_LPCP_BASE is renamed GEMINI_LPCIO_BASE
- add some minimal Gemini GLOBAL reg defines
- add Gemini LPC Host Controller reg defines
- add Gemini MIDE Controller reg defines
 1.3 01-Nov-2008  cliff in initarm(), remove some bringup debug stuff, and clean up
progress markers; they are still useful for now.
in cpu_reboot() use Gemini Global Reset Control register to reboot system
geminiwdt_reboot() is no longer needed, removed.
 1.2 28-Oct-2008  cliff GEMINI_DRAM_BASE moved to 0x00000000, a remapped physical address
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.8.6.3 11-Mar-2010  yamt sync with head
 1.8.6.2 04-May-2009  yamt sync with head.
 1.8.6.1 15-Dec-2008  yamt file gemini_reg.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.8.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.8.2.1 15-Dec-2008  mjf file gemini_reg.h was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.9.100.1 02-Aug-2025  perseant Sync with HEAD
 1.6 21-Apr-2023  skrll Trailing whitespace
 1.5 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.4 22-Feb-2014  matt branches: 1.4.28;
Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12; 1.3.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 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.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.3 11-Mar-2010  yamt sync with head
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_space.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_space.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.3.16.1 18-May-2014  rmind sync with head
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7 18-Mar-2014  martin Bracket timer_init() with disable_interrupts()/restore_interrupts()
properly. Pointed out by Chris Gilbert.
 1.6 09-Mar-2014  martin Remove an unused variable and fix a copy&pasto (I think)
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12; 1.5.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 05-Jan-2010  mbalmer One semicolon is enough.
 1.3 18-Mar-2009  cegger branches: 1.3.2;
Ansify function definitions w/o arguments. Generated with sed.
 1.2 09-Nov-2008  cliff branches: 1.2.4; 1.2.6;
- we are combining stat and system clocks to use the same timer
the master and slave CPU each get one timer for those functions;
both CPUs can use the free-running ref timer;
it is initialized by CPU#0 and after that all access is read-only
- use correct OBIO_*_DEFAULT locator indicies
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.6.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 09-Nov-2008  mjf file gemini_timer.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.3.2.3 11-Mar-2010  yamt sync with head
 1.3.2.2 04-May-2009  yamt sync with head.
 1.3.2.1 18-Mar-2009  yamt file gemini_timer.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.5.16.1 18-May-2014  rmind sync with head
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 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.2 09-Nov-2008  cliff branches: 1.2.4; 1.2.8; 1.2.20; 1.2.30;
- we are combining stat and system clocks, so STATHZ is now HZ
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.30.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.20.1 30-Oct-2012  yamt sync with head
 1.2.8.2 04-May-2009  yamt sync with head.
 1.2.8.1 09-Nov-2008  yamt file gemini_timervar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 09-Nov-2008  mjf file gemini_timervar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.2 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.1 24-Oct-2008  matt branches: 1.1.8; 1.1.14;
Add support for Cortina Systems SL3516 eval board.
 1.1.14.2 04-May-2009  yamt sync with head.
 1.1.14.1 24-Oct-2008  yamt file gemini_var.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1 24-Oct-2008  mjf file gemini_var.h was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.4 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.3 01-Jul-2011  dyoung branches: 1.3.52; 1.3.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 01-Nov-2008  cliff branches: 1.2.4; 1.2.8;
in initarm(), remove some bringup debug stuff, and clean up
progress markers; they are still useful for now.
in cpu_reboot() use Gemini Global Reset Control register to reboot system
geminiwdt_reboot() is no longer needed, removed.
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.2.8.2 04-May-2009  yamt sync with head.
 1.2.8.1 01-Nov-2008  yamt file gemini_wdt.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 01-Nov-2008  mjf file gemini_wdt.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.3.54.1 10-Jun-2019  christos Sync with HEAD
 1.3.52.1 18-Jan-2019  pgoyette Synch with HEAD
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 20-Nov-2008  cliff branches: 1.3.4; 1.3.8;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.2 01-Nov-2008  cliff in initarm(), remove some bringup debug stuff, and clean up
progress markers; they are still useful for now.
in cpu_reboot() use Gemini Global Reset Control register to reboot system
geminiwdt_reboot() is no longer needed, removed.
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 20-Nov-2008  yamt file gemini_wdtvar.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.4.1 20-Nov-2008  mjf file gemini_wdtvar.h was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.15 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE. (In this driver, it was set in one
location, and never tested or cleared. &shrug;)
 1.14 20-Aug-2022  thorpej gmc_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
 1.13 01-Feb-2020  thorpej Adopt <net/if_stats.h>.
 1.12 28-May-2019  msaitoh branches: 1.12.4;
s/recieve/receive/
 1.11 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.10 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.9 23-May-2019  msaitoh No functional change:
- Simplify MII structure initialization and reference.
- u_int*_t -> uint*_t.
- KNF
 1.8 22-Apr-2019  msaitoh On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
 1.7 20-Feb-2017  ozaki-r branches: 1.7.14;
Apply deferred if_start to more drivers...
 1.6 11-Jun-2013  msaitoh branches: 1.6.10; 1.6.14; 1.6.18;
In interrupt function, use mii_pollstat() instead of mii_tick() to update
PHY status.
 1.5 22-Jul-2012  matt branches: 1.5.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.4 01-Jul-2011  dyoung branches: 1.4.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 23-Dec-2008  matt branches: 1.3.2; 1.3.4; 1.3.8;
Baby steps to a working driver. transmit works. receive sometimes works
but the h/w is doing really weird shit.
 1.2 15-Dec-2008  matt Get the gmac driver close to working.
 1.1 14-Dec-2008  matt Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port. It's still being debugged but it attaches and does some
things right. And a lot wrong. That's what debugging is for.
 1.3.8.2 04-May-2009  yamt sync with head.
 1.3.8.1 23-Dec-2008  yamt file if_gmc.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.4.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.4.1 23-Dec-2008  skrll file if_gmc.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.2.1 23-Dec-2008  mjf file if_gmc.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.4.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.4.2.1 30-Oct-2012  yamt sync with head
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 23-Jun-2013  tls resync from head
 1.6.18.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.10.1 28-Aug-2017  skrll Sync with HEAD
 1.7.14.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.14.1 10-Jun-2019  christos Sync with HEAD
 1.12.4.1 29-Feb-2020  ad Sync with head.
 1.18 29-Jun-2024  riastradh if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377
 1.17 26-May-2023  andvar Fix potential null dereference by simply adding last_gd != NULL check
around the code block with last_gd usage after the inner loop.
It may mainly happen on bus_dmamap_load error.
Reported by Mootja _14, 2017.
 1.16 17-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.15 20-Aug-2022  thorpej gpn_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
 1.14 01-Feb-2020  thorpej Adopt <net/if_stats.h>.
 1.13 30-Oct-2019  msaitoh branches: 1.13.2;
ether_input() automatically add input bytes to if_ibytes, so it's not
required to do in the driver who use ether_input().
 1.12 29-May-2019  msaitoh branches: 1.12.2;
Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.11 29-May-2019  msaitoh KNF. No functional change.
 1.10 26-Apr-2019  msaitoh No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.9 26-Jun-2018  msaitoh branches: 1.9.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.8 25-Jun-2017  maxv branches: 1.8.4;
NULL deref, found by Mootja; not sure how to fix it, so just add a big XXX
 1.7 15-Dec-2016  ozaki-r branches: 1.7.8;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.6 10-Jun-2016  ozaki-r branches: 1.6.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.4 01-Jul-2011  dyoung branches: 1.4.12; 1.4.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.2 19-Jan-2010  pooka branches: 1.2.2; 1.2.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.1 06-Dec-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10;
add gemini pseudo-nic and support code.
 1.1.10.4 11-Aug-2010  yamt sync with head.
 1.1.10.3 11-Mar-2010  yamt sync with head
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 06-Dec-2008  yamt file if_gpn.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 06-Dec-2008  skrll file if_gpn.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 06-Dec-2008  mjf file if_gpn.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.2.4.1 30-May-2010  rmind sync with head
 1.2.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.30.4 28-Aug-2017  skrll Sync with HEAD
 1.4.30.3 05-Feb-2017  skrll Sync with HEAD
 1.4.30.2 09-Jul-2016  skrll Sync with HEAD
 1.4.30.1 19-Mar-2016  skrll Sync with HEAD
 1.4.12.1 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7.8.1 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1427):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.8.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.9.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.12.2.1 06-Nov-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #403):

sys/arch/arm/broadcom/bcm53xx_eth.c: revision 1.39
sys/dev/pcmcia/if_xi.c: revision 1.91
sys/dev/ic/aic6915.c: revision 1.40
sys/dev/pci/if_tl.c: revision 1.117
sys/arch/arm/gemini/gemini_gmac.c: revision 1.18
sys/dev/ic/elinkxl.c: revision 1.133
sys/dev/pci/if_ste.c: revision 1.57
sys/dev/pci/if_alc.c: revision 1.43
sys/dev/pci/if_stge.c: revision 1.72
sys/dev/pci/if_ale.c: revision 1.34
sys/dev/pci/if_age.c: revision 1.62
sys/dev/pci/if_txp.c: revision 1.60
sys/dev/ic/i82557.c: revision 1.156
sys/dev/pci/if_vte.c: revision 1.27
sys/arch/powerpc/booke/dev/pq3etsec.c: revision 1.47
sys/arch/arm/gemini/if_gpn.c: revision 1.13

if_percpuq(9) and ether_input() automatically increment if_ipackets, so don't add number of
RX frames from device's statistics counter to if_ipackets to avoid double
count.
 1.13.2.1 29-Feb-2020  ad Sync with head.
 1.5 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.4 01-Jul-2011  dyoung branches: 1.4.52; 1.4.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 15-Nov-2008  cliff branches: 1.3.4; 1.3.6; 1.3.10;
further abstraction of LPC bus
 1.2 10-Nov-2008  cliff reduce callout polling period to (hz/16)
once we get serial irq from 8712 uart working
this should become a non-issue
 1.1 09-Nov-2008  cliff preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.3.10.2 04-May-2009  yamt sync with head.
 1.3.10.1 15-Nov-2008  yamt file lpc_com.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.3.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.3.6.1 15-Nov-2008  skrll file lpc_com.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.3.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.3.4.1 15-Nov-2008  mjf file lpc_com.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.4.54.1 10-Jun-2019  christos Sync with HEAD
 1.4.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1 09-Nov-2008  cliff branches: 1.1.4; 1.1.6; 1.1.10;
preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.1.10.2 04-May-2009  yamt sync with head.
 1.1.10.1 09-Nov-2008  yamt file lpc_com.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.1.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.6.1 09-Nov-2008  skrll file lpc_com.h was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.1.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.4.1 09-Nov-2008  mjf file lpc_com.h was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 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 09-Apr-2018  jakllsch branches: 1.5.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.4 23-Apr-2016  skrll branches: 1.4.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.3 20-Jul-2012  matt branches: 1.3.2; 1.3.14; 1.3.16; 1.3.20;
EHCI_USBINTR is 4 bytes long so use EOWRITE4
 1.2 24-Oct-2008  matt branches: 1.2.8; 1.2.14; 1.2.32;
Forgot to do the aprint_normal();
 1.1 24-Oct-2008  matt Add EHCI attachment for GEMINI port.
 1.2.32.1 30-Oct-2012  yamt sync with head
 1.2.14.2 04-May-2009  yamt sync with head.
 1.2.14.1 24-Oct-2008  yamt file obio_ehci.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.2.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.8.1 24-Oct-2008  mjf file obio_ehci.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.3.20.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.3.16.2 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.3.16.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.3.14.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.3.2.1 03-Dec-2017  jdolecek update from HEAD
 1.4.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.5.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 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 08-Jan-2019  jdolecek branches: 1.5.14;
no need to include <machine/param.h> if <sys/param.h> already included
 1.4 27-Oct-2012  chs branches: 1.4.36; 1.4.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 20-Nov-2008  cliff branches: 1.2.4; 1.2.6; 1.2.10;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.1 09-Nov-2008  cliff preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
 1.2.10.2 04-May-2009  yamt sync with head.
 1.2.10.1 20-Nov-2008  yamt file obio_lpchc.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:42 +0000
 1.2.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.2.6.1 20-Nov-2008  skrll file obio_lpchc.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 20-Nov-2008  mjf file obio_lpchc.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.4.38.1 10-Jun-2019  christos Sync with HEAD
 1.4.36.1 18-Jan-2019  pgoyette Synch with HEAD
 1.5.14.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 04-Dec-2008  cliff branches: 1.4.4; 1.4.8;
avoid initializing controller stuff twice by supressing SLAVE from doing so
 1.3 11-Nov-2008  cliff - add option GEMINI_SINGLE for single-core system model
- add "re" interface to GEMINI configuration
 1.2 09-Nov-2008  cliff - we are combining stat and system clocks to use the same timer
the master and slave CPU each get one timer for those functions;
both CPUs can use the free-running ref timer;
it is initialized by CPU#0 and after that all access is read-only
- use correct OBIO_*_DEFAULT locator indicies
 1.1 24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.8.2 04-May-2009  yamt sync with head.
 1.4.8.1 04-Dec-2008  yamt file obio_timer.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:42 +0000
 1.4.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.4.4.1 04-Dec-2008  mjf file obio_timer.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.12 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.11 19-Sep-2021  andvar s/Plese/Please/ in comment, and fix an article in obio_wdc.c comment.
 1.10 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.9 03-Jun-2019  msaitoh Fix typo in comment (s/seperate/separate/).
 1.8 20-Oct-2017  jdolecek branches: 1.8.4;
move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

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

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

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

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.3 01-Jul-2011  dyoung branches: 1.3.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 17-Nov-2008  cliff branches: 1.2.4; 1.2.6; 1.2.10;
fix "adapted from" (iq31244) and remove iq31244-specific jumper comment
 1.1 09-Nov-2008  cliff autoconfig glue for wdc at obio on Gemini
 1.2.10.2 04-May-2009  yamt sync with head.
 1.2.10.1 17-Nov-2008  yamt file obio_wdc.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:42 +0000
 1.2.6.2 19-Jan-2009  skrll Sync with HEAD.
 1.2.6.1 17-Nov-2008  skrll file obio_wdc.c was added on branch nick-hppapmap on 2009-01-19 13:15:58 +0000
 1.2.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.4.1 17-Nov-2008  mjf file obio_wdc.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.6.2.1 03-Dec-2017  jdolecek update from HEAD
 1.8.4.1 10-Jun-2019  christos Sync with HEAD
 1.8 08-Jan-2019  jdolecek no need to include <machine/param.h> if <sys/param.h> already included
 1.7 27-Oct-2012  chs branches: 1.7.36; 1.7.38;
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 20-Nov-2008  cliff branches: 1.5.4; 1.5.8;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.4 08-Nov-2008  cliff use correct OBIOCF_*_DEFAULT locator values
 1.3 04-Nov-2008  cliff use device_private(self) instead of cast to get sc
 1.2 31-Oct-2008  cliff in geminiwdt_attach, put watchdog device in known (disabled) state,
then register this driver with sysmon_wdog_register.
rip out temp debug stuff from bringup.
 1.1 24-Oct-2008  matt branches: 1.1.2; 1.1.4;
Add support for Cortina Systems SL3516 eval board.
 1.1.4.1 01-Nov-2008  snj Pull up following revision(s) (requested by cliff in ticket #2):
sys/arch/arm/gemini/obio_wdt.c: revision 1.2
in geminiwdt_attach, put watchdog device in known (disabled) state,
then register this driver with sysmon_wdog_register.
rip out temp debug stuff from bringup.
 1.1.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.8.2 04-May-2009  yamt sync with head.
 1.5.8.1 20-Nov-2008  yamt file obio_wdt.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:42 +0000
 1.5.4.2 17-Jan-2009  mjf Sync with HEAD.
 1.5.4.1 20-Nov-2008  mjf file obio_wdt.c was added on branch mjf-devfs2 on 2009-01-17 13:27:53 +0000
 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.38.1 10-Jun-2019  christos Sync with HEAD
 1.7.36.1 18-Jan-2019  pgoyette Synch with HEAD
 1.3 13-Nov-2010  bsh rename files.imx as files.imx31
 1.2 27-Apr-2008  matt branches: 1.2.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file files.imx was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.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.1.2.2 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.7 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.6 28-Nov-2020  skrll Fix build by renaming the pinctrl driver
 1.5 26-Nov-2020  skrll Trailing whitespace
 1.4 10-Jan-2015  jmcneill branches: 1.4.30;
Petri Laakso <petri.laakso@asd.fi>
- New audio driver
- Add new devices rtc and digfilt
- Use BOOT_ARGS if defined in kernel configuration
 1.3 10-Jan-2015  jmcneill define MEMSIZE in opt_imx.h, fixes build of IMX23_OLINUXINO kernel
 1.2 07-Oct-2013  matt branches: 1.2.4; 1.2.6; 1.2.10;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.4 03-Dec-2017  jdolecek update from HEAD
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file files.imx23 was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file files.imx23 was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2.10.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.2.6.1 06-Apr-2015  skrll Sync with HEAD
 1.2.4.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.4.30.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.9 04-Nov-2025  andvar Remove never committed devices from the files.imx31 configuration.
NFCI
 1.8 08-Sep-2017  hkenken - Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.7 11-Mar-2011  bsh branches: 1.7.14;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.6 15-Nov-2010  bsh branches: 1.6.2; 1.6.6;
EPIT support as system clock for i.MX31
 1.5 13-Nov-2010  bsh branches: 1.5.2;
UART driver for i.MX31 and 51.
 1.4 13-Nov-2010  bsh back out previous. That was an mistake.
 1.3 13-Nov-2010  bsh rename imx31_space.c as imx_space.c
 1.2 13-Nov-2010  bsh rename imx31_space.c as imx_space.c
 1.1 13-Nov-2010  bsh rename files.imx as files.imx31
 1.5.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.5.2.1 13-Nov-2010  uebayasi file files.imx31 was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.6.6.3 21-Apr-2011  rmind sync with head
 1.6.6.2 05-Mar-2011  rmind sync with head
 1.6.6.1 15-Nov-2010  rmind file files.imx31 was added on branch rmind-uvmplock on 2011-03-05 20:49:33 +0000
 1.6.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.7.14.1 03-Dec-2017  jdolecek update from HEAD
 1.24 21-Jun-2020  skrll Remove all paltforms
 1.23 21-Jun-2020  simonb Fix tyop.
 1.22 23-May-2020  rin imxpwm depends on clk.
 1.21 20-May-2020  hkenken Use kernel API of PWM subsystems for i.MX PWM driver.
 1.20 12-Oct-2019  skrll Spell controller correctly
 1.19 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.18 17-Mar-2018  ryo branches: 1.18.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.17 08-Sep-2017  hkenken branches: 1.17.2;
- Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.16 18-Aug-2017  jakllsch Sprinkle 'bus_dma_generic needs-flag' to fix build after previous.
 1.15 17-Aug-2017  hkenken Use armv7_generic_[dma|bs]_tag.
 1.14 21-Dec-2015  hkenken Rewritten to take advantage of genfb(4).
 1.13 07-May-2015  hkenken use armv7_generic_space
 1.12 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.11 25-Jul-2014  hkenken branches: 1.11.4;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.10 25-Jul-2014  hkenken Add i2c driver for i.MX.
 1.9 06-May-2014  hkenken Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.8 22-Mar-2014  hkenken branches: 1.8.2;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.7 22-Mar-2014  hkenken * GPIO interrupts of i.MX5 are divided into two groups.
add IMX_GPIO_INTR_SPLIT option
* Support GPIO both edge trigger interrupt.
 1.6 22-Mar-2014  hkenken add Watchdog Timer support for i.MX51.
 1.5 19-Apr-2012  bsh branches: 1.5.2; 1.5.4;
support SD/MMC on Netwalker.
 1.4 17-Apr-2012  bsh Support i.MX51's LCD framebuffer on Netwalker.
from Kenichi Hashimoto.
 1.3 11-Mar-2011  bsh branches: 1.3.4; 1.3.8;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.2 30-Nov-2010  bsh branches: 1.2.2; 1.2.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file files.imx51 was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.2.6.3 21-Apr-2011  rmind sync with head
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file files.imx51 was added on branch rmind-uvmplock on 2011-03-05 20:49:33 +0000
 1.2.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.8.1 29-Apr-2012  mrg sync to latest -current.
 1.3.4.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.3.4.1 23-May-2012  yamt sync with head.
 1.5.4.1 18-May-2014  rmind sync with head
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 10-Aug-2014  tls Rebase.
 1.11.4.4 28-Aug-2017  skrll Sync with HEAD
 1.11.4.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.4.2 06-Jun-2015  skrll Sync with HEAD
 1.11.4.1 06-Apr-2015  skrll Sync with HEAD
 1.17.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.18.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21 23-May-2020  skrll imx6 kernels are part of GENERIC now
 1.20 23-May-2020  rin imxpcie also depends on clk.
 1.19 12-Oct-2019  skrll Spell controller correctly
 1.18 27-Jul-2019  skrll Fix builds properly
 1.17 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.16 24-Jul-2019  hkenken Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.15 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.14 20-Jun-2018  hkenken branches: 1.14.2;
Modified CCM register defines.
 1.13 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.12 09-Nov-2017  hkenken branches: 1.12.2;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.11 08-Sep-2017  hkenken - Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.10 18-Aug-2017  jakllsch Sprinkle 'bus_dma_generic needs-flag' to fix build after previous.
 1.9 17-Aug-2017  hkenken Use armv7_generic_[dma|bs]_tag.
 1.8 24-Nov-2016  hkenken Add support imx6 PCIe controller.
 1.7 17-May-2016  ryo branches: 1.7.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.6 31-Dec-2015  ryo use armv7_generic_space
 1.5 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.4 07-Oct-2014  ryo branches: 1.4.2;
add support imx6 I2C Controller
 1.3 06-Oct-2014  ryo add support imx6 Secure Non-Volatile Storage (SNVS) real-time clock
 1.2 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4;
Some initial iMX.6 support
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file files.imx6 was added on branch yamt-pagecache on 2012-10-30 17:19:03 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.4.2.5 28-Aug-2017  skrll Sync with HEAD
 1.4.2.4 05-Dec-2016  skrll Sync with HEAD
 1.4.2.3 29-May-2016  skrll Sync with HEAD
 1.4.2.2 19-Mar-2016  skrll Sync with HEAD
 1.4.2.1 06-Apr-2015  skrll Sync with HEAD
 1.7.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.12.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.12.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.14.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.9 12-Oct-2019  skrll branches: 1.9.8;
Spell controller correctly
 1.8 27-Jul-2019  hkenken Fixed compile error.
 1.7 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.6 17-Mar-2018  ryo branches: 1.6.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.5 08-Sep-2017  hkenken branches: 1.5.2; 1.5.4;
- Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.4 18-Aug-2017  jakllsch Sprinkle 'bus_dma_generic needs-flag' to fix build after previous.
 1.3 17-Aug-2017  hkenken Use armv7_generic_[dma|bs]_tag.
 1.2 17-Oct-2016  ryo * Add option MEMSIZE_RESERVED to reserves memory for Cortex-M4 area
* change KERNEL_BASE from 0x80008000 to 0x82000000
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file files.imx7 was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.5.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 08-Sep-2017  jdolecek file files.imx7 was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.37 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.36 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.35 24-Jan-2022  andvar s/begining/beginning/ in comments and messages.
 1.34 31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.33 31-Dec-2020  uwe enet(4): fix refactoring accident. Spotted by mrg@.
 1.32 14-May-2020  msaitoh branches: 1.32.2;
Remove extra semicolon.
 1.31 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.30 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.29 29-Nov-2019  ryo branches: 1.29.2;
set the multicast filter properly.

don't always IFF_ALLMULTI if multicast is configured.
fix the handling of GAUR and GALR.
 1.28 12-Nov-2019  hkenken IPG clock is used instead of ENET_PLL clock to set MII Speed Control Register.
 1.27 20-Sep-2019  maxv Use M_BUFADDR.
 1.26 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.25 30-Jul-2019  hkenken branches: 1.25.2;
Remove fdtbus_gpio_release() from enet_phy_reset().
 1.24 23-Jul-2019  hkenken Modified enet_attach_common().
 1.23 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.22 24-May-2019  msaitoh Fix compile error.
 1.21 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.20 23-May-2019  msaitoh -No functional change:
- Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
- Simplify MII structure initialization.
- u_int*_t -> uint*_t.
- KNF
 1.19 24-Apr-2019  msaitoh SIOCS is 'S'et function and the ioctl argument is ifreq.
SIOCG is 'G'et function and the ioctl argument is ifmediareq.
Before this change, SIOCG modify sc->sc_flowflags unexpectedly.
Don't hook SIOCGIFMEDIA because this driver uses MII(4) and ether_ioctl has
the hook(if_ethersubr.c rev. 1.160). This driver might require some additional
fixes for SIOCSIFMTU and other ioctl()s.

XXX pullup-[78].
 1.18 11-Apr-2019  msaitoh Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.
 1.17 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.16 22-Dec-2018  maxv Replace: M_MOVE_PKTHDR -> m_move_pkthdr. No functional change, since the
former is a macro to the latter.
 1.15 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.14 26-Jun-2018  msaitoh branches: 1.14.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.13 08-May-2018  maxv Don't remove M_PKTHDR manually, use m_remove_pkthdr instead.

ok ryo@
 1.12 16-Feb-2018  ryo branches: 1.12.2;
* avoid writing past the end of the mbuf.
* m_getptr was introduced for the IPsec Crypto code. it must not be used here.

pointed out by maxv@. thanks.
 1.11 09-Jun-2017  ryo branches: 1.11.4;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.10 15-Dec-2016  ozaki-r branches: 1.10.8;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.9 02-Oct-2016  christos MFREE -> m_free
 1.8 15-Jun-2016  ryo branches: 1.8.2;
fix the tx stall problem. ("watchdog timeout")
TX descriptor should be written out once before writing READY flag.
 1.7 10-Jun-2016  ozaki-r Introduce m_set_rcvif and m_reset_rcvif

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

No functional change.
 1.6 17-May-2016  ryo Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.5 09-Feb-2016  ozaki-r Introduce softint-based if_input

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.4 27-Apr-2015  christos Fix memory leak (Brainy)
 1.3 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.2 15-Mar-2015  ryo - fix interrupt type ans interrupt masks
- change timing of callout_schedule because it doesn't schedule once enet_stop is called
- typo
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.8 28-Aug-2017  skrll Sync with HEAD
 1.1.2.7 05-Feb-2017  skrll Sync with HEAD
 1.1.2.6 05-Oct-2016  skrll Sync with HEAD
 1.1.2.5 09-Jul-2016  skrll Sync with HEAD
 1.1.2.4 29-May-2016  skrll Sync with HEAD
 1.1.2.3 19-Mar-2016  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 06-Apr-2015  skrll Sync with HEAD
 1.8.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.8.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.10.8.2 14-May-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1267):

sys/arch/arm/imx/if_enet.c: revision 1.19
sys/dev/pci/if_wm.c: revision 1.634

SIOCS is 'S'et function and the ioctl argument is ifreq.
SIOCG is 'G'et function and the ioctl armument is ifmediareq.

Before this change, SIOCG modify sc->sc_flowflags unexpectedly.


Don't hook SIOCGIFMEDIA becauise this driver uses MII(4) and ether_ioctl has
the hook(if_ethersubr.c rev. 1.160).
real bug because the modification is overriden in ifmedia_ioctl().

This driver might require some additional fixes for SIOCSIFMTU and other
ioctl()s.
XXX pullup-[78].
 1.10.8.1 13-May-2019  martin Pull up the following, via patch, requested by msaitoh in ticket #1263:

sys/dev/mii/brgphy.c 1.84
sys/dev/mii/ciphy.c 1.33 via patch
sys/dev/mii/rgephy.c 1.53
sys/arch/arm/imx/if_enet.c 1.18
sys/arch/mips/adm5120/dev/if_admsw.c 1.19-1.20
sys/dev/pci/if_bge.c 1.329
sys/dev/pci/if_bnx.c 1.81
sys/dev/pci/if_et.c 1.21
sys/dev/pci/if_lii.c 1.22
sys/dev/pci/if_msk.c 1.87
sys/dev/pci/if_nfe.c 1.68
sys/dev/pci/if_sk.c 1.95
sys/dev/pci/if_ti.c 1.107
sys/dev/pci/if_txp.c 1.52
sys/dev/pci/if_vge.c 1.69
sys/dev/usb/if_axen.c 1.38
sys/dev/usb/if_aue.c 1.149

Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.
 1.11.4.2 03-Dec-2017  jdolecek update from HEAD
 1.11.4.1 09-Jun-2017  jdolecek file if_enet.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.12.2.5 26-Jan-2019  pgoyette Sync with HEAD
 1.12.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.12.2.1 21-May-2018  pgoyette Sync with HEAD
 1.14.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.14.2.1 10-Jun-2019  christos Sync with HEAD
 1.25.2.1 08-Dec-2019  martin Pull up following revision(s) (requested by ryo in ticket #509):

sys/arch/arm/imx/if_enet.c: revision 1.29

set the multicast filter properly.

don't always IFF_ALLMULTI if multicast is configured.
fix the handling of GAUR and GALR.
 1.29.2.2 29-Feb-2020  ad Sync with head.
 1.29.2.1 17-Jan-2020  ad Sync with head.
 1.32.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.10 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.9 15-Jan-2020  jmcneill branches: 1.9.6;
Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.8 25-Nov-2019  hkenken branches: 1.8.2;
Fixed bug.

* typo
 1.7 12-Nov-2019  hkenken IPG clock is used instead of ENET_PLL clock to set MII Speed Control Register.
 1.6 30-Jul-2019  hkenken Remove fdtbus_gpio_release() from enet_phy_reset().
 1.5 23-Jul-2019  hkenken Modified enet_attach_common().
 1.4 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.3 09-Jun-2017  ryo branches: 1.3.4; 1.3.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.2 24-Nov-2016  hkenken Modified imx6_pll_power() arguments.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file if_enet_imx6.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.3.8.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 09-Jun-2017  jdolecek file if_enet_imx6.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.8.2.1 17-Jan-2020  ad Sync with head.
 1.9.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.7 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.6 15-Jan-2020  jmcneill branches: 1.6.6;
Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.5 12-Nov-2019  hkenken branches: 1.5.2;
IPG clock is used instead of ENET_PLL clock to set MII Speed Control Register.
 1.4 30-Jul-2019  hkenken Remove fdtbus_gpio_release() from enet_phy_reset().
 1.3 23-Jul-2019  hkenken Modified enet_attach_common().
 1.2 09-Jun-2017  ryo branches: 1.2.4; 1.2.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file if_enet_imx7.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.8.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 09-Jun-2017  jdolecek file if_enet_imx7.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.5.2.1 17-Jan-2020  ad Sync with head.
 1.6.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.6 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.5 27-Jun-2022  andvar fix various typos in comments.
 1.4 12-Nov-2019  hkenken IPG clock is used instead of ENET_PLL clock to set MII Speed Control Register.
 1.3 09-Jun-2017  ryo branches: 1.3.4; 1.3.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.2 17-May-2016  ryo Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 29-May-2016  skrll Sync with HEAD
 1.3.8.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 09-Jun-2017  jdolecek file if_enetreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.9 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.8 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.7 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.6 12-Nov-2019  hkenken branches: 1.6.2;
IPG clock is used instead of ENET_PLL clock to set MII Speed Control Register.
 1.5 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.4 23-Jul-2019  hkenken Modified enet_attach_common().
 1.3 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.2 09-Jun-2017  ryo branches: 1.2.4; 1.2.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file if_enetvar.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.8.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 09-Jun-2017  jdolecek file if_enetvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6.2.1 17-Jan-2020  ad Sync with head.
 1.4 02-Oct-2025  skrll Trailing whitespace.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.50;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.50.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.1.50.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.1.50.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.1.50.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.1.50.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.1.50.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.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_ahb.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_ahb.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_ahb.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 02-Oct-2025  skrll Trailing whitespace.
 1.4 10-Jan-2015  jmcneill From Petri Laakso <petri.laakso@asd.fi>:
- Fix typo: AHBH should be APBH
- Add support for APBX DMA
- New function apbdma_wait(); wait for DMA completion
 1.3 03-Mar-2013  jkunz branches: 1.3.14;
Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.2 16-Dec-2012  jkunz branches: 1.2.2; 1.2.6;
Contribution from Petri Laakso: Fix some spelling.
 1.1 20-Nov-2012  jkunz Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.2.6.4 03-Dec-2017  jdolecek update from HEAD
 1.2.6.3 23-Jun-2013  tls resync from head
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 16-Dec-2012  tls file imx23_apbdma.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.2.2.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.2.3 23-Jan-2013  yamt sync with head
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 16-Dec-2012  yamt file imx23_apbdma.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.3.14.1 06-Apr-2015  skrll Sync with HEAD
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbdma.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbdma.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.3 10-Jan-2015  jmcneill From Petri Laakso <petri.laakso@asd.fi>:
- Fix typo: AHBH should be APBH
- Add support for APBX DMA
- New function apbdma_wait(); wait for DMA completion
 1.2 03-Mar-2013  jkunz branches: 1.2.14;
Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.4 03-Dec-2017  jdolecek update from HEAD
 1.1.6.3 23-Jun-2013  tls resync from head
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbdmareg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbdmareg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2.14.1 06-Apr-2015  skrll Sync with HEAD
 1.2 10-Jan-2015  jmcneill From Petri Laakso <petri.laakso@asd.fi>:
- Fix typo: AHBH should be APBH
- Add support for APBX DMA
- New function apbdma_wait(); wait for DMA completion
 1.1 03-Mar-2013  jkunz branches: 1.1.6; 1.1.14; 1.1.18;
Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.1.18.1 06-Apr-2015  skrll Sync with HEAD
 1.1.14.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.1.14.1 03-Mar-2013  yamt file imx23_apbdmavar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 23-Jun-2013  tls resync from head
 1.1.6.1 03-Mar-2013  tls file imx23_apbdmavar.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.5 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.4 02-Oct-2025  skrll Trailing whitespace.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6; 1.1.56;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.56.7 05-Apr-2021  thorpej Oops. missed this in the last.
 1.1.56.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.1.56.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.1.56.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.1.56.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.1.56.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.1.56.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.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbh.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbh.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 03-Mar-2013  jkunz Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 23-Jun-2013  tls resync from head
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbhdmareg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbhdmareg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.5 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.4 02-Oct-2025  skrll Trailing whitespace.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6; 1.1.56;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.56.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.1.56.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.1.56.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.1.56.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.1.56.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.1.56.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.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbx.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbx.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 03-Mar-2013  jkunz Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 23-Jun-2013  tls resync from head
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_apbxdmareg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_apbxdmareg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.4 02-Oct-2025  skrll Trailing whitespace.
 1.3 18-Oct-2019  msaitoh s/initalize/initialize/ in comment or printf message.
 1.2 10-Jan-2015  jmcneill branches: 1.2.18;
From: Petri Laakso <petri.laakso@asd.fi>
- Enable 24MHz clock for the Digital Filter.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.12.1 06-Apr-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_clkctrl.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_clkctrl.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_clkctrl.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_clkctrlreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_clkctrlreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2 10-Jan-2015  jmcneill From: Petri Laakso <petri.laakso@asd.fi>
- Enable 24MHz clock for the Digital Filter.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.12.1 06-Apr-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_clkctrlvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_clkctrlvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_clkctrlvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3 02-Oct-2025  skrll Trailing whitespace.
 1.2 18-Oct-2019  msaitoh s/initalize/initialize/ in comment or printf message.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_digctl.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_digctl.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_digctl.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_digctlreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_digctlreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_digctlvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_digctlvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_digctlvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.5 02-Oct-2025  skrll Trailing whitespace.
 1.4 04-Oct-2021  andvar follow fcambus steps by fixing typos for "unknown" in few more error messages.
 1.3 19-Apr-2020  isaki Fix round_blocksize not to return 0.
 1.2 08-May-2019  isaki branches: 1.2.8;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.1 10-Jan-2015  jmcneill branches: 1.1.2; 1.1.18; 1.1.22; 1.1.24;
From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1.24.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.1.24.2 04-May-2019  isaki Remove obsoleted methods in audio_hw_if.
- drain: is handled in audio upper layer now.
- mappage: is handled in audio upper layer now.
- setfd: no one uses and it's meaningless now.
 1.1.24.1 24-Apr-2019  isaki Adapt to audio2.
- move resetting sc_cmd_index from drain to halt_output since
drain is obsoleted.
 1.1.22.2 21-Apr-2020  martin Sync with HEAD
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-Jan-2015  jdolecek file imx23_digfilt.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 10-Jan-2015  skrll file imx23_digfilt.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.2.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.1 10-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-Jan-2015  jdolecek file imx23_digfiltreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 10-Jan-2015  skrll file imx23_digfiltreg.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1 10-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-Jan-2015  jdolecek file imx23_digfiltvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 10-Jan-2015  skrll file imx23_digfiltvar.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_dma.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_dma.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_emireg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_emireg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.6 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.5 02-Oct-2025  skrll Trailing whitespace.
 1.4 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.3 25-Feb-2014  martin Add missing include of <arm/cpufunc.h>.
Pointed out by Tero Koskinen.
 1.2 16-Dec-2012  jkunz branches: 1.2.2; 1.2.4; 1.2.6;
Contribution from Petri Laakso: Fix some spelling.
 1.1 20-Nov-2012  jkunz Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.2.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 16-Dec-2012  tls file imx23_icoll.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.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.2.3 23-Jan-2013  yamt sync with head
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 16-Dec-2012  yamt file imx23_icoll.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.3 03-Mar-2013  jkunz Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.2 16-Dec-2012  jkunz branches: 1.2.2; 1.2.6;
Contribution from Petri Laakso: Fix some spelling.
 1.1 20-Nov-2012  jkunz Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.2.6.3 23-Jun-2013  tls resync from head
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 16-Dec-2012  tls file imx23_icollreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.2.2.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.2.3 23-Jan-2013  yamt sync with head
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 16-Dec-2012  yamt file imx23_icollreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_intr.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_intr.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 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 28-Nov-2020  skrll branches: 1.4.2;
Fix build by renaming the pinctrl driver
 1.3 26-Nov-2020  skrll Trailing whitespace
 1.2 18-Oct-2019  msaitoh branches: 1.2.8;
s/initalize/initialize/ in comment or printf message.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_pinctrl.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_pinctrl.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_pinctrl.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4.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.5.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_pinctrlreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_pinctrlreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2 28-Nov-2020  skrll Fix build by renaming the pinctrl driver
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.48;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.48.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_pinctrlvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_pinctrlvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_pinctrlvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.2 23-Oct-2018  jmcneill Fix blank line printed at attach on ACPI
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6; 1.1.40; 1.1.42;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.42.1 10-Jun-2019  christos Sync with HEAD
 1.1.40.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_plcom.c was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_plcom.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_powerreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_powerreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.3 02-Oct-2025  skrll Trailing whitespace.
 1.2 18-Oct-2019  msaitoh s/initalize/initialize/ in comment or printf message.
 1.1 10-Jan-2015  jmcneill branches: 1.1.2; 1.1.18; 1.1.22;
From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1.22.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-Jan-2015  jdolecek file imx23_rtc.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 10-Jan-2015  skrll file imx23_rtc.c was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.2 10-Jan-2015  jmcneill From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6; 1.1.18;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.18.1 06-Apr-2015  skrll Sync with HEAD
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_rtcreg.h was added on branch tls-maxphys on 2013-02-25 00:28:27 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_rtcreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.1 10-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
From Petri Laakso <petri.laakso@asd.fi>:
- Audio output driver for imx23
- Supporting code for audio driver
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-Jan-2015  jdolecek file imx23_rtcvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 10-Jan-2015  skrll file imx23_rtcvar.h was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.3 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.2 07-Oct-2013  matt branches: 1.2.28;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_space.c was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_space.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.2.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9 02-Oct-2025  skrll Trailing whitespace.
 1.8 21-Oct-2021  andvar fix various typos, mainly in comments, but also in man pages and log messages.
 1.7 16-Sep-2021  andvar fix typos in word "successfully", mainly s/succesfully/successfully/.
 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 07-Oct-2013  matt branches: 1.4.44;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.3 03-Mar-2013  jkunz branches: 1.3.6;
Contribution from Petri Laakso:
- DMA driver stub code replaced with working code.
- Add support to multi block DMA in ssp driver.
 1.2 16-Dec-2012  jkunz branches: 1.2.2; 1.2.6;
Contribution from Petri Laakso: Initial support for SD card controller.
iMX233-OLinuXino can now boot and run from its own SD card.
 1.1 20-Nov-2012  jkunz Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.2.6.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.3 23-Jun-2013  tls resync from head
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 16-Dec-2012  tls file imx23_ssp.c was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.2.2.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.2.3 23-Jan-2013  yamt sync with head
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 16-Dec-2012  yamt file imx23_ssp.c was added on branch yamt-pagecache on 2013-01-16 05:32:47 +0000
 1.3.6.1 18-May-2014  rmind sync with head
 1.4.44.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.5.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_sspreg.h was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_sspreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.5 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.4 02-Oct-2025  skrll Trailing whitespace.
 1.3 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.2 16-Dec-2012  jkunz branches: 1.2.2; 1.2.4; 1.2.6;
Contribution from Petri Laakso: Fix some spelling.
 1.1 20-Nov-2012  jkunz Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.2.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 16-Dec-2012  tls file imx23_timrot.c was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.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.2.3 23-Jan-2013  yamt sync with head
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 16-Dec-2012  yamt file imx23_timrot.c was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_timrotreg.h was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_timrotreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_uartappreg.h was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_uartappreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23_uartdbgreg.h was added on branch tls-maxphys on 2013-02-25 00:28:28 +0000
 1.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23_uartdbgreg.h was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.7 15-Jan-2024  andvar Fix imx23_usb_init() function declaration, it expects two parameters.

Fixes build for IMX23_OLINUXINO kernel config.
 1.6 04-May-2023  bouyer The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.
Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.
In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.5 07-Aug-2021  thorpej branches: 1.5.6;
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 28-Nov-2020  skrll branches: 1.3.2;
Fix build by renaming the pinctrl driver
 1.2 24-Jul-2019  hkenken branches: 1.2.10;
i.MX USB host code re-arrangement.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_usb.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_usb.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_usb.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3.2.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.3.2.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.2.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.3.2.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.3.2.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.2.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.5.6.2 16-Jan-2024  martin Pull up following revision(s) (requested by andvar in ticket #556):

sys/arch/arm/imx/imx23_usb.c: revision 1.7

Fix imx23_usb_init() function declaration, it expects two parameters.

Fixes build for IMX23_OLINUXINO kernel config.
 1.5.6.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.2 02-Oct-2025  skrll Trailing whitespace.
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_usbphy.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_usbphy.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_usbphy.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.1 07-Oct-2013  matt branches: 1.1.4; 1.1.6; 1.1.10;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 07-Oct-2013  tls file imx23_usbphyreg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 07-Oct-2013  yamt file imx23_usbphyreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 07-Oct-2013  rmind file imx23_usbphyreg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.1 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.3 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.2 07-Oct-2013  matt iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.1 20-Nov-2012  jkunz branches: 1.1.2; 1.1.4; 1.1.6;
Add initial support for Freescale i.MX23 application processor.
Contributed by Petri Laakso.
 1.1.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 25-Feb-2013  tls resync with head
 1.1.6.1 20-Nov-2012  tls file imx23var.h was added on branch tls-maxphys on 2013-02-25 00:28:29 +0000
 1.1.4.1 18-May-2014  rmind sync with head
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 20-Nov-2012  yamt file imx23var.h was added on branch yamt-pagecache on 2013-01-16 05:32:48 +0000
 1.10 02-Oct-2025  skrll Trailing whitespace.
 1.9 07-Aug-2021  thorpej 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-Jul-2019  skrll branches: 1.7.12;
Fix builds properly
 1.6 27-Oct-2012  chs branches: 1.6.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 13-Nov-2010  bsh rename imx31_bs_tag as imx_bs_tag to share it with imx51.
 1.3 02-May-2008  martin branches: 1.3.22;
Replace TNF licenses with standard 2 clause variant.
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_ahb.c was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.3 12-Sep-2007  matt Improve/fix search code for critical devices that are needed before all
other devices.
 1.1.2.2 11-Sep-2007  matt Make the first member of the attach_args a const char * pointing to the
type name of the bus. (ahb, aips)
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.3.22.1 05-Mar-2011  rmind sync with head
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.6.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.12.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.12.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.7.12.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.7.12.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.12.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.8 02-Oct-2025  skrll Trailing whitespace.
 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 27-Oct-2012  chs branches: 1.5.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 02-May-2008  martin Replace TNF licenses with standard 2 clause variant.
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_aips.c was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 11-Sep-2007  matt Make the first member of the attach_args a const char * pointing to the
type name of the bus. (ahb, aips)
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 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.5.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.5.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.5.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.5.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.5.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 18-Apr-2012  bsh branches: 1.4.2;
adapt to imxclock.c rev 1.5.
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 15-Nov-2010  bsh branches: 1.2.6;
EPIT support as system clock for i.MX31
 1.1 13-Nov-2010  bsh branches: 1.1.2;
driver to use EPIT as system clock for i.MX31 and i.MX51,
by Hashimoto Kenichi.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx31_clock.c was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 15-Nov-2010  rmind file imx31_clock.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.3.6.1 29-Apr-2012  mrg sync to latest -current.
 1.3.2.2 30-Oct-2012  yamt sync with head
 1.3.2.1 23-May-2012  yamt sync with head.
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.8 22-Jul-2019  hkenken branches: 1.8.12;
Trailing whitespace
 1.7 27-Oct-2012  chs branches: 1.7.38;
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 15-Nov-2010  bsh GPIO register definitions are now in imxgpioreg.h to share them with
imx51
 1.4 19-Nov-2008  matt branches: 1.4.8;
Use <sys/atomic.h>, not <machine/atomic.h>
 1.3 28-Apr-2008  martin branches: 1.3.6; 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_gpio.c was initially added on branch matt-armv6.
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.4 29-Feb-2008  matt Rework establish_irq to take an intrsource.
Enable an interrupt after establishing it.
 1.1.2.3 12-Sep-2007  matt Cleanup attach routine.
 1.1.2.2 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.3.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.3.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.4.8.1 05-Mar-2011  rmind 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.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.12.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 02-Oct-2025  skrll Trailing whitespace.
 1.8 12-Feb-2022  riastradh sys: Fix various abuse of struct device internals.

Will help to make struct device opaque later.
 1.7 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.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 19-Nov-2008  matt Use <sys/atomic.h>, not <machine/atomic.h>
 1.4 13-Jun-2008  cegger branches: 1.4.2; 1.4.4;
use device_lookup_private to get softc
 1.3 28-Apr-2008  martin branches: 1.3.2; 1.3.4;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_icu.c was initially added on branch matt-armv6.
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.2 17-Jun-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.3 17-Jan-2009  mjf Sync with HEAD.
 1.1.20.2 29-Jun-2008  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.5 29-Feb-2008  matt Rework establish_irq to take an intrsource.
Enable an interrupt after establishing it.
 1.1.2.4 12-Sep-2007  matt Cleanup attach logic.
 1.1.2.3 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.1.2.2 30-Aug-2007  matt This should be complete. (it at least compiles).
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.3.4.1 18-Jun-2008  simonb Sync with head.
 1.3.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.4.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 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.6 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.5 27-Dec-2021  andvar fix few typos in comments.
 1.4 24-Sep-2021  skrll Catch up with spl changes.

It's 2021 and ugly is in (with apologies to PWEI)
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_intr.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.5 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.1.2.4 06-Nov-2007  matt No need for imx31_icu_init
 1.1.2.3 12-Sep-2007  matt Config 288 sources (64 normal + 96 gpio + 128 soft)
 1.1.2.2 30-Aug-2007  matt Fix the name of pic's softintr.h
Add imx31_irq_handler and imx31_icu_init prototypes
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_intrreg.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.4 13-Nov-2010  bsh rename imx31_space.c as imx_space.c
 1.3 07-Nov-2009  cegger branches: 1.3.2; 1.3.4;
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.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31_space.c was initially added on branch matt-armv6.
 1.1.24.2 11-Mar-2010  yamt sync with head
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.3.4.1 05-Mar-2011  rmind sync with head
 1.3.2.6 02-Nov-2010  uebayasi Drop the 'paddr_t avail_start' and 'paddr_t avail_end' arguments
from uvm_page_physload_device(9).

Those two arguments are used by uvm_page_physload(9) to specify a
range of physical memory available for general purpose pages (pages
which are linked to freelists). Totally irrelevant to device
segments.
 1.3.2.5 28-Jul-2010  uebayasi Correct bus_space_physload(9) arguments to take "int freelist".

A possible use case of bus_space_physload(9) would be some high-performance
device with huge local memory, like InfiniBand HCA. We can register
its local memory using bus_space_physload(..., VM_FREELIST_INFINIBAND0),
then later map it to userspace via cdev_mmap(9) -> bus_dmamem_mmap(9).

(bus_dma(9) needs changes too, of course.)
 1.3.2.4 26-Jul-2010  uebayasi After much consideration, rename bus_space_physload_direct(9) back to
bus_space_physload_device(9).

The latter registers a segment as "device pages". "Device pages" are
managed, but not used for general purpose memory. Most typically XIP
pages.
 1.3.2.3 31-May-2010  uebayasi Re-define the definition of "device page"; device pages are pages of
device memory. Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.
 1.3.2.2 29-Apr-2010  uebayasi Adapt to the new uvm_page_physload_device(9).
 1.3.2.1 28-Apr-2010  uebayasi Initial implemention of bus_space_physload(9) for NetBSD/arm (only i.MX31
for now).
 1.3 08-Sep-2017  hkenken - Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.2 27-Nov-2010  bsh branches: 1.2.6; 1.2.20;
use device_t correctly for imxuart.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
UART driver for i.MX31 and 51.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx31_uart.c was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.2.20.1 03-Dec-2017  jdolecek update from HEAD
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 27-Nov-2010  rmind file imx31_uart.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.5 15-Nov-2010  bsh EPIT support as system clock for i.MX31
 1.4 13-Nov-2010  bsh extract GPIO register definitions from imx31reg.h to share them with
i.MX51
 1.3 28-Apr-2008  martin branches: 1.3.22;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31reg.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.1.2.1 29-Aug-2007  matt W-I-P initial support for Freescale i.MX31 ARM11 SoC.
 1.3.22.1 05-Mar-2011  rmind sync with head
 1.3 13-Nov-2010  bsh rename imx31_bs_tag as imx_bs_tag to share it with imx51.
 1.2 27-Apr-2008  matt branches: 1.2.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx31var.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 11-Sep-2007  matt Make the first member of the attach_args a const char * pointing to the
type name of the bus. (ahb, aips)
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.1 25-Jul-2014  hkenken branches: 1.1.2; 1.1.6;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 25-Jul-2014  tls file imx50_iomuxreg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 25-Jul-2014  tls file imx50_iomuxreg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.10 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.9 07-Aug-2021  thorpej 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 17-Mar-2018  ryo branches: 1.7.16;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.6 17-Aug-2017  hkenken branches: 1.6.2;
Use armv7_generic_[dma|bs]_tag.
 1.5 07-May-2015  hkenken use armv7_generic_space
 1.4 10-Mar-2014  htodd branches: 1.4.6;
Delete unused variables for new gcc.
 1.3 17-Apr-2012  bsh branches: 1.3.2; 1.3.4;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.2 30-Nov-2010  bsh branches: 1.2.6; 1.2.10; 1.2.14;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_axi.c was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.2.14.1 29-Apr-2012  mrg sync to latest -current.
 1.2.10.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.10.1 23-May-2012  yamt sync with head.
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file imx51_axi.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.3.4.1 18-May-2014  rmind sync with head
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.2 28-Aug-2017  skrll Sync with HEAD
 1.4.6.1 06-Jun-2015  skrll Sync with HEAD
 1.6.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7.16.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.7.16.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.16.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.7.16.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.7.16.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.16.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.8 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.7 03-Sep-2018  riastradh branches: 1.7.16;
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.6 25-Jul-2014  hkenken branches: 1.6.26; 1.6.28;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.5 22-Mar-2014  hkenken branches: 1.5.2;
Fix SDHC clocks.
 1.4 22-Mar-2014  hkenken Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.3 19-Sep-2012  bsh branches: 1.3.2;
make Netwalker kernel compile again.
from Kenichi Hashimoto.
 1.2 01-Sep-2012  matt branches: 1.2.2;
Some initial iMX.6 support
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.1.4.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.1.4.3 30-Oct-2012  yamt sync with head
 1.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ccm.c was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ccm.c was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.2.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 18-May-2014  rmind sync with head
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.6.28.1 10-Jun-2019  christos Sync with HEAD
 1.6.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7.16.1 01-Aug-2021  thorpej Sync with HEAD.
 1.6 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.5 25-Jul-2014  hkenken branches: 1.5.44;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.4 22-Mar-2014  hkenken branches: 1.4.2;
Fix SDHC clocks.
 1.3 22-Mar-2014  hkenken Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.2 01-Sep-2012  matt branches: 1.2.2; 1.2.4;
Some initial iMX.6 support
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.1.4.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.1.4.3 30-Oct-2012  yamt sync with head
 1.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ccmreg.h was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ccmreg.h was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.5.44.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.2 22-Mar-2014  hkenken branches: 1.2.2;
Fix SDHC clocks.
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.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.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ccmvar.h was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ccmvar.h was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.5 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.4 27-Oct-2012  chs branches: 1.4.10;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 17-Apr-2012  bsh branches: 1.3.2;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8;
driver to use EPIT as system clock for i.MX31 and i.MX51,
by Hashimoto Kenichi.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imx51_clock.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_clock.c was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.2.6.1 29-Apr-2012  mrg sync to latest -current.
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 23-May-2012  yamt sync with head.
 1.3.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.10.1 10-Aug-2014  tls Rebase.
 1.2 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6; 1.1.16;
driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.1.16.1 10-Aug-2014  tls Rebase.
 1.1.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_dpllreg.h was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_dpllreg.h was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.4 06-Jun-2018  maya Remove duplicate ;
 1.3 26-May-2015  hkenken branches: 1.3.16;
Add SDHC_FLAG_USE_DMA flag for internal DMA mode.
 1.2 22-Mar-2014  hkenken branches: 1.2.6;
Fix SDHC clocks.
 1.1 19-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
support SD/MMC on Netwalker.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 03-Dec-2017  jdolecek update from HEAD
 1.1.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.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.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 19-Apr-2012  yamt file imx51_esdhc.c was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 19-Apr-2012  mrg file imx51_esdhc.c was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.2.6.1 06-Jun-2015  skrll Sync with HEAD
 1.3.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.4 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.3 25-Jul-2014  hkenken branches: 1.3.28;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.2 01-Jul-2011  dyoung branches: 1.2.12; 1.2.26;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 30-Nov-2010  bsh branches: 1.1.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imx51_gpio.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.2.26.1 10-Aug-2014  tls Rebase.
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.28.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 22-Jul-2022  thorpej Normalize how motoi2c controllers are attached.
 1.2 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.1 25-Jul-2014  hkenken branches: 1.1.2; 1.1.6; 1.1.8;
Add i2c driver for i.MX.
 1.1.8.1 06-Apr-2015  skrll Sync with HEAD
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 25-Jul-2014  tls file imx51_i2c.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 25-Jul-2014  tls file imx51_i2c.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.4 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.3 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.2 24-Sep-2021  skrll Catch up with spl changes.

It's 2021 and ugly is in (with apologies to PWEI)
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imx51_intr.h was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_intr.h was added on branch uebayasi-xip on 2010-11-15 14:38:21 +0000
 1.4 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.3 15-Apr-2012  bsh branches: 1.3.2;
delete unused reference.
delete trailing whitespace, and NKF.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 30-Nov-2010  bsh branches: 1.1.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imx51_iomux.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.2.6.1 29-Apr-2012  mrg sync to latest -current.
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.2 15-Apr-2012  bsh branches: 1.2.2; 1.2.12;
delete many definitions like MUX_PIN_foo.
use MUX_PIN(foo) instead.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.12; 1.1.16;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.16.1 29-Apr-2012  mrg sync to latest -current.
 1.1.12.1 17-Apr-2012  yamt sync with head
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imx51_iomuxreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_iomuxreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.12.1 10-Aug-2014  tls Rebase.
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 20-Nov-2020  thorpej branches: 1.9.2;
malloc(9) -> kmem(9)
 1.8 10-Nov-2019  chs branches: 1.8.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.7 17-Mar-2018  ryo branches: 1.7.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.6 17-Aug-2017  hkenken branches: 1.6.2;
Use armv7_generic_[dma|bs]_tag.
 1.5 25-Jun-2017  maxv memory leak, found by Mootja
 1.4 21-Dec-2015  hkenken Rewritten to take advantage of genfb(4).
 1.3 07-Nov-2014  hkenken branches: 1.3.2;
- Use __SHIFTIN macro
- fix CM_DISP_GEN_DI1_COUNTER_RELEASE
 1.2 06-May-2014  hkenken Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Support i.MX51's LCD framebuffer on Netwalker.
from Kenichi Hashimoto.
 1.1.16.1 10-Aug-2014  tls Rebase.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 03-Dec-2017  jdolecek update from HEAD
 1.1.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.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.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ipuv3.c was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ipuv3.c was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.9.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.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 07-Nov-2014  hkenken - Use __SHIFTIN macro
- fix CM_DISP_GEN_DI1_COUNTER_RELEASE
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6;
Support i.MX51's LCD framebuffer on Netwalker.
from Kenichi Hashimoto.
 1.1.6.1 03-Dec-2017  jdolecek update from HEAD
 1.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ipuv3reg.h was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ipuv3reg.h was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.3 21-Dec-2015  hkenken Rewritten to take advantage of genfb(4).
 1.2 06-May-2014  hkenken branches: 1.2.4;
Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1 17-Apr-2012  bsh branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.16;
Support i.MX51's LCD framebuffer on Netwalker.
from Kenichi Hashimoto.
 1.1.16.1 10-Aug-2014  tls Rebase.
 1.1.8.1 18-May-2014  rmind sync with head
 1.1.6.2 03-Dec-2017  jdolecek update from HEAD
 1.1.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.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.1.4.2 23-May-2012  yamt sync with head.
 1.1.4.1 17-Apr-2012  yamt file imx51_ipuv3var.h was added on branch yamt-pagecache on 2012-05-23 10:07:41 +0000
 1.1.2.2 29-Apr-2012  mrg sync to latest -current.
 1.1.2.1 17-Apr-2012  mrg file imx51_ipuv3var.h was added on branch jmcneill-usbmp on 2012-04-29 23:04:38 +0000
 1.2.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2 20-May-2020  hkenken Use kernel API of PWM subsystems for i.MX PWM driver.
 1.1 06-May-2014  hkenken branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 06-May-2014  tls file imx51_pwm.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 06-May-2014  tls file imx51_pwm.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.1.4.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.1.4.1 06-May-2014  yamt file imx51_pwm.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 06-May-2014  rmind file imx51_pwm.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3 27-Sep-2019  hkenken Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI
 1.2 19-Aug-2019  hkenken Add support SPI driver for i.MX6.
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imx51_spi.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imx51_spi.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imx51_spi.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.9 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.8 12-Feb-2022  riastradh sys: Fix various abuse of struct device internals.

Will help to make struct device opaque later.
 1.7 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.6 10-Mar-2014  skrll branches: 1.6.2;
Assume reads from hardware do something even if the result isn't required.

Hi htodd@!
 1.5 10-Mar-2014  htodd Delete unused variables for new gcc.
 1.4 28-Jul-2011  uebayasi branches: 1.4.2; 1.4.12; 1.4.16;
machine/bus.h -> sys/bus.h
 1.3 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.2 20-Dec-2010  matt branches: 1.2.6;
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.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_tzic.c was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 20-Dec-2010  rmind file imx51_tzic.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.4.16.1 18-May-2014  rmind sync with head
 1.4.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.2 27-Feb-2014  hkenken fix typo.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.12; 1.1.22; 1.1.26;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.26.1 18-May-2014  rmind sync with head
 1.1.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.12.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.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imx51_tzicreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_tzicreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.4 08-Sep-2017  hkenken - Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.3 25-Jul-2014  hkenken Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.2 27-Nov-2010  bsh branches: 1.2.6; 1.2.20; 1.2.34;
use device_t correctly for imxuart.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
UART driver for i.MX31 and 51.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51_uart.c was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.34.1 10-Aug-2014  tls Rebase.
 1.2.20.2 03-Dec-2017  jdolecek update from HEAD
 1.2.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 27-Nov-2010  rmind file imx51_uart.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 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 24-Jul-2019  hkenken branches: 1.5.12;
i.MX USB host code re-arrangement.
 1.4 17-Mar-2018  ryo branches: 1.4.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.3 17-Aug-2017  hkenken branches: 1.3.2;
Use armv7_generic_[dma|bs]_tag.
 1.2 25-Jul-2014  hkenken branches: 1.2.4;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1 30-Nov-2010  bsh branches: 1.1.6; 1.1.20; 1.1.34;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.34.1 10-Aug-2014  tls Rebase.
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imx51_usb.c was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.2.4.1 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.12.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.5.12.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.5.12.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.5.12.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.5.12.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.5.12.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10;
add Watchdog Timer support for i.MX51.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imx51_wdog.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imx51_wdog.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imx51_wdog.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.8 19-Aug-2019  hkenken Add support SPI driver for i.MX6.
 1.7 07-May-2015  hkenken branches: 1.7.18;
fixed register size
 1.6 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.5 25-Jul-2014  hkenken branches: 1.5.4;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.4 15-Apr-2012  bsh branches: 1.4.2; 1.4.12;
add base addresses for i.MX51 IPU registers.
from Kinichi Hashimoto.
 1.3 15-Apr-2012  bsh add HVE bit definition in iomux PAD_CTL register.
 1.2 30-Nov-2010  bsh branches: 1.2.6; 1.2.10; 1.2.14;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51reg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.14.1 29-Apr-2012  mrg sync to latest -current.
 1.2.10.1 17-Apr-2012  yamt sync with head
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file imx51reg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.4.12.1 10-Aug-2014  tls Rebase.
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.2 06-Jun-2015  skrll Sync with HEAD
 1.5.4.1 06-Apr-2015  skrll Sync with HEAD
 1.7.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.6 17-Mar-2018  ryo branches: 1.6.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.5 17-Aug-2017  hkenken branches: 1.5.2;
Use armv7_generic_[dma|bs]_tag.
 1.4 21-Dec-2015  hkenken Rewritten to take advantage of genfb(4).
 1.3 07-May-2015  hkenken use armv7_generic_space
 1.2 30-Nov-2010  bsh branches: 1.2.6; 1.2.20; 1.2.38;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx51var.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.38.3 28-Aug-2017  skrll Sync with HEAD
 1.2.38.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.38.1 06-Jun-2015  skrll Sync with HEAD
 1.2.20.1 03-Dec-2017  jdolecek update from HEAD
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file imx51var.h was added on branch rmind-uvmplock on 2011-03-05 20:49:34 +0000
 1.5.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.6.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.10 22-Jul-2019  hkenken branches: 1.10.10;
Change register assignments.
 1.9 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.8 20-Jun-2018  hkenken branches: 1.8.2;
Fix typo.
 1.7 23-May-2018  hkenken Modified CCM register defines.
 1.6 09-Nov-2017  hkenken branches: 1.6.2; 1.6.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.5 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.4 24-Nov-2016  hkenken Modified imx6_pll_power() arguments.
 1.3 25-Feb-2016  ryo branches: 1.3.2;
fix always false comparison.

pointed out by joerg@
 1.2 06-Oct-2014  ryo branches: 1.2.2;
* resolve arm root clock from CCM to attach a9tmr
* don't match/attach imx6_ahcisata on iMX6 Solo/SoloLite/DualLite
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2.2.3 28-Aug-2017  skrll Sync with HEAD
 1.2.2.2 05-Dec-2016  skrll Sync with HEAD
 1.2.2.1 19-Mar-2016  skrll Sync with HEAD
 1.3.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 09-Nov-2017  jdolecek file imx6_ahcisata.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.8.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_ahcisatareg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.5 17-Mar-2018  ryo branches: 1.5.14;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.4 09-Nov-2017  hkenken branches: 1.4.2; 1.4.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.3 17-Aug-2017  hkenken Use armv7_generic_[dma|bs]_tag.
 1.2 31-Dec-2015  ryo use armv7_generic_space
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 19-Mar-2016  skrll Sync with HEAD
 1.4.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 09-Nov-2017  jdolecek file imx6_axi.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.5.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.17 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.16 29-Sep-2020  jmcneill branches: 1.16.2;
Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.15 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.14 27-Jul-2019  skrll branches: 1.14.4;
Fix builds properly
 1.13 24-Jul-2019  hkenken Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.12 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.11 15-Aug-2018  skrll sort #include "opt_..." entries
 1.10 20-Jun-2018  hkenken branches: 1.10.2;
Rename a9tmr to arma9tmr.
 1.9 09-Nov-2017  hkenken branches: 1.9.2; 1.9.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.8 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.7 24-Nov-2016  hkenken Move to common function.
sdhc_set_gpio_cd() -> imx6_set_gpio()
 1.6 20-Oct-2016  skrll Fix regisers typo
 1.5 31-Dec-2015  ryo branches: 1.5.2;
use armv7_generic_space
 1.4 01-Jun-2015  ryo Limit the maximum size of memory to 3840Mbyte for 4G memory board (NITROGEN6MAX)
constrained by memory layout of i.MX6 SoC.
 1.3 09-Jan-2015  ryo - add some clock source about IPU
- fix a9tmr frequency when changing clock of machdep.imx6.frequency.arm
 1.2 06-Oct-2014  ryo branches: 1.2.2;
* resolve arm root clock from CCM to attach a9tmr
* don't match/attach imx6_ahcisata on iMX6 Solo/SoloLite/DualLite
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2.2.5 28-Aug-2017  skrll Sync with HEAD
 1.2.2.4 05-Dec-2016  skrll Sync with HEAD
 1.2.2.3 19-Mar-2016  skrll Sync with HEAD
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 06-Apr-2015  skrll Sync with HEAD
 1.5.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.9.4.3 20-Oct-2018  pgoyette Sync with head
 1.9.4.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.9.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.9.2.2 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 09-Nov-2017  jdolecek file imx6_board.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.10.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.14.4.1 17-Jan-2020  ad Sync with head.
 1.16.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.20 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.19 19-Jun-2020  skrll branches: 1.19.2;
Spell GENERIC correctly. NFCI.
 1.18 08-Jun-2020  hkenken Fix wrong divider setting.
 1.17 05-Jun-2020  hkenken Fix indent.
 1.16 05-Jun-2020  hkenken Fix KASSERT
 1.15 12-Nov-2019  hkenken Add imxccm_clk_set_rate_div().

+ Fixed BUG in imxccm_clk_get_rate_div().
 1.14 02-Sep-2019  hkenken Add support for imx6qp-pcie.

+ Add vpcie-supply support
+ Add ext_osc support

Tested on SABRESD i.MX 6QP.
 1.13 30-Jul-2019  hkenken Fix overflow to calculate frequencies.
 1.12 26-Jul-2019  skrll Fix builds
 1.11 24-Jul-2019  hkenken Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.10 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.9 20-Jun-2018  hkenken branches: 1.9.2;
Modified CCM register defines.
 1.8 23-May-2018  hkenken Modified CCM register defines.
 1.7 09-Nov-2017  hkenken branches: 1.7.2; 1.7.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.6 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.5 24-Nov-2016  hkenken Modified imx6_pll_power() arguments.
 1.4 09-Jan-2015  ryo branches: 1.4.2;
- add some clock source about IPU
- fix a9tmr frequency when changing clock of machdep.imx6.frequency.arm
 1.3 07-Oct-2014  ryo branches: 1.3.2;
add support imx6 I2C Controller
 1.2 06-Oct-2014  ryo * resolve arm root clock from CCM to attach a9tmr
* don't match/attach imx6_ahcisata on iMX6 Solo/SoloLite/DualLite
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.3.2.3 28-Aug-2017  skrll Sync with HEAD
 1.3.2.2 05-Dec-2016  skrll Sync with HEAD
 1.3.2.1 06-Apr-2015  skrll Sync with HEAD
 1.4.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 09-Nov-2017  jdolecek file imx6_ccm.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.9.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.12 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.11 24-Jul-2019  hkenken branches: 1.11.10;
Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.10 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.9 16-Sep-2018  skrll interrupt has two 'r's

fix another typo while I'm here (flsah)
 1.8 20-Jun-2018  hkenken branches: 1.8.2;
Modified CCM register defines.
 1.7 23-May-2018  hkenken Modified CCM register defines.
 1.6 09-Nov-2017  hkenken branches: 1.6.2; 1.6.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.5 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.4 24-Nov-2016  hkenken Modified imx6_pll_power() arguments.
 1.3 09-Jan-2015  ryo branches: 1.3.2;
- add some clock source about IPU
- fix a9tmr frequency when changing clock of machdep.imx6.frequency.arm
 1.2 06-Oct-2014  ryo branches: 1.2.2;
* resolve arm root clock from CCM to attach a9tmr
* don't match/attach imx6_ahcisata on iMX6 Solo/SoloLite/DualLite
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2.2.3 28-Aug-2017  skrll Sync with HEAD
 1.2.2.2 05-Dec-2016  skrll Sync with HEAD
 1.2.2.1 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.4.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.6.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 09-Nov-2017  jdolecek file imx6_ccmreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.8.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.9 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.8 19-Jun-2020  skrll branches: 1.8.2;
Spell GENERIC correctly. NFCI.
 1.7 24-Jul-2019  hkenken Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.6 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.5 09-Nov-2017  hkenken branches: 1.5.2; 1.5.6;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.4 24-Nov-2016  hkenken Modified imx6_pll_power() arguments.
 1.3 09-Jan-2015  ryo branches: 1.3.2;
- add some clock source about IPU
- fix a9tmr frequency when changing clock of machdep.imx6.frequency.arm
 1.2 07-Oct-2014  ryo branches: 1.2.2;
add support imx6 I2C Controller
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2.2.2 05-Dec-2016  skrll Sync with HEAD
 1.2.2.1 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 09-Nov-2017  jdolecek file imx6_ccmvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.8.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 24-Jul-2019  hkenken branches: 1.1.10; 1.1.12;
Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.1.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 24-Jul-2019  martin file imx6_clk.c was added on branch phil-wifi on 2020-04-13 08:03:35 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_clock.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 24-Jul-2019  hkenken branches: 1.1.10; 1.1.12;
Add support for device tree.

+ CCM (clk)
+ COM (uart)
+ GPIO
+ IOMUX (pin control)
+ PCIe
+ SDHC
+ USB Host
+ USB phy
 1.1.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 24-Jul-2019  martin file imx6_gpcreg.h was added on branch phil-wifi on 2020-04-13 08:03:35 +0000
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 24-Jul-2019  hkenken branches: 1.3.10;
Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.2 09-Jun-2017  ryo branches: 1.2.4; 1.2.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.1 28-Aug-2017  skrll Sync with HEAD
 1.2.8.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 09-Jun-2017  jdolecek file imx6_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 20-Jun-2019  hkenken branches: 1.3.10;
Add support for clk subsystem in imx6 CCM driver.
 1.2 27-Mar-2015  hkenken branches: 1.2.16; 1.2.20;
Rewritten to take advantage of motoi2c code.
 1.1 07-Oct-2014  ryo branches: 1.1.2;
add support imx6 I2C Controller
 1.1.2.1 06-Apr-2015  skrll Sync with HEAD
 1.2.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 27-Mar-2015  jdolecek file imx6_i2c.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.5 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.4 09-Jun-2017  ryo branches: 1.4.18;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.3 01-Jun-2015  ryo add #define __HAVE_PIC_PENDING_INTRS because imxgpio use pic_mark_pending()
 1.2 25-Sep-2014  ryo branches: 1.2.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4;
Some initial iMX.6 support
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file imx6_intr.h was added on branch yamt-pagecache on 2012-10-30 17:19:03 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 06-Jun-2015  skrll Sync with HEAD
 1.4.18.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_iomux.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.7 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.6 02-Sep-2019  hkenken branches: 1.6.8;
Add support for imx6qp-pcie.

+ Add vpcie-supply support
+ Add ext_osc support

Tested on SABRESD i.MX 6QP.
 1.5 22-Jul-2019  hkenken Change register assignments.
 1.4 09-Jun-2017  ryo branches: 1.4.4; 1.4.8;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.3 31-Dec-2015  ryo add support iMX6 uSDHC
- some UHS-I/SDR104 card are not stable
- eMMC doesn't work yet
 1.2 30-Jul-2015  ryo - setup iomux before attach console
- define EVBARM_BOARDTYPE in each config file
- add iomux settings for UART1
- add some iomux definitions
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 22-Sep-2015  skrll Sync with HEAD
 1.4.8.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.2 03-Dec-2017  jdolecek update from HEAD
 1.4.4.1 09-Jun-2017  jdolecek file imx6_iomuxreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_mmdcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_ocotp.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_ocotpreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.34;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_ocotpvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.18 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.17 07-Jul-2020  thorpej branches: 1.17.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.16 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.15 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.14 16-Oct-2019  hkenken branches: 1.14.2;
Fixed bug when using PCIe external clock.
 1.13 27-Jul-2019  skrll Fix builds properly
 1.12 27-Jul-2019  skrll sort some #includes
 1.11 26-Jul-2019  skrll Fix builds
 1.10 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.9 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.8 01-Mar-2019  msaitoh - Almost all ppbreg.h's definitions are also in pcireg.h. Remove duplicated
definitions from ppbreg.h and move some definitions from ppbreg.h to
pcireg.h.
- Change fast back-to-back "capable" to "enable" in pci_subr.c.
- Print Primary Discard Timer, Secondary Discard Timer, Discard Timer Status
and Discard Timer SERR# Enable bit in pci_subr.c.
- PCI_BRIDGE_PREFETCHBASE32_REG and PCI_BRIDGE_PREFETCHLIMIT32_REG are
"upper" 32bit registers, rename to *UP32_REG to avoid confusion.
- Use macro.
 1.7 16-Dec-2018  skrll Fix build
 1.6 23-May-2018  hkenken branches: 1.6.2;
Modified CCM register defines.
 1.5 09-Nov-2017  hkenken branches: 1.5.2; 1.5.4;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.4 24-Oct-2017  hkenken Added link up status check for valid pci device confirm.
 1.3 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.2 25-Nov-2016  hkenken branches: 1.2.2; 1.2.4;
* Fix compile error.
* typo
 1.1 24-Nov-2016  hkenken Add support imx6 PCIe controller.
 1.2.4.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.2.4.1 25-Nov-2016  pgoyette file imx6_pcie.c was added on branch pgoyette-localcount on 2017-01-07 08:56:11 +0000
 1.2.2.3 28-Aug-2017  skrll Sync with HEAD
 1.2.2.2 05-Dec-2016  skrll Sync with HEAD
 1.2.2.1 25-Nov-2016  skrll file imx6_pcie.c was added on branch nick-nhusb on 2016-12-05 10:54:50 +0000
 1.5.4.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.5.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 09-Nov-2017  jdolecek file imx6_pcie.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.2.1 10-Jun-2019  christos Sync with HEAD
 1.14.2.1 17-Jan-2020  ad Sync with head.
 1.17.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 24-Nov-2016  hkenken branches: 1.1.2; 1.1.4; 1.1.18; 1.1.34;
Add support imx6 PCIe controller.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 24-Nov-2016  jdolecek file imx6_pciereg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.4.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.4.1 24-Nov-2016  pgoyette file imx6_pciereg.h was added on branch pgoyette-localcount on 2017-01-07 08:56:11 +0000
 1.1.2.2 05-Dec-2016  skrll Sync with HEAD
 1.1.2.1 24-Nov-2016  skrll file imx6_pciereg.h was added on branch nick-nhusb on 2016-12-05 10:54:50 +0000
 1.11 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.10 24-Jul-2019  hkenken branches: 1.10.10;
Modified imx6 Clock Controller Module (CCM).

+ Add imx6_get_clock_by_id().
 1.9 24-Jul-2019  hkenken i.MX USB host code re-arrangement.
 1.8 20-Jun-2018  hkenken branches: 1.8.2;
Modified CCM register defines.
 1.7 09-Nov-2017  hkenken branches: 1.7.2;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.6 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.5 17-May-2016  ryo Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.4 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.3 06-Oct-2014  ryo branches: 1.3.2;
add support imx6 Secure Non-Volatile Storage (SNVS) real-time clock
 1.2 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.1 01-Sep-2012  matt branches: 1.1.2; 1.1.4;
Some initial iMX.6 support
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Sep-2012  yamt file imx6_reg.h was added on branch yamt-pagecache on 2012-10-30 17:19:03 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.3.2.3 28-Aug-2017  skrll Sync with HEAD
 1.3.2.2 29-May-2016  skrll Sync with HEAD
 1.3.2.1 06-Apr-2015  skrll Sync with HEAD
 1.7.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.8.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 17-May-2016  ryo branches: 1.2.16; 1.2.32;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1 06-Oct-2014  ryo branches: 1.1.2;
add support imx6 Secure Non-Volatile Storage (SNVS) real-time clock
 1.1.2.1 29-May-2016  skrll Sync with HEAD
 1.2.32.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 17-May-2016  jdolecek file imx6_snvs.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 06-Oct-2014  ryo branches: 1.1.18; 1.1.34;
add support imx6 Secure Non-Volatile Storage (SNVS) real-time clock
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 06-Oct-2014  jdolecek file imx6_snvsreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 18-Oct-2018  skrll branches: 1.2.12;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.20; 1.1.22;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.20.1 20-Oct-2018  pgoyette Sync with head
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_srcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 08-Sep-2017  hkenken branches: 1.3.2; 1.3.18;
- Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.2 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.1 28-Aug-2017  skrll Sync with HEAD
 1.3.18.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 08-Sep-2017  jdolecek file imx6_uart.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.7 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.6 24-Jul-2019  hkenken branches: 1.6.10;
i.MX USB host code re-arrangement.
 1.5 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.4 23-May-2018  hkenken branches: 1.4.2;
Modified CCM register defines.
 1.3 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 17-Aug-2017  hkenken branches: 1.2.2; 1.2.4;
Use armv7_generic_[dma|bs]_tag.
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.1 28-Aug-2017  skrll Sync with HEAD
 1.2.4.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 17-Aug-2017  jdolecek file imx6_usb.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.4.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 24-Nov-2019  skrll branches: 1.3.8;
Use PRIxBUSADDR
 1.2 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.1 09-Nov-2017  hkenken branches: 1.1.2; 1.1.6;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.1.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 09-Nov-2017  jdolecek file imx6_usbphy.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 09-Nov-2017  hkenken branches: 1.1.2; 1.1.18;
- Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
Add imx6_ccm_analog_read/write() functions.
 1.1.18.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 09-Nov-2017  jdolecek file imx6_usbphyreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 24-Jul-2019  hkenken branches: 1.2.10;
i.MX USB host code re-arrangement.
 1.1 25-Sep-2014  ryo branches: 1.1.18; 1.1.22;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.22.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 25-Sep-2014  jdolecek file imx6_usbreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.10 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.9 15-Jan-2020  jmcneill branches: 1.9.6;
Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.8 24-Jul-2019  hkenken branches: 1.8.4;
Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.7 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.6 23-May-2018  hkenken branches: 1.6.2;
Modified CCM register defines.
 1.5 26-Oct-2017  ryo branches: 1.5.2; 1.5.4;
fix typo
 1.4 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.3 24-Nov-2016  hkenken Move to common function.
sdhc_set_gpio_cd() -> imx6_set_gpio()
 1.2 31-Dec-2015  ryo branches: 1.2.2;
add support iMX6 uSDHC
- some UHS-I/SDR104 card are not stable
- eMMC doesn't work yet
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 05-Dec-2016  skrll Sync with HEAD
 1.1.2.1 19-Mar-2016  skrll Sync with HEAD
 1.2.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 26-Oct-2017  jdolecek file imx6_usdhc.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.4.1 17-Jan-2020  ad Sync with head.
 1.9.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 09-Jun-2017  ryo branches: 1.2.4; 1.2.20;
add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.1 25-Sep-2014  ryo branches: 1.1.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.1.2.1 28-Aug-2017  skrll Sync with HEAD
 1.2.20.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 09-Jun-2017  jdolecek file imx6_wdog.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.10 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.9 18-Oct-2018  skrll branches: 1.9.12;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.8 17-Mar-2018  ryo branches: 1.8.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.7 17-Aug-2017  hkenken branches: 1.7.2; 1.7.4;
Use armv7_generic_[dma|bs]_tag.
 1.6 09-Jun-2017  ryo add support for i.MX6UltraLite, and
ConnectCore for iMX6UL Starter Board.
 1.5 24-Nov-2016  hkenken Move to common function.
sdhc_set_gpio_cd() -> imx6_set_gpio()
 1.4 31-Dec-2015  ryo branches: 1.4.2;
use armv7_generic_space
 1.3 30-Jul-2015  ryo - setup iomux before attach console
- define EVBARM_BOARDTYPE in each config file
- add iomux settings for UART1
- add some iomux definitions
 1.2 07-Oct-2014  ryo branches: 1.2.2;
forgot to commit about changes of ccm
 1.1 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 05-Dec-2016  skrll Sync with HEAD
 1.2.2.2 19-Mar-2016  skrll Sync with HEAD
 1.2.2.1 22-Sep-2015  skrll Sync with HEAD
 1.4.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7.4.2 20-Oct-2018  pgoyette Sync with head
 1.7.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 17-Aug-2017  jdolecek file imx6var.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.8.2.1 10-Jun-2019  christos Sync with HEAD
 1.9.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 17-Mar-2018  ryo branches: 1.3.14;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 17-Aug-2017  hkenken branches: 1.2.2; 1.2.4;
Use armv7_generic_[dma|bs]_tag.
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_axi.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 17-Aug-2017  jdolecek file imx7_axi.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 17-Aug-2017  hkenken branches: 1.3.2; 1.3.18;
Use armv7_generic_[dma|bs]_tag.
 1.2 20-Oct-2016  skrll Fix regisers typo
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_board.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.3.18.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 17-Aug-2017  jdolecek file imx7_board.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 20-Oct-2016  ryo branches: 1.2.14; 1.2.30;
make "machdep.imx7.frequency.arm_a7" and "machdep.imx7.frequency.arm_m4" sysctl node changeable.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ccm.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.30.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.14.2 03-Dec-2017  jdolecek update from HEAD
 1.2.14.1 20-Oct-2016  jdolecek file imx7_ccm.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 26-Dec-2020  skrll G/C
 1.2 17-Oct-2016  ryo branches: 1.2.14; 1.2.30;
add more register definitions.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ccmreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.30.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.14.2 03-Dec-2017  jdolecek update from HEAD
 1.2.14.1 17-Oct-2016  jdolecek file imx7_ccmreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2 26-Dec-2020  skrll G/C
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_ccmvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ccmvar.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.3 26-Dec-2020  skrll G/C
 1.2 17-Oct-2016  ryo branches: 1.2.14; 1.2.30;
add more register definitions.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_gpcreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.30.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.14.2 03-Dec-2017  jdolecek update from HEAD
 1.2.14.1 17-Oct-2016  jdolecek file imx7_gpcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 24-Jul-2019  hkenken branches: 1.2.10;
Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.22;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.22.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_gpio.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_intr.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_intr.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_iomux.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_iomux.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 26-Dec-2020  skrll G/C
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_iomuxreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_iomuxreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_ocotp.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ocotp.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 26-Dec-2020  skrll G/C
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_ocotpreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ocotpreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_ocotpvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_ocotpvar.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-Oct-2016  ryo branches: 1.1.2; 1.1.4; 1.1.18; 1.1.34;
add more register definitions.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-Oct-2016  jdolecek file imx7_rdcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.4.2 05-Dec-2016  skrll Sync with HEAD
 1.1.4.1 17-Oct-2016  skrll file imx7_rdcreg.h was added on branch nick-nhusb on 2016-12-05 10:54:50 +0000
 1.1.2.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.1 17-Oct-2016  pgoyette file imx7_rdcreg.h was added on branch pgoyette-localcount on 2016-11-04 14:48:58 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_snvs.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_snvs.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.3 26-Dec-2020  skrll G/C
 1.2 17-Oct-2016  ryo branches: 1.2.14; 1.2.30;
add more register definitions.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.4;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.3 05-Dec-2016  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_srcreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.30.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.14.2 03-Dec-2017  jdolecek update from HEAD
 1.2.14.1 17-Oct-2016  jdolecek file imx7_srcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2 08-Sep-2017  hkenken branches: 1.2.2; 1.2.18;
- Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_uart.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.18.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 08-Sep-2017  jdolecek file imx7_uart.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.6 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.5 14-May-2020  msaitoh branches: 1.5.2;
Remove extra semicolon.
 1.4 24-Jul-2019  hkenken i.MX USB host code re-arrangement.
 1.3 17-Mar-2018  ryo branches: 1.3.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 17-Aug-2017  hkenken branches: 1.2.2; 1.2.4;
Use armv7_generic_[dma|bs]_tag.
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_usb.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 17-Aug-2017  jdolecek file imx7_usb.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3 26-Dec-2020  skrll G/C
 1.2 24-Jul-2019  hkenken branches: 1.2.10;
i.MX USB host code re-arrangement.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.22;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.22.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_usbreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_usbreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.5 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.4 15-Jan-2020  jmcneill branches: 1.4.6;
Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.3 24-Jul-2019  hkenken branches: 1.3.4;
Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.2 26-Oct-2017  ryo branches: 1.2.2; 1.2.6;
fix typo
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_usdhc.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 26-Oct-2017  jdolecek file imx7_usdhc.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.4.1 17-Jan-2020  ad Sync with head.
 1.4.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7_wdog.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7_wdog.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18; 1.1.34;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.34.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imx7reg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7reg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.4 26-Dec-2020  skrll G/C
 1.3 17-Mar-2018  ryo branches: 1.3.14;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 17-Aug-2017  hkenken branches: 1.2.2; 1.2.4;
Use armv7_generic_[dma|bs]_tag.
 1.1 17-May-2016  ryo branches: 1.1.2;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imx7var.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 17-Aug-2017  jdolecek file imx7var.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.3.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.4 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.3 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imx_dma.c was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imx_dma.c was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.1 21-Dec-2015  hkenken branches: 1.1.2; 1.1.18;
Rewritten to take advantage of genfb(4).
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Dec-2015  jdolecek file imx_genfb.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Dec-2015  skrll file imx_genfb.c was added on branch nick-nhusb on 2015-12-27 12:09:30 +0000
 1.10 02-Oct-2025  skrll Trailing whitespace.
 1.9 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 27-Oct-2012  chs branches: 1.6.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 26-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 30-Jun-2008  perry __FUNCTION__ -> __func__
 1.2 27-Apr-2008  matt branches: 1.2.2; 1.2.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx_pcic.c was initially added on branch matt-armv6.
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 02-Jul-2008  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.4.1 03-Jul-2008  simonb Sync with head.
 1.2.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.6.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.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 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.2 27-Apr-2008  matt branches: 1.2.34; 1.2.44;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imx_pcic.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.34.1 30-Oct-2012  yamt sync with head
 1.7 21-Apr-2023  skrll Trailing whitespace
 1.6 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.5 01-Sep-2012  matt branches: 1.5.38;
Use PMAP_NOCACHE
 1.4 01-Sep-2012  matt Use PMAP_NOCACHE, add stream methods.
 1.3 01-Jul-2011  dyoung branches: 1.3.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 13-Nov-2010  bsh branches: 1.2.2; 1.2.8;
rename imx31_bs_tag as imx_bs_tag to share it with imx51.
 1.1 13-Nov-2010  bsh rename imx31_space.c as imx_space.c
 1.2.8.2 05-Mar-2011  rmind sync with head
 1.2.8.1 13-Nov-2010  rmind file imx_space.c was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.2.2.1 13-Nov-2010  uebayasi file imx_space.c was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.5.38.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.8 24-Jul-2019  hkenken No functional change.
 1.7 25-Jul-2014  hkenken branches: 1.7.28;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.6 20-May-2012  matt branches: 1.6.2; 1.6.12;
Fix call of imxclock. Patch from PR/45359.
 1.5 17-Apr-2012  bsh driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 13-Nov-2010  bsh driver to use EPIT as system clock for i.MX31 and i.MX51,
by Hashimoto Kenichi.
 1.2 27-Apr-2008  matt branches: 1.2.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imxclock.c was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 16-Apr-2008  cliff #ifdef out microtime (is in kern_tc.c now) to allow compiling
support for timer/counters is still TBD
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.4.6.2 02-Jun-2012  mrg sync to latest -current.
 1.4.6.1 29-Apr-2012  mrg sync to latest -current.
 1.4.2.1 23-May-2012  yamt sync with head.
 1.6.12.1 10-Aug-2014  tls Rebase.
 1.6.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.28.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 17-Apr-2012  bsh driver for i.MX51 Clock Controller Module.
from Kenichi Hashimoto.

Currently used only to get peripheral clock frequencies.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.12; 1.1.16;
driver to use EPIT as system clock for i.MX31 and i.MX51,
by Hashimoto Kenichi.
 1.1.16.1 29-Apr-2012  mrg sync to latest -current.
 1.1.12.1 23-May-2012  yamt sync with head.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxclockvar.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxclockvar.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.3 01-Aug-2023  andvar fix various typos in comments.
 1.2 27-Sep-2019  hkenken Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imxcspireg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imxcspireg.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imxcspireg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.4 01-Aug-2023  andvar fix various typos in comments.
 1.3 26-Dec-2019  msaitoh s/lenght/length/
 1.2 27-Sep-2019  hkenken Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.1.36.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.36.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imxecspireg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imxecspireg.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imxecspireg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2 17-Apr-2012  bsh add bit definitions for i.MX51 EPIT
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.12; 1.1.16;
driver to use EPIT as system clock for i.MX31 and i.MX51,
by Hashimoto Kenichi.
 1.1.16.1 29-Apr-2012  mrg sync to latest -current.
 1.1.12.1 23-May-2012  yamt sync with head.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxepitreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxepitreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 15-Jun-2020  ad branches: 1.9.4;
Use sys/cpu.h so that curcpu defined in terms of curlwp->l_cpu works too.
 1.8 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.7 27-Nov-2019  hkenken branches: 1.7.2;
Remove GPIO driver attach defer.
 1.6 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.5 25-Sep-2014  ryo branches: 1.5.20;
add support i.MX6 and NITROGEN6X evaluation board
 1.4 22-Mar-2014  hkenken * GPIO interrupts of i.MX5 are divided into two groups.
add IMX_GPIO_INTR_SPLIT option
* Support GPIO both edge trigger interrupt.
 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 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 30-Nov-2010  bsh branches: 1.1.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imxgpio.c was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.12.3 03-Dec-2017  jdolecek update from HEAD
 1.2.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.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.2.2.1 30-Oct-2012  yamt sync with head
 1.3.2.1 18-May-2014  rmind sync with head
 1.5.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.1 17-Jan-2020  ad Sync with head.
 1.9.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 30-Nov-2010  bsh branches: 1.2.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
extract GPIO register definitions from imx31reg.h to share them with
i.MX51
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxgpioreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file imxgpioreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.3 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.2 24-Jul-2019  hkenken branches: 1.2.4;
Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.1 30-Nov-2010  bsh branches: 1.1.6; 1.1.62;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.62.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imxgpiovar.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.4.1 17-Jan-2020  ad Sync with head.
 1.4 22-Jul-2022  thorpej Normalize how motoi2c controllers are attached.
 1.3 30-Jul-2019  hkenken Add IIC support.
 1.2 27-Mar-2015  hkenken branches: 1.2.18;
Rewritten to take advantage of motoi2c code.
 1.1 25-Jul-2014  hkenken branches: 1.1.2; 1.1.6; 1.1.8;
Add i2c driver for i.MX.
 1.1.8.1 06-Apr-2015  skrll Sync with HEAD
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 25-Jul-2014  tls file imxi2c.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 25-Jul-2014  tls file imxi2c.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.2.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 27-Mar-2015  hkenken Rewritten to take advantage of motoi2c code.
 1.2 25-Jul-2014  hkenken branches: 1.2.4;
Add i2c driver for i.MX.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.22; 1.1.36;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.36.1 10-Aug-2014  tls Rebase.
 1.1.22.2 03-Dec-2017  jdolecek update from HEAD
 1.1.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxi2creg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxi2creg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.4.1 06-Apr-2015  skrll Sync with HEAD
 1.4 22-Jul-2022  thorpej Normalize how motoi2c controllers are attached.
 1.3 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.2 27-Mar-2015  hkenken branches: 1.2.18;
Rewritten to take advantage of motoi2c code.
 1.1 25-Jul-2014  hkenken branches: 1.1.2; 1.1.6; 1.1.8;
Add i2c driver for i.MX.
 1.1.8.1 06-Apr-2015  skrll Sync with HEAD
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 25-Jul-2014  tls file imxi2cvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 25-Jul-2014  tls file imxi2cvar.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.2.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 30-Nov-2010  bsh branches: 1.2.6;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxkppreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Nov-2010  rmind file imxkppreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.4 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.3 16-Oct-2019  hkenken branches: 1.3.8; 1.3.10;
Fixed bug when using PCIe external clock.
 1.2 02-Sep-2019  hkenken Add support for imx6qp-pcie.

+ Add vpcie-supply support
+ Add ext_osc support

Tested on SABRESD i.MX 6QP.
 1.1 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.3.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.1 16-Oct-2019  martin file imxpcie.c was added on branch phil-wifi on 2020-04-13 08:03:35 +0000
 1.4 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.3 16-Oct-2019  hkenken branches: 1.3.8;
Fixed bug when using PCIe external clock.
 1.2 02-Sep-2019  hkenken Add support for imx6qp-pcie.

+ Add vpcie-supply support
+ Add ext_osc support

Tested on SABRESD i.MX 6QP.
 1.1 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.3.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.1 16-Oct-2019  martin file imxpciereg.h was added on branch phil-wifi on 2020-04-13 08:03:35 +0000
 1.3 16-Oct-2019  hkenken branches: 1.3.8;
Fixed bug when using PCIe external clock.
 1.2 02-Sep-2019  hkenken Add support for imx6qp-pcie.

+ Add vpcie-supply support
+ Add ext_osc support

Tested on SABRESD i.MX 6QP.
 1.1 24-Jul-2019  hkenken Modified i.MX GPIO control module and PCIe module.

+ Add imxpcie.c
imx PCIe common driver
 1.3.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.1 16-Oct-2019  martin file imxpcievar.h was added on branch phil-wifi on 2020-04-13 08:03:35 +0000
 1.2 20-May-2020  hkenken Use kernel API of PWM subsystems for i.MX PWM driver.
 1.1 06-May-2014  hkenken branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 06-May-2014  tls file imxpwm.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 06-May-2014  tls file imxpwm.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.1.4.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.1.4.1 06-May-2014  yamt file imxpwm.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 06-May-2014  rmind file imxpwm.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2 20-May-2020  hkenken Use kernel API of PWM subsystems for i.MX PWM driver.
 1.1 06-May-2014  hkenken branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 06-May-2014  tls file imxpwmreg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 06-May-2014  tls file imxpwmreg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.1.4.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.1.4.1 06-May-2014  yamt file imxpwmreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 06-May-2014  rmind file imxpwmreg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.2 20-May-2020  hkenken Use kernel API of PWM subsystems for i.MX PWM driver.
 1.1 06-May-2014  hkenken branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Add support for LCD Backlight control on NetWalker.
+ use imxpwm driver (PWM control driver for i.MX)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 06-May-2014  tls file imxpwmvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 06-May-2014  tls file imxpwmvar.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.1.4.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.1.4.1 06-May-2014  yamt file imxpwmvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 06-May-2014  rmind file imxpwmvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3 07-Oct-2024  andvar s/periperal/peripheral/ in comments.
 1.2 25-Jul-2014  hkenken branches: 1.2.64;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.22; 1.1.36;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.36.1 10-Aug-2014  tls Rebase.
 1.1.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxsdmareg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxsdmareg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.2.64.1 02-Aug-2025  perseant Sync with HEAD
 1.3 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.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imxsnvs.c was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imxsnvs.c was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imxsnvsreg.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imxsnvsreg.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.1 17-May-2016  ryo branches: 1.1.2; 1.1.18;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-May-2016  jdolecek file imxsnvsvar.h was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.1.2.2 29-May-2016  skrll Sync with HEAD
 1.1.2.1 17-May-2016  skrll file imxsnvsvar.h was added on branch nick-nhusb on 2016-05-29 08:44:16 +0000
 1.15 10-Sep-2025  thorpej Garbage-collect fdtbus_attach_spibus(). spibus_attach() does everything
now.
 1.14 10-Sep-2025  thorpej Register the SPI controller with FDT in spi_attach(), not in each
driver.
 1.13 10-Sep-2025  thorpej It is not necessary to pass the phandle separately to fdtbus_spi_*(); it
can be retrieved from the device_t.
 1.12 10-Sep-2025  thorpej Don't bother registering a function that returns a SPI controller; just
register the controller directly.
 1.11 10-Sep-2025  thorpej Encapsulate what's needed to attach a SPI bus into a spibus_attach()
inline.
 1.10 17-Aug-2021  andvar fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.
 1.9 07-Aug-2021  thorpej branches: 1.9.2;
Merge thorpej-cfargs2.
 1.8 24-Apr-2021  thorpej branches: 1.8.2; 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 15-Nov-2019  hkenken branches: 1.7.10;
Keep SCLK high in the inactive state. (SPI modes 2 and 3 only)
 1.6 27-Sep-2019  hkenken Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI
 1.5 19-Aug-2019  hkenken Add support SPI driver for i.MX6.
 1.4 13-Aug-2019  tnn ensure spibus_attach_args is zero'ed
 1.3 07-Aug-2017  hkenken branches: 1.3.4;
Add support Microchip SST25VF016B.
- Fixed imxspi send and receive bugs.
 1.2 29-Mar-2014  hkenken branches: 1.2.4; 1.2.6; 1.2.10; 1.2.12;
Add optical joystick support for NetWalker.
+ OJ6SH-T25 (Sharp "Optical TOUCH CRUISER" sensor)
+ 2 Mouse buttons (GPIO)
 1.1 22-Mar-2014  hkenken Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.2.12.1 28-Aug-2017  skrll Sync with HEAD
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 29-Mar-2014  tls file imxspi.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 29-Mar-2014  yamt file imxspi.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 29-Mar-2014  rmind file imxspi.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.8.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8.2.2 19-May-2021  thorpej - As with i2c, just register the spi_controller directly.
- fdtbus_attach_spibus() is no longer anything other than a wrapper
around config_found(); just get rid of it and make its callers
look like all of the other SPI controller drivers.
 1.8.2.1 18-May-2021  thorpej Pass the controller devhandle along to the "spi" instance.
 1.9.2.2 18-Jan-2022  thorpej G/C fdtbus_register_spi_controller(); it serves no purpose in the new
universe.
 1.9.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imxspireg.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imxspireg.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imxspireg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.4 10-Sep-2025  thorpej It is not necessary to pass the phandle separately to fdtbus_spi_*(); it
can be retrieved from the device_t.
 1.3 27-Sep-2019  hkenken Add i.MX SPI device type.

IMX31_CSPI
IMX35_CSPI
IMX51_ECSPI
 1.2 19-Aug-2019  hkenken Add support SPI driver for i.MX6.
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Add SPI driver.
i.MX51 have two eCSPI, and one CSPI.
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imxspivar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imxspivar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imxspivar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxssireg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxssireg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.30 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.29 20-May-2022  skrll Add the character read in as part of imxuart_common_putc into the
readahead buffer

port-arm/45354: no character is put in the read-ahead buffer in a console code of arch/arm/imx/imxuart.c
 1.28 20-May-2022  skrll Use a macro. Part of

port-arm/45354: no character is put in the read-ahead buffer in a console code of arch/arm/imx/imxuart.c
 1.27 08-Mar-2021  mlelstv always re-read status register in the loop.
 1.26 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.25 20-May-2020  hkenken branches: 1.25.2;
i.MX support merged into GENERIC kernel.
 1.24 15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.23 12-Jan-2020  jmcneill Support imxuart_freq=0 (use existing settings)
 1.22 10-Nov-2019  chs branches: 1.22.2;
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.21 20-Jun-2018  hkenken branches: 1.21.2;
Move intr_establish() before imxuart_attach_subr().
 1.20 08-Sep-2017  hkenken branches: 1.20.2;
- Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.19 30-Jul-2015  ryo fix to compile unless defined IMXUARTCONSOLE
 1.18 29-Jul-2015  ryo initialize uart register when it is not a console.
 1.17 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.16 15-Nov-2014  christos branches: 1.16.2;
centralize the call unit / dialout macros
 1.15 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.14 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.13 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.12 25-Jul-2014  hkenken Delete unused variables for new gcc.
 1.11 16-Mar-2014  dholland branches: 1.11.2;
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.10 01-May-2013  mlelstv branches: 1.10.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.9 02-Feb-2012  tls branches: 1.9.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.8 24-Apr-2011  rmind branches: 1.8.4; 1.8.8;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.7 14-Jan-2011  rmind branches: 1.7.2;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.6 27-Nov-2010  bsh use device_t correctly for imxuart.
 1.5 13-Nov-2010  bsh UART driver for i.MX31 and 51.
 1.4 13-Nov-2010  bsh rename imx31_bs_tag as imx_bs_tag to share it with imx51.
 1.3 30-Jun-2008  perry branches: 1.3.18;
__FUNCTION__ -> __func__
 1.2 27-Apr-2008  matt branches: 1.2.2; 1.2.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imxuart.c was initially added on branch matt-armv6.
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 02-Jul-2008  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 12-Sep-2007  matt Minor cleanup. Actually match addr in match routine.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.4.1 03-Jul-2008  simonb Sync with head.
 1.2.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.18.2 31-May-2011  rmind sync with head
 1.3.18.1 05-Mar-2011  rmind sync with head
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.8.1 18-Feb-2012  mrg merge to -current.
 1.8.4.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.4.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 23-Jun-2013  tls resync from head
 1.10.4.1 18-May-2014  rmind sync with head
 1.11.2.2 10-Aug-2014  tls Rebase.
 1.11.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.16.2.2 22-Sep-2015  skrll Sync with HEAD
 1.16.2.1 06-Jun-2015  skrll Sync with HEAD
 1.20.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.21.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.22.2.1 17-Jan-2020  ad Sync with head.
 1.25.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.25.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.5 01-Sep-2012  matt Add __BITS to asm.h (remove from imxuartreg.h)
Add L1_S_AP_KR to genassym.h
Use L1_S_AP_* in omap_start.S and don't include pmap.h
 1.4 13-Nov-2010  bsh branches: 1.4.8;
UART driver for i.MX31 and 51.
 1.3 17-Sep-2009  bsh branches: 1.3.4;
fix a typo of register bit name.
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imxuartreg.h was initially added on branch matt-armv6.
 1.1.24.2 11-Mar-2010  yamt sync with head
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.3.4.1 05-Mar-2011  rmind sync with head
 1.4.8.1 30-Oct-2012  yamt sync with head
 1.6 08-Sep-2017  hkenken - Move CFATTACH_DECL_NEW() from common uart driver.
- Rename : imxuart_cons_attach() -> imxuart_cnattach()
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 27-Nov-2010  bsh branches: 1.4.8; 1.4.18;
use device_t correctly for imxuart.
 1.3 13-Nov-2010  bsh UART driver for i.MX31 and 51.
 1.2 27-Apr-2008  matt branches: 1.2.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 11-Sep-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file imxuartvar.h was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1 11-Sep-2007  matt Initial support for Freescale i.MX31 (ARM1136).
 1.2.22.1 05-Mar-2011  rmind sync with head
 1.4.18.2 03-Dec-2017  jdolecek update from HEAD
 1.4.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.8.1 30-Oct-2012  yamt sync with head
 1.19 04-May-2023  bouyer The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.
Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.
In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.18 07-Aug-2021  thorpej branches: 1.18.6;
Merge thorpej-cfargs2.
 1.17 24-Apr-2021  thorpej branches: 1.17.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.16 23-Dec-2020  skrll branches: 1.16.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.15 26-Jul-2019  skrll branches: 1.15.10;
Fix builds
 1.14 24-Jul-2019  hkenken i.MX USB host code re-arrangement.
 1.13 09-Apr-2018  jakllsch branches: 1.13.2;
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.12 17-May-2016  ryo branches: 1.12.16;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.11 23-Apr-2016  skrll 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.10 10-Sep-2015  skrll Trailing whitespace.
 1.9 10-Sep-2015  hkenken USBMODE register's initialization should be done in sc_vendor_init() after sending EHCI_CMD_HCRESET command.
 1.8 04-Sep-2015  skrll Correct a register name
 1.7 25-Sep-2014  ryo branches: 1.7.2;
add support i.MX6 and NITROGEN6X evaluation board
 1.6 25-Jul-2014  hkenken branches: 1.6.2; 1.6.6;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.5 07-Oct-2013  matt branches: 1.5.2;
iMX233/OLinuXino changes from Petri Laskso.
See http://mail-index.netbsd.org/port-arm/2013/10/07/msg002042.html
 1.4 23-Nov-2012  matt branches: 1.4.2;
Enable ETTF.
 1.3 12-Nov-2012  skrll C99 types
 1.2 20-Jul-2012  matt branches: 1.2.2;
EHCI_USBINTR is 4 bytes long so use EOWRITE4
 1.1 30-Nov-2010  bsh branches: 1.1.6; 1.1.10;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.10.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.1.10.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.10.1 30-Oct-2012  yamt sync with head
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imxusb.c was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 25-Feb-2013  tls resync with head
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.1 18-May-2014  rmind sync with head
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.6.6.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.6.2.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.7.2.5 29-May-2016  skrll Sync with HEAD
 1.7.2.4 22-Sep-2015  skrll Sync with HEAD
 1.7.2.3 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.7.2.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.7.2.1 03-Dec-2014  skrll Trailing whitespace.
 1.12.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.13.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.16.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.17.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.18.6.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.6 08-Feb-2024  andvar s/transeiver/transceiver/ in comments.
 1.5 17-May-2016  ryo Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.4 04-Sep-2015  skrll Add some more USBMODE defines
 1.3 04-Sep-2015  skrll Correct a register name
 1.2 25-Jul-2014  hkenken branches: 1.2.2; 1.2.4; 1.2.8;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1 30-Nov-2010  bsh branches: 1.1.6; 1.1.20; 1.1.34;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.34.1 10-Aug-2014  tls Rebase.
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imxusbreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.8.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.2.4.2 29-May-2016  skrll Sync with HEAD
 1.2.4.1 22-Sep-2015  skrll Sync with HEAD
 1.2.2.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.7 04-May-2023  bouyer The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.
Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.
In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.6 24-Jul-2019  hkenken branches: 1.6.28;
i.MX USB host code re-arrangement.
 1.5 20-Jun-2019  hkenken Add support for clk subsystem in imx6 CCM driver.
 1.4 17-May-2016  ryo branches: 1.4.18;
Add initial support for Freescale i.MX7 SoC and
Atmark Techno Armadillo-IoT G3 boards.

Contributed by Internet Initiative Japan Inc.
 1.3 10-Sep-2015  hkenken USBMODE register's initialization should be done in sc_vendor_init() after sending EHCI_CMD_HCRESET command.
 1.2 25-Jul-2014  hkenken branches: 1.2.4;
Add support i.MX50x
* i.MX50 series is e-ink e-reader processor.
 1.1 30-Nov-2010  bsh branches: 1.1.6; 1.1.20; 1.1.34;
Support GPIO, IOMUX, and USB on i.MX51.
 1.1.34.1 10-Aug-2014  tls Rebase.
 1.1.20.2 03-Dec-2017  jdolecek update from HEAD
 1.1.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.2 05-Mar-2011  rmind sync with head
 1.1.6.1 30-Nov-2010  rmind file imxusbvar.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.2.4.2 29-May-2016  skrll Sync with HEAD
 1.2.4.1 22-Sep-2015  skrll Sync with HEAD
 1.4.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.28.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.3 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2 02-May-2014  hkenken branches: 1.2.2; 1.2.4; 1.2.8;
struct device * -> device_t
 1.1 22-Mar-2014  hkenken branches: 1.1.2;
add Watchdog Timer support for i.MX51.
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.8.3 03-Dec-2017  jdolecek update from HEAD
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 02-May-2014  tls file imxwdog.c was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 02-May-2014  yamt file imxwdog.c was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 02-May-2014  rmind file imxwdog.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3 25-Sep-2014  ryo add support i.MX6 and NITROGEN6X evaluation board
 1.2 22-Mar-2014  hkenken add Watchdog Timer support for i.MX51.
 1.1 13-Nov-2010  bsh branches: 1.1.2; 1.1.8; 1.1.12; 1.1.22; 1.1.26;
i.MX51 support by SHIMIZU Ryo, Hashimoto Kenichi, and me.
 1.1.26.1 18-May-2014  rmind sync with head
 1.1.22.2 03-Dec-2017  jdolecek update from HEAD
 1.1.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.12.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.1.8.2 05-Mar-2011  rmind sync with head
 1.1.8.1 13-Nov-2010  rmind file imxwdogreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:35 +0000
 1.1.2.2 15-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.1 13-Nov-2010  uebayasi file imxwdogreg.h was added on branch uebayasi-xip on 2010-11-15 14:38:22 +0000
 1.1 22-Mar-2014  hkenken branches: 1.1.4; 1.1.6; 1.1.10;
add Watchdog Timer support for i.MX51.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 22-Mar-2014  tls file imxwdogvar.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 22-Mar-2014  yamt file imxwdogvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 22-Mar-2014  rmind file imxwdogvar.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.55 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.54 04-Nov-2024  christos Undo previous lwp.h change.
 1.53 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 1.52 26-Sep-2020  skrll branches: 1.52.26;
G/C arm/atomic.h
 1.51 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.50 20-Mar-2018  ryo branches: 1.50.2;
separate cputypes.h for CPU_ID_* from armreg.h,
and add some implementor IDs, CortexA55,73,75 IDs.

(preliminary changes for merging aarch64)
 1.49 23-Jul-2014  alnsn branches: 1.49.26;
Rename sljitarch.h to sljit_machdep.h.
 1.48 17-Jun-2014  alnsn Add sljit support to arm.
 1.47 02-May-2013  matt branches: 1.47.8;
This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
 1.46 01-May-2013  matt Add a default arm32 vmparam.h
 1.45 23-Apr-2013  matt Install fenv.h
 1.44 11-Jan-2013  matt Don't install fp.h anymore
 1.43 15-Aug-2012  matt branches: 1.43.2;
Export <arm/vfpreg.h>
 1.42 06-Aug-2012  matt Add aeabi.h header which descibes the C portion of the EABI run time API.
 1.41 16-Feb-2012  christos Added cpuconf.h needed by libkvm build.
 1.40 17-Jul-2011  dyoung branches: 1.40.2; 1.40.6; 1.40.10;
Do not install bus.h.
 1.39 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.38 25-Jun-2008  matt Revert last change and just use .WAIT
 1.37 23-Jun-2008  matt Fix a race condition -j. Don't do SUBDIRS= include/arm include/arm/...
since the latter might be done before the former which mtree doesn't like.
Instead have arm recurse into its own subdirs.
 1.36 19-Jan-2008  chris branches: 1.36.14;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.35 01-Jan-2008  chris Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.34 18-Feb-2007  briggs branches: 1.34.10; 1.34.18; 1.34.22; 1.34.24; 1.34.30; 1.34.36;
Install atomic.h, as needed by the installed rwlock.h.
 1.33 18-Feb-2007  matt Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.32 09-Feb-2007  ad branches: 1.32.2;
Merge newlock2 to head.
 1.31 26-Jul-2006  drochner branches: 1.31.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.30 11-Dec-2005  christos branches: 1.30.4; 1.30.8;
merge ktrace-lwp.
 1.29 08-May-2004  kleink branches: 1.29.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.28 17-Jan-2003  thorpej branches: 1.28.2;
Merge the nathanw_sa branch.
 1.27 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.26 13-Aug-2002  thorpej Byte-swapping optimizations, enabled if compiling with GCC:
* Byte-swap 16-bit and 32-bit constants at compile-time.
* Inline 16-bit and 32-bit variable byte-swaps. These take 3 and 4
insns, respectively, and inlining saves the minimum 6 cycle penalty
to call/return from the byte swap function.
 1.25 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.24 13-Jan-2002  bjh21 branches: 1.24.8; 1.24.10;
Add an <arm/swi.h>, containing symbolic names for SWI ranges.
 1.23 26-Nov-2001  thorpej Don't install includes which userland doesn't need.
 1.22 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.21 03-Sep-2001  matt branches: 1.21.6;
Add a merged <pcb.h> for arm26/arm32.
 1.20 29-Jul-2001  chris PR 13581
Add empty pmap.h and vmparam.h to make userland happier.
 1.19 14-Jul-2001  matt Make <sysarch.h> valid for all arm platforms. Adjust/remove port-specific
includes as required.
 1.18 23-Jun-2001  bjh21 branches: 1.18.2;
Add a common <arm/param.h>, containing those few things that are obviously
common across all ARM systems.
 1.17 23-Jun-2001  bjh21 Add <arm/endian.h> and remove the cats, dnard and netwinder versions, since
they're all the same (a redirect to <sys/endian.h>).
 1.16 18-Jun-2001  bjh21 Move <arm/arm32/bus.h> to <arm/bus.h>, since it looks like it's going to be
necessary on arm26 as well.
 1.15 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.14 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.13 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.12 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.11 24-Feb-2001  ichiro branches: 1.11.2;
some include files added newly write into Makefile.
 1.10 17-Feb-2001  bjh21 Install <arm/endian_machdep.h>.
 1.9 13-Feb-2001  simonb Fix typo in header filename.
 1.8 11-Feb-2001  bjh21 branches: 1.8.2;
Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it. This should
reduce code size a little.
 1.7 11-Feb-2001  bjh21 Common <arm/reg.h> (and hence common struct reg) for ARM.
This is theoretically backward-incompatible on arm26, but GDB doesn't work there
yet anyway.
 1.6 22-Jan-2001  bjh21 Initial potentially sharable <arm/armreg.h>. Used by all arm26 code.
 1.5 18-Jan-2001  bjh21 Add <arm/frame.h>, for shared stack frame structures. Currently, only sigframes
are common.
 1.4 13-Jan-2001  bjh21 Move <machine/signal.h> into shared directory.
 1.3 11-Jan-2001  bjh21 Share <machine/elf_machdep.h> between arm26 and arm32.
 1.2 11-Jan-2001  bjh21 Install all the headers (arm32 does).
 1.1 10-Jan-2001  bjh21 Skeleton ARM include infrastructure.
 1.8.2.3 21-Apr-2001  bouyer Sync with HEAD
 1.8.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.8.2.1 11-Feb-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-03-12 13:27:21 +0000
 1.11.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.18.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.18.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.18.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.18.2.1 03-Aug-2001  lukem update to -current
 1.21.6.7 11-Dec-2002  thorpej Sync with HEAD.
 1.21.6.6 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.21.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.21.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.21.6.3 08-Jan-2002  nathanw Catch up to -current.
 1.21.6.2 14-Nov-2001  thorpej ARM-specific mcontext support. From Klaus Klein <kleink@netbsd.org>.
 1.21.6.1 03-Sep-2001  thorpej file Makefile was added on branch nathanw_sa on 2001-11-14 20:53:09 +0000
 1.24.10.1 18-Nov-2002  he Pull up revision 1.26 (requested by thorpej in ticket #667):
Byte-swapping optimizations, enabled if compiling with GCC:
o Byte-swap 16-bit and 32-bit constants at compile-time
o Inline 16-bit and 32-bit variable byte-swaps
 1.24.8.1 30-Aug-2002  gehenna catch up with -current.
 1.28.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.28.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.28.2.1 03-Aug-2004  skrll Sync with HEAD
 1.29.12.3 21-Jan-2008  yamt sync with head
 1.29.12.2 26-Feb-2007  yamt sync with head.
 1.29.12.1 30-Dec-2006  yamt sync with head.
 1.30.8.1 11-Aug-2006  yamt sync with head
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.31.4.1 01-Feb-2007  ad Header file cleanup.
 1.32.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.34.36.2 20-Jan-2008  bouyer Sync with HEAD
 1.34.36.1 02-Jan-2008  bouyer Sync with HEAD
 1.34.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.34.24.2 23-Mar-2008  matt sync with HEAD
 1.34.24.1 09-Jan-2008  matt sync with HEAD
 1.34.22.2 20-Jan-2008  chris Sync to HEAD.
 1.34.22.1 01-Jan-2008  chris Sync with HEAD.
 1.34.18.1 28-Feb-2008  rjs Sync with HEAD.
 1.34.10.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.36.14.1 27-Jun-2008  simonb Sync with head.
 1.40.10.1 21-Nov-2012  matt Add aeabi.h, cpuconf.h, and vfpreg.h
 1.40.6.1 18-Feb-2012  mrg merge to -current.
 1.40.2.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.40.2.3 23-Jan-2013  yamt sync with head
 1.40.2.2 30-Oct-2012  yamt sync with head
 1.40.2.1 17-Apr-2012  yamt sync with head
 1.43.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.2.2 23-Jun-2013  tls resync from head
 1.43.2.1 25-Feb-2013  tls resync with head
 1.47.8.1 10-Aug-2014  tls Rebase.
 1.49.26.2 28-Jul-2018  pgoyette Sync with HEAD
 1.49.26.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.50.2.1 10-Jun-2019  christos Sync with HEAD
 1.52.26.1 02-Aug-2025  perseant Sync with HEAD
 1.3 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.2 02-May-2013  matt branches: 1.2.4; 1.2.12; 1.2.38; 1.2.40;
This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
 1.1 01-May-2013  matt Pickup fenv.h from a common location since it's only used from userland
and the kernel will never include it.
 1.2.40.1 10-Jun-2019  christos Sync with HEAD
 1.2.38.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.12.1 02-May-2013  yamt file Makefile.common was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.2.4.2 23-Jun-2013  tls resync from head
 1.2.4.1 02-May-2013  tls file Makefile.common was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2 22-Feb-2015  riastradh branches: 1.2.2; 1.2.18;
Make -mfloat-abi=soft a native kernel only option. Fixes rump build.

ok justin@
 1.1 21-Feb-2015  joerg Don't build modules with float instructions.
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 22-Feb-2015  jdolecek file Makefile.inc was added on branch tls-maxphys on 2017-12-03 11:35:53 +0000
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 22-Feb-2015  skrll file Makefile.inc was added on branch nick-nhusb on 2015-04-06 15:17:52 +0000
 1.3 22-Dec-2019  thorpej Add acpi_intr_mask() and acpi_intr_unmask() which, following the pre-existing
ACPI software layering model, are wrappers around acpi_md_intr_mask() and
acpi_md_intr_unmask(), which in turn are wrappers around intr_mask() and
intr_unmask().

XXX ARM and IA64 implementations of acpi_md_intr_mask() and
acpi_md_intr_unmask() are just stubs for now.
 1.2 16-Nov-2018  jmcneill branches: 1.2.4;
Add MD functions for establishing and disestablishing interrupt handlers.
 1.1 12-Oct-2018  jmcneill branches: 1.1.2;
Add ARM MD ACPI implementation.
 1.1.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.2 20-Oct-2018  pgoyette Sync with head
 1.1.2.1 12-Oct-2018  pgoyette file acpi_machdep.h was added on branch pgoyette-compat on 2018-10-20 06:58:25 +0000
 1.2.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 16-Nov-2018  christos file acpi_machdep.h was added on branch phil-wifi on 2019-06-10 22:05:54 +0000
 1.6 06-Oct-2021  skrll More trailing whitespace
 1.5 01-Aug-2013  matt All floating point related rtabi (__aeabi) are called using the aapcs
calling standard, not aapcs-vfp. This fixes lots of problems on earmhf
 1.4 08-Apr-2013  skrll branches: 1.4.4;
Handle _STANDALONE case.

OK from matt@
 1.3 24-Jan-2013  matt Allow this to be included in libkern
 1.2 11-Aug-2012  matt branches: 1.2.2; 1.2.4; 1.2.6;
#include <stddef.h>
 1.1 06-Aug-2012  matt Add aeabi.h header which descibes the C portion of the EABI run time API.
 1.2.6.2 21-Nov-2012  matt Add aeabi.h, cpuconf.h, and vfpreg.h
 1.2.6.1 11-Aug-2012  matt file aeabi.h was added on branch matt-nb6-plus on 2012-11-21 00:00:10 +0000
 1.2.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.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 11-Aug-2012  yamt file aeabi.h was added on branch yamt-pagecache on 2012-10-30 17:19:03 +0000
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 25-Feb-2013  tls resync with head
 1.4.4.1 28-Aug-2013  rmind sync with head
 1.18 07-May-2019  kamil Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h

Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
 1.17 24-Feb-2014  christos branches: 1.17.30;
consistency in include protection
 1.16 29-Jan-2014  matt change include protection from _ANSI_H_ to _ARM_ANSI_H_
 1.15 27-Jan-2013  matt branches: 1.15.2;
Change _BSD_SSIZE_T_ so it's not dependent of _BSD_PTRDIFF_T_
 1.14 24-Jan-2013  matt Use __{PTRDIFF,SIZE,WCHAR,WINT}_TYPE__ is they are defined.
 1.13 17-Jul-2011  joerg branches: 1.13.2; 1.13.12;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.12 27-Mar-2010  tnozaki 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
 1.11 11-Jan-2009  christos branches: 1.11.4; 1.11.6;
merge christos-time_t
 1.10 29-Aug-2008  matt branches: 1.10.2;
Remove non-__ELF__ snippets.
 1.9 17-Oct-2007  garbled branches: 1.9.16; 1.9.18; 1.9.22; 1.9.24; 1.9.28;
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.8 03-Sep-2007  drochner clean up some definitions around rune_t which are not needed anymore
 1.7 04-Oct-2006  tnozaki branches: 1.7.8; 1.7.16; 1.7.22; 1.7.24; 1.7.26; 1.7.28; 1.7.30;
fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
 1.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
merge ktrace-lwp.
 1.5 07-Aug-2003  agc branches: 1.5.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 02-Mar-2003  tshiozak branches: 1.4.2;
add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
 1.3 08-Nov-2002  thorpej Adjust stdargs/varargs for GCC 3.x.
 1.2 28-Jul-2001  matt branches: 1.2.6; 1.2.16; 1.2.18;
Change ARM-ELF to LP64 friendly types.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file ansi.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.2.18.1 09-Nov-2002  bjh21 Catch up with -current.
 1.2.16.1 11-Dec-2002  he Pull up revision 1.3 (requested by thorpej in ticket #973):
Adjust stdargs/varargs for GCC 3.x.
 1.2.6.2 11-Nov-2002  nathanw Catch up to -current
 1.2.6.1 28-Jul-2001  nathanw file ansi.h was added on branch nathanw_sa on 2002-11-11 21:56:45 +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.5.16.2 27-Oct-2007  yamt sync with head.
 1.5.16.1 30-Dec-2006  yamt sync with head.
 1.6.22.1 22-Oct-2006  yamt sync with head
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.30.1 06-Nov-2007  matt sync with HEAD
 1.7.28.1 01-Jan-2008  chris Sync with HEAD.
 1.7.26.1 02-Oct-2007  joerg Sync with HEAD.
 1.7.24.1 01-Nov-2007  rjs Sync with HEAD.
 1.7.22.1 10-Sep-2007  skrll Sync with HEAD.
 1.7.16.1 03-Oct-2007  garbled Sync with HEAD
 1.7.8.1 09-Oct-2007  ad Sync with head.
 1.9.28.1 19-Oct-2008  haad Sync with HEAD.
 1.9.24.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.22.2 11-Aug-2010  yamt sync with head.
 1.9.22.1 04-May-2009  yamt sync with head.
 1.9.18.3 01-Nov-2008  christos Sync with head.
 1.9.18.2 30-Mar-2008  christos time_t is now __int64_t
 1.9.18.1 29-Mar-2008  christos Welcome to the time_t=long long dev_t=uint64_t branch.
 1.9.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.10.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.6.1 30-May-2010  rmind sync with head
 1.11.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.12.1 25-Feb-2013  tls resync with head
 1.13.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.2.1 18-May-2014  rmind sync with head
 1.17.30.1 10-Jun-2019  christos Sync with HEAD
 1.8 17-Mar-2018  ryo whitespace
 1.7 24-Feb-2014  christos branches: 1.7.28;
consistency in include protection
 1.6 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.5 11-Dec-2005  christos branches: 1.5.114; 1.5.124; 1.5.130;
merge ktrace-lwp.
 1.4 04-Feb-2005  jmc Put this back to a #define after he patched sys/exec_aout.h. Otherwise errno.h
has to be pulled in for ENOEXEC definition.
 1.3 04-Feb-2005  joff Make cpu_exec_aout_makecmds() a static inline instead of just #define'ed to
ENOEXEC. Broken on ARM build from the de-__P'ing, this is the fix.
 1.2 10-Dec-2002  thorpej branches: 1.2.6; 1.2.14;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.1 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file aout_machdep.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.2.14.1 29-Apr-2005  kent sync with -current
 1.2.6.1 06-Feb-2005  skrll Sync with HEAD.
 1.5.130.1 18-May-2014  rmind sync with head
 1.5.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.114.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.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2 24-Feb-2014  christos branches: 1.2.4;
consistency in include protection
 1.1 02-May-2013  matt branches: 1.1.4; 1.1.6;
This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 02-May-2013  tls file apmvar.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 24-Feb-2014  yamt file apmvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1 11-Aug-2007  chris branches: 1.1.2;
file arm_intr.h was initially added on branch chris-arm-intr-rework.
 1.1.2.9 24-Feb-2008  chris Reorder splx code so we don't have to disable interrupts, we might get a
few spurious times when we go into splx_lifter, but that'll hopefully be
the minority case.

Uses suggested reordering from scw@
 1.1.2.8 09-Feb-2008  chris Make sure interrupts are not lost between comparing the pending ipl list
and the updating of the current_ipl_level.

Also bias the comparision so that the "fast path" is to assume that we're
unlikely to have interrupts to process on the splx call.
 1.1.2.7 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.1.2.6 26-Jan-2008  chris Rename some structures, eg intrq->intrline, irqgroup->pic. A lot of
member variables have changed name to reflect this.

Change the API for registering a PIC with the common code, so that it
passes a structure to the common code, rather than lots of parameters.
 1.1.2.5 01-Jan-2008  chris Make branch build again following sync to head.
 1.1.2.4 18-Aug-2007  chris Fix off by one issues when deciding if there are ipls which can be
processed from splx.

Don't lower the spl level in raisespl.

Correct test when scheduling a interrupt.

These issues were more noticable on slower (EB7500ATX) than on faster
(cats) hardware. Particularly noticed when handling disk interrupts,
where disk interrupts were processed even when spl was splbio. They
should have been blocked till the next splx. This was causing disk
timeouts.

Add futher diagnostic output from arm_intr_print_pending_irq_details.
Add some temporary code used to debug the problem. To be remove later.
 1.1.2.3 18-Aug-2007  chris Rework registration call, so that it no longer takes a status paramater.

Rework dispatch routines, so no implicit ordering is required in the irq
groups. This removes the primary flag, and also makes hardware dependant
dispatch routines again.

Update arm_intr_queue_irqs to disable interrupts. This is necessary when
child buses are present, eg isa bus, as the isa interrupt handler is
called with interrupts enabled, and I believe that the footbridge handler
was trampling on the isa handler setting up pending flags.

cats can now install using the update irq code (previously it would
randomly hang)
 1.1.2.2 12-Aug-2007  chris Switch footbridge isa to use common code. This required changes to the
arm code:
* intr_claim now takes a type to indicate edge, level or pulse. It has
isa level understanding of types and uses a callback to set the hardware
type.
* slightly adjust how pending interrupts are queued up.
* switch the ICU setup code to make use the defines in i8259reg.h, rather
than using magic numbers.
 1.1.2.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.136 03-Dec-2022  ryo move ARMv7 PMC register definitions to armreg.h from tprof_armv7.c
 1.135 20-May-2022  andvar s/auxillary/auxiliary/ in comments.
 1.134 27-Nov-2021  skrll Add the Cortex A17 Diagnostic control registers
 1.133 13-Nov-2021  jmcneill Set ACTLR.SMP=1 on Cortex-A17
 1.132 10-Oct-2021  skrll Add a placeholder for PRRR
 1.131 03-Sep-2021  andvar fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/
 1.130 31-Jan-2021  skrll Fix (unused) PRRR_NOSn #define
 1.129 29-Oct-2019  joerg branches: 1.129.8;
Explicitly annotate FPU requirements for LLVM MC.

When using GCC, this annotations change the global state, but there is
no push/pop functionality for .fpu to avoid this problem. The state is
local to each inline assembler block with LLVM MC.
 1.128 12-Aug-2019  jmcneill Add support for physical timers and sprinkle isb where needed.
 1.127 02-May-2019  skrll branches: 1.127.2;
It's the Normal Memory Remap Register (not Normal Region Remap Register)
 1.126 02-May-2019  skrll Fix Normal Region Remap Register bitmask names
 1.125 30-Jan-2019  jmcneill add gtmr_cntv_cval_write
 1.124 15-Aug-2018  skrll Some CPU specific ACTLR bit definitions
 1.123 12-Aug-2018  skrll Provide and use cpu_mpidr_aff_read in psci_fdt_bootstrap
 1.122 15-Jul-2018  jmcneill Add some PMC event registers
 1.121 14-May-2018  joerg branches: 1.121.2;
Workaround A-008585 errata in GTMR.

Register reads and writes may provide unstable results if the counter
hardware is active at the same time. This results in non-monotonic
counters seen by both the gtmr interrupt and time counter.

The loops are currently applied unconditionally, restricting them to
appropiate FDT markers can be applied later.
 1.120 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.119 20-Mar-2018  ryo separate cputypes.h for CPU_ID_* from armreg.h,
and add some implementor IDs, CortexA55,73,75 IDs.

(preliminary changes for merging aarch64)
 1.118 02-Mar-2018  christos branches: 1.118.2;
insert a couple of .fpu directives when we access the vfp registers while
is softvpf fpu mode for gcc 6. XXX: there is no .fpu push/pop...
 1.117 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.116 20-Dec-2017  skrll One copy of the generic timer register defines is enough for anyone. The
ARM_ prefixed copies are prefered (at this point) and the comments from
the non-ARM_ prefixed versions are copied over.
 1.115 20-Dec-2017  skrll Correct ARM_CNTKCTL_PL0[VP]CTEN values. NFC as nothing uses them.
 1.114 17-Dec-2017  skrll Typo in comment
cvS: ----------------------------------------------------------------------
 1.113 24-Oct-2017  skrll Some more registers
 1.112 16-Sep-2017  matt Add Cortex-A35 CPU ID.
 1.111 17-May-2016  msaitoh branches: 1.111.14;
Fix CORTEXA9Rx definitions.
 1.110 03-Mar-2016  skrll Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
 1.109 15-Oct-2015  skrll No need to shout
 1.108 15-Oct-2015  skrll Setting actlr.bit15=1 (Force in order issue in the branch execution unit)
makes my jetson tk1 stable. Apply this workaround until we figure out
what the real problem is.
 1.107 09-Jun-2015  skrll Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@
 1.106 30-May-2015  skrll Add Revision ID register
 1.105 20-May-2015  hsuenaga move register accessor macros for MPIDR and AUXFMC0 to armreg.h
 1.104 27-Apr-2015  skrll Trailing whitespace
 1.103 27-Apr-2015  skrll ARM spells the System Control Register SCTLR
 1.102 27-Nov-2014  matt branches: 1.102.2;
Add Cortex-A17 ID
 1.101 15-Oct-2014  skrll Fix dccmvau. Add bpimva.
 1.100 15-Oct-2014  skrll Fix bpiall and the comment against bpiallis
 1.99 12-Oct-2014  skrll Minor amendment/corrections.
 1.98 16-Sep-2014  matt Remove redundant CORTEXA9_AUXCTL defines
 1.97 14-Apr-2014  matt branches: 1.97.2;
Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.96 13-Apr-2014  matt Add tpidruro and tpidrurw inlines
 1.95 29-Mar-2014  matt branches: 1.95.2;
Add scr inline
 1.94 26-Mar-2014  matt Add NSACR
 1.93 07-Mar-2014  matt Restrict arm_cond_ok_p to when !__ASSEMBLER && _KERNEL is true.
 1.92 07-Mar-2014  matt Avoid a gcc4.8 bogon.
 1.91 05-Mar-2014  matt Define all the instruction conditions.
Use __SHIFTOUT to get the condition.
Add bool arm_cond_ok_p(uint32_t insn, uint32_t psr) inline
Add tlbtr inline
 1.90 03-Mar-2014  matt More control bits.
SYNCHPRIM defines.
 1.89 01-Mar-2014  matt Fix typos
 1.88 01-Mar-2014  matt defines/inlines for cortex a5/a7 tlbdata ops
 1.87 26-Feb-2014  matt Add more MMU registers
 1.86 24-Feb-2014  matt Add more inlines. Default FSR ARMv6+ bits. Add A7/A15 L2CTRL defs.
 1.85 10-Jan-2014  matt Flush out the PSR definitions.
 1.84 27-Dec-2013  matt Switch to using FP instructions instead of cp10/11 instructions.
 1.83 07-Sep-2013  matt fix CPU_ID_CORTEXA7R0
 1.82 02-Aug-2013  matt Add MVFR (Media & VFP Features) definitions.
 1.81 02-Jul-2013  matt Add TTBCR definitions
 1.80 16-Jun-2013  matt branches: 1.80.2;
Improve generic timer inlines to be cnt*_* consistently
 1.79 12-Jun-2013  matt Fix VBAR inlines
 1.78 12-Jun-2013  matt Fix ARM_PRF1_SEC_MASK value.
 1.77 12-Jun-2013  matt Add defines for ARM Generic Timer
Add defines for PFR1 GTIMER and SEC extensions.
Add VBAR inlines
 1.76 01-May-2013  rkujawa Add Armada XP specific IDs and registers.

Obtained from Marvell, Semihalf.
 1.75 28-Apr-2013  kiyohara Fix ID ARM710a for CL PS-711x.
 1.74 28-Feb-2013  matt Add c16 c8 (tlb) inlines.
Add CPUID of Cortex-A7 r0
 1.73 12-Feb-2013  matt Add inlines for cp10 (vfp) registers
 1.72 24-Jan-2013  matt Don't define CP15 inlines when compiling for a _RUMPKERNEL
 1.71 25-Dec-2012  matt Add CP15 Generic Timer definitions.
Add cortex PMUSERENR inlines
 1.70 29-Nov-2012  matt Add inlines for SCTRL
 1.69 27-Sep-2012  matt Add PSR_HYP32_MODE (hypervisor mode).
 1.68 22-Sep-2012  matt Only use CPACR register for ARM11 and CORTEX cores.
Add VFP ids for other CORTEX CPUs.
 1.67 22-Sep-2012  matt Before testing for VFP, make sure CP10 is enabled. (And CP11 for Neon too).
 1.66 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.65 11-Sep-2012  matt branches: 1.65.2;
Add more c7 register inlines. Add some more CT4 defintions
 1.64 07-Sep-2012  matt Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.63 06-Sep-2012  matt Add ttbr/ttbr1/ttbcr registers
 1.62 31-Aug-2012  matt Use __ASSEMBLER__ to control inline definitions
 1.61 31-Aug-2012  matt Don't do inlines if _STANDALONE
 1.60 29-Aug-2012  matt Use new armv7 CP15 register to print out cache types.
If the cpu_cc_freq is set, report it.
Add macros to make inlines for reading/writing co-processor registers.
 1.59 15-Aug-2012  matt Add SWP enable bit to system control register (Cortex-A9).
 1.58 14-Aug-2012  matt Add __HAVE_CPU_COUNTER support for ARM11 and Cortex CPUs
 1.57 31-Jul-2012  matt Add MON32 mode (just for completeness).
 1.56 23-Jul-2012  skrll Make auxiliary register naming consistent for the 1136.
 1.55 17-Jul-2012  skrll Fix spelling mistake in comments.
 1.54 17-Jul-2012  skrll Add the documented ARM11[37]6 Auxiliary control register defines.
 1.53 14-Jul-2012  matt Fix CPU_ID_CORTEX_P and add CPU_ID_CORTEX_A8_P
 1.52 13-Jul-2012  matt Begin support for Cortex A5, A7, A15 and expand A8 and A9 definitions.
Instead of testing all possible CPUids for a cortex, we know what range
a cortex will be so mask out the insignificant parts and do a single test.
 1.51 20-May-2012  skrll Remove the ARM1156T2 bloat - it only has an MPU. Prompted by matt@
 1.50 20-May-2012  skrll Add the ARM1156T2-S
 1.49 20-May-2012  skrll Add the 'Z' to the 1176 cpu product name.

ok matt@
 1.48 30-Jun-2011  wiz branches: 1.48.2; 1.48.6; 1.48.8;
dependant -> dependent
 1.47 10-Mar-2011  bsh Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.46 15-Dec-2010  bsh branches: 1.46.2;
fix XP bit and U bit definitions of CP15 control register.
These constants are not used in our source tree for now,
so this won't change any kernel bianries.
 1.45 02-Oct-2010  kiyohara Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.44 19-Jun-2010  matt Fix cache probing on Cortex. Add missing CORTEX dependency in cpu.c
 1.43 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.42 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.41 27-Aug-2008  matt branches: 1.41.12; 1.41.14; 1.41.16;
Add new CPU Cache register definitions for Cortex-A8.
 1.40 06-Aug-2008  matt Define IF32_bits as the union of I32_bit|F32_bit
 1.39 22-Jul-2008  matt Implement workaround for:
arm11 Errata 364296:Possible Cache Data Corruption with Hit-Under-Miss

Remove hack in userret which is redundant with workaround.

workaround code from <imre.deak@teleca.com>
 1.38 27-Apr-2008  matt branches: 1.38.2; 1.38.4; 1.38.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.37 06-Jan-2007  christos branches: 1.37.26; 1.37.46; 1.37.48; 1.37.50;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.36 26-Nov-2006  bjh21 branches: 1.36.2;
The ARM7500 ID is no longer a guess -- I've confirmed it on a real ARM7500.
 1.35 14-Apr-2006  nonaka branches: 1.35.8; 1.35.10;
Added FARADAY FA526 ID.
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33 20-Jul-2005  nonaka Added i80219.
 1.32 03-Jun-2005  rearnsha branches: 1.32.2;
Add CPU_ID_ARCH_V5TEJ and CPU_ID_ARCH_V6.
Add CPU_IDs for ARM1136J-s and ARM1136J-S R1.
 1.31 10-May-2005  rearnsha Add CPU-id for arm1026ej-s.
 1.30 21-Aug-2004  rearnsha Define THUMB_INSN_SIZE.
 1.29 13-Apr-2004  bsh add CPU ID for Bulverde
 1.28 31-Oct-2003  scw Overhaul arm32's abort handlers:

- Assume a permission fault is always the result of an attempted
write, so no need to disassemble the opcode.
(as discussed with Richard Earnshaw/Jason Thorpe a week or two ago)

- Split out non-MMU data aborts into separate functions, and deal
correctly with XScale imprecise aborts. Specifically, the old code
made no attempt to handle the double abort faults which can occur
as a result of two consecutive external (imprecise) aborts. This
was easy to provoke by read(2)ing from a /dev/mem offset which caused
an external abort. With the old code, this would bring the system
down instantly, with little clue as to why. (hint: tf_spsr held
PSR_ABT32_MODE...)

- Re-write badaddr_read() to use pcb_onfault instead of adding extra
overhead to data_abort_handler(). A side effect of this is that it
now benefits from the XScale double abort recovery.

- Invoke the cpu-specific prefetch/data abort fixup routines only if
the host cpu actually needs it. On other cpus, the code is optimised
away.

- Sprinkle __predict_{false,true} in all the right places.

- G/C some excess debugging baggage.
 1.27 06-Sep-2003  rearnsha Add arm1020E cpu id
 1.26 03-Sep-2003  mycroft Recognize some TI processors -- not that you'd want to use them.
 1.25 13-May-2003  ichiro branches: 1.25.2;
add CPU types
IXP425 xscale-core NetworkProcessor

later, Ill commit codes for IXP425-evaluation board
 1.24 04-May-2003  thorpej Make the ARM_VECTORS_* unsigned.
 1.23 18-Mar-2003  bsh fix XScale core revision mask, and add masks for core generation and
product number.
 1.22 14-Feb-2003  rjs Add CPU IDs for PXA B2 and C0 steppings.
 1.21 22-Jul-2002  briggs Handle i80200 step D0 and i80321 step B0
 1.20 10-Jul-2002  ichiro add cpu id for "PXA250/210 3rd version CPUcore".

for using many PDA/xscale-core.
 1.19 07-Jun-2002  thorpej Add the CPU ID for the 600MHz i80321 part.
 1.18 27-Apr-2002  ichiro branches: 1.18.2; 1.18.4;
add CPU ID of IXP1200 network processor
 1.17 15-Apr-2002  thorpej Fix a typo and an omission in last.
 1.16 15-Apr-2002  thorpej Add bits for the XScale Auxillary Control Register.
 1.15 03-Apr-2002  thorpej Define the two possible addresses for the ARM vector page.
 1.14 03-Apr-2002  thorpej Add a comment summarizing the post-ARM3 CP15 registers.
 1.13 27-Mar-2002  thorpej The 80321 manual lies; it does have a CPU ID distinct from the 80200.
Add that CPU ID, and add a case for it.
 1.12 26-Mar-2002  thorpej Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.11 16-Mar-2002  bjh21 Add CPU ID for the ARM1022ES.
Also add a CPU class for ARM10E processors in general.
 1.10 14-Feb-2002  rjs Add Cotulla CPU IDs.
 1.9 29-Nov-2001  thorpej Fetch cache info from the Cache Type register on ARM7TDMI and "greater"
processors. Report this when the processor is attached.
 1.8 18-Jul-2001  rjs branches: 1.8.6;
Add Jazelle mode flag.
 1.7 10-Mar-2001  bjh21 branches: 1.7.2;
Correct CPU_ID_ISOLD() and CPU_ID_IS7().
 1.6 04-Mar-2001  bjh21 branches: 1.6.2;
Add CPU ID for ARM7500FE (determined empirically from two I've got here).
 1.5 01-Mar-2001  bjh21 ARM7100 -> ARM710A, following information from reinoud.
 1.4 25-Feb-2001  bjh21 Guess a CPU ID for the ARM700 as well.
 1.3 25-Feb-2001  bjh21 Add possible CPU ID for ARM7500 (based on arm/cpu.h).
Add macros to distinguish the three formats of CPU ID.
 1.2 21-Feb-2001  bjh21 Add CPU_ID_CPU_MASK. Different, but (I hope) more useful definition than
arm32 currently uses.
 1.1 22-Jan-2001  bjh21 branches: 1.1.2;
Initial potentially sharable <arm/armreg.h>. Used by all arm26 code.
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 22-Jan-2001  bouyer file armreg.h was added on branch thorpej_scsipi on 2001-02-11 19:08:51 +0000
 1.6.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 03-Aug-2001  lukem update to -current
 1.8.6.7 01-Aug-2002  nathanw Catch up to -current.
 1.8.6.6 20-Jun-2002  nathanw Catch up to -current.
 1.8.6.5 17-Apr-2002  nathanw Catch up to -current.
 1.8.6.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.8.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.8.6.1 18-Jul-2001  nathanw file armreg.h was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.18.4.2 29-Jul-2002  lukem Pull up revision 1.21 (requested by thorpej in ticket #549):
Handle i80200 step D0 and i80321 step B0
 1.18.4.1 07-Jun-2002  thorpej pullup-1-6 ticket #208:

syssrc/sys/arch/arm/arm/cpufunc.c 1.46
syssrc/sys/arch/arm/arm32/cpu.c 1.38
syssrc/sys/arch/arm/include/armreg.h 1.19

Original log message:

Add the CPU ID for the 600MHz i80321 part.
 1.18.2.3 30-Aug-2002  gehenna catch up with -current.
 1.18.2.2 16-Jul-2002  gehenna catch up with -current.
 1.18.2.1 14-Jul-2002  gehenna catch up with -current.
 1.25.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.25.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.25.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.25.2.1 03-Aug-2004  skrll Sync with HEAD
 1.32.2.3 26-Feb-2007  yamt sync with head.
 1.32.2.2 30-Dec-2006  yamt sync with head.
 1.32.2.1 21-Jun-2006  yamt sync with head.
 1.34.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.34.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.34.8.1 24-May-2006  yamt sync with head.
 1.34.6.1 22-Apr-2006  simonb Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.35.10.1 10-Dec-2006  yamt sync with head.
 1.35.8.1 12-Jan-2007  ad Sync with head.
 1.36.2.1 21-Feb-2007  snj branches: 1.36.2.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.36.2.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.37.50.4 09-Oct-2010  yamt sync with head
 1.37.50.3 11-Aug-2010  yamt sync with head.
 1.37.50.2 04-May-2009  yamt sync with head.
 1.37.50.1 16-May-2008  yamt sync with head.
 1.37.48.1 18-May-2008  yamt sync with head.
 1.37.46.2 28-Sep-2008  mjf Sync with HEAD.
 1.37.46.1 02-Jun-2008  mjf Sync with HEAD.
 1.37.26.1 28-Aug-2007  matt Add ARM1176JS id. Add ARM11 PMC definition. Add cache P bit. Add cpuconf
armv6 XP and UNAL enable bits.
 1.38.6.1 19-Oct-2008  haad Sync with HEAD.
 1.38.4.1 28-Jul-2008  simonb Sync with head.
 1.38.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.41.16.3 21-Apr-2011  rmind sync with head
 1.41.16.2 05-Mar-2011  rmind sync with head
 1.41.16.1 03-Jul-2010  rmind sync with head
 1.41.14.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.41.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.41.12.3 26-Mar-2014  matt sync with HEAD
 1.41.12.2 24-Mar-2014  matt merge l2ctrl from head
 1.41.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.46.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.48.8.1 09-Aug-2012  jdc branches: 1.48.8.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.48.8.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.48.6.1 02-Jun-2012  mrg sync to latest -current.
 1.48.2.5 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.48.2.4 23-Jan-2013  yamt sync with head
 1.48.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.48.2.2 30-Oct-2012  yamt sync with head
 1.48.2.1 23-May-2012  yamt sync with head.
 1.65.2.5 03-Dec-2017  jdolecek update from HEAD
 1.65.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.65.2.3 23-Jun-2013  tls resync from head
 1.65.2.2 25-Feb-2013  tls resync with head
 1.65.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.80.2.2 18-May-2014  rmind sync with head
 1.80.2.1 28-Aug-2013  rmind sync with head
 1.95.2.1 10-Aug-2014  tls Rebase.
 1.97.2.3 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.97.2.2 08-Dec-2016  snj Pull up following revision(s) (requested by msaitoh in ticket #1287):
sys/arch/arm/include/armreg.h: revision 1.111
Fix CORTEXA9Rx definitions.
 1.97.2.1 09-Nov-2014  martin branches: 1.97.2.1.4;
Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.97.2.1.4.1 18-Jan-2017  skrll Sync with netbsd-5
 1.102.2.5 29-May-2016  skrll Sync with HEAD
 1.102.2.4 19-Mar-2016  skrll Sync with HEAD
 1.102.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.102.2.2 22-Sep-2015  skrll Sync with HEAD
 1.102.2.1 06-Jun-2015  skrll Sync with HEAD
 1.111.14.1 13-Dec-2017  matt Add Cortex-A35 definitions
 1.118.2.5 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.118.2.4 28-Jul-2018  pgoyette Sync with HEAD
 1.118.2.3 21-May-2018  pgoyette Sync with HEAD
 1.118.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.118.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.121.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.121.2.1 10-Jun-2019  christos Sync with HEAD
 1.127.2.1 13-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #54):

sys/arch/aarch64/include/armreg.h: revision 1.26
sys/arch/arm/cortex/gtmr.c: revision 1.41
sys/arch/arm/include/armreg.h: revision 1.128
sys/arch/arm/cortex/gtmr_var.h: revision 1.12

Add support for physical timers and sprinkle isb where needed.
 1.129.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.7 27-Jan-2021  skrll Style. NFCI.
 1.6 10-Sep-2020  maxv branches: 1.6.2;
kasan: fix the copyright notices
 1.5 05-Sep-2020  riastradh Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
here.

ok chs@
 1.4 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.3 19-Jul-2020  skrll Fix RPI boot which needs more early stack

XXX centralise INIT_ARM_STACK_{SHIFT,SIZE}
XXX how to protect against this breaking again?
 1.2 10-Jul-2020  skrll Oops... deal with a last minute #define name change. KASAN support now
builds.
 1.1 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.6.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.39 07-May-2025  uwe arm: asm.h - change GOT_INIT to take the normal asm label

Don't pass the label to use for the "current address" as the macro
parameter. It obscures its purpose and makes the use of local labels
extremely unobvious, so you are forced to invent a name that is mostly
useless otherwise:

GOT_INIT(r3, .Lgot.execsp_start, .Lpc.execsp_start)
GOT_INITSYM(.Lgot.execsp_start, .Lpc.execsp_start)
vs.
0: GOT_INIT(r3, .Lgot.execsp_start)
GOT_INITSYM(.Lgot.execsp_start, 0b)

Same object code is generated.
 1.38 07-May-2025  uwe arm: asm.h - no ## at token boundaries

For the ## "if the result is not a valid preprocessing token, the
behavior is undefined", so you 1) don't need to 2) must not use it to
concatenate a token with a non-token, like .arg or arg()

The point is kinda moot, as traditionally asm with cpp uses traditional
cpp, not ANSI cpp (many assemblers use # for literals, which conflicts
with the ANSI CPP # stringization and requires awkward workarounds),
but don't set a bad example even if it never gets called out by the
compiler.
 1.37 06-May-2025  uwe arm/asm.h: revert PCREL_GET &c in previous (ok riastradh)

This change needs to be redone and re-verified. I have detailed some
issues in the PR, and it also turns out that some of the changes were
in the !_REENTRANT branch of #ifdef and thus not checked at all.
riastradh asked to back out the changes for now.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.36 03-May-2025  riastradh arm: Nix most __PIC__ conditionals in .S files.

New macros PCREL_GET(rN,label,pclabel) and PCREL_SYM(label,pclabel)
to enable this by the pattern:

ldr rN, label
#ifdef __PIC__
pclabel:
add rN, rN, pc
#endif
...
label:
#ifdef __PIC__
.word (label - (pclabel + 2*sizeof(instruction)))
#else
.word label
#endif

(sizeof(instruction) = 2 for thumb, 4 for non-thumb.)

No binary change in libc with MKPIE=no (i.e., testing both for
changes to the PIC build and changes to the non-PIC build).

In principle, assembly routines could improve instruction scheduling
by splitting up the ldr and add instructions. But in practice, the
maintenance and auditing burden likely makes this worthwhile by
improving legibility vs a tangle of in-line #ifdefs.

brk.S does things a little differently making it harder to unify.
Could redo it but I don't want to make changes without testing them
first.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.35 09-Jun-2024  riastradh branches: 1.35.2;
arm/asm.h: Respect NETBSD_REVISIONID.
 1.34 23-Apr-2020  jakllsch Fix userland gprof profiling on aarch64.

Adjusts _PROF_PROLOGUE to match OpenBSD; reworks our MCOUNT to retrieve
frompc placed on stack by the prologue, and to streamline sp manipulation
when preserving argument registers.
 1.33 21-Apr-2020  joerg LLVM is a bit stricter and wants the ARM variant of %progbits.
 1.32 17-Apr-2020  joerg Mark the .ident section as mergable string section to avoid redundant
entries.
 1.31 13-Apr-2020  maxv Add support for Branch Target Identification (BTI).

On the executable pages that have the GP (Guarded Page) bit, the semantic
of the "br" and "blr" instructions is changed: the CPU expects the first
instruction of the jump/call target to be "bti", and faults if it isn't.

We add the GP bit on the kernel .text pages (and incidentally the .rodata
pages, but we don't care). The compiler adds a "bti c" instruction at the
beginning of each C function. We modify the ENTRY() macros to manually add
"bti c" in the asm functions.

cpuswitch.S needs a specific change: with "br x27" the CPU expects "bti j",
which is bad because the functions begin with "bti c"; switch to "br x16",
for the CPU to accept "bti c".

BTI helps defend against JOP/COP. Tested on Qemu.
 1.30 27-Jan-2019  dholland branches: 1.30.10;
fix duplicated chunk from merge
 1.29 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.28 01-Apr-2018  ryo branches: 1.28.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.27 04-Mar-2014  matt branches: 1.27.28;
Remove duplicate END(y) macro
 1.26 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.25 30-Nov-2013  matt arm doesn't need to use (PLT) anymore.
 1.24 12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.23 19-Aug-2013  matt Do alternative text sections better, add a _TEXT_SECTION which defaults to
.text but can be overridden before <arm/asm.h> gets included.
 1.22 18-Aug-2013  matt remove __thumb__ PIC specifics. no different from ARM except being pc+4 not
pc+8
 1.21 16-Aug-2013  matt Don't define RETc if Thumb1
Add REL_SYM(a, b)
Make GOT_INIT* thumb aware.
 1.20 13-Aug-2013  matt Add _THUMB_ENTRY and _ARM_ENTRY which do the appropriate things including
switching instruction sets.
Use __thumb__ to decide which _ENTRY gets defined as
 1.19 11-Aug-2013  matt Switch to unified syntax
use it to get condition return on thumb
 1.18 07-Aug-2013  matt Add KMODTRAMPOLINE(name)
There are 3 variations:
one for armv7 using movw ip,#:lower16:func; movt ip,#:upper16:func; bx ip
one for armv4t+ using ldr ip, pc; bx ip; .word func
one for everything else using ldr pc, [pc, #-4]; .word func
 1.17 28-Jan-2013  matt branches: 1.17.2;
Add a RETr(r) macro (indirect return through register r).
 1.16 01-Sep-2012  matt branches: 1.16.2;
Add __BITS to asm.h (remove from imxuartreg.h)
Add L1_S_AP_KR to genassym.h
Use L1_S_AP_* in omap_start.S and don't include pmap.h
 1.15 29-Aug-2012  matt Add __BIT(n) macro
 1.14 30-Jun-2011  wiz branches: 1.14.2; 1.14.10;
dependant -> dependent
 1.13 20-Dec-2010  joerg Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.
 1.12 29-Aug-2008  matt branches: 1.12.12; 1.12.16;
Remove non-__ELF__ support. Use .pushsection/.popsection for RCSID.
 1.11 27-Apr-2008  matt branches: 1.11.2; 1.11.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.10 17-Oct-2007  garbled branches: 1.10.16; 1.10.18; 1.10.20;
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.9 26-Aug-2007  matt branches: 1.9.2;
Move _ARM_ARCH_* from asm.h to cdefs.h so everyone can use them.
Add _END/END/ASEND which every port's asm.h should have.
Add GET_CPUFINO(rX). Reserved for future use. :)
Use %foo instead of #foo
 1.8 20-Jan-2006  christos branches: 1.8.28; 1.8.36; 1.8.42; 1.8.44; 1.8.46; 1.8.48;
Add a STRONG_ALIAS macro
 1.7 11-Dec-2005  christos branches: 1.7.2;
merge ktrace-lwp.
 1.6 21-Aug-2004  rearnsha branches: 1.6.12;
Define _ARM_ARCH_6, _ARM_ARCH_5 and _ARM_ARCH_4T, based on
architecture defines passed from the compiler.

Define RET and RETc macros for return and conditional return. If BX is
available in the current instruction set then make use of it.

Note: these really are from the compiler's -march/-mcpu flags, not
from the kernel config, so they can be relied on in user space.
 1.5 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.4 16-Jul-2001  matt branches: 1.4.6; 1.4.24;
Change way PIC stuff is emitted for ELF to be more flexible.
 1.3 14-Jul-2001  matt Add a GOTSYM which emits the right stuff to GOT symbols under ELF and/or
a.out.
 1.2 26-Apr-2001  bjh21 branches: 1.2.2;
Add ELF version of _PROF_PROLOGUE.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.4;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file asm.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.4.24.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.24.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.24.2 25-Aug-2004  skrll Sync with HEAD.
 1.4.24.1 03-Aug-2004  skrll Sync with HEAD
 1.4.6.2 16-Jul-2001  matt Change way PIC stuff is emitted for ELF to be more flexible.
 1.4.6.1 16-Jul-2001  matt file asm.h was added on branch nathanw_sa on 2001-07-16 05:43:33 +0000
 1.6.12.2 03-Sep-2007  yamt sync with head.
 1.6.12.1 21-Jun-2006  yamt sync with head.
 1.7.2.1 01-Feb-2006  yamt sync with head.
 1.8.48.1 01-Jan-2008  chris Sync with HEAD.
 1.8.46.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.8.44.1 01-Nov-2007  rjs Sync with HEAD.
 1.8.42.1 03-Sep-2007  skrll Sync with HEAD.
 1.8.36.1 03-Oct-2007  garbled Sync with HEAD
 1.8.28.1 09-Oct-2007  ad Sync with head.
 1.9.2.1 28-Aug-2007  matt Support thumb code. Add convience macros.
 1.10.20.2 04-May-2009  yamt sync with head.
 1.10.20.1 16-May-2008  yamt sync with head.
 1.10.18.1 18-May-2008  yamt sync with head.
 1.10.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.10.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 19-Oct-2008  haad Sync with HEAD.
 1.11.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.12.16.1 05-Mar-2011  rmind sync with head
 1.12.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.14.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.14.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.14.2.1 30-Oct-2012  yamt sync with head
 1.16.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.1 25-Feb-2013  tls resync with head
 1.17.2.2 18-May-2014  rmind sync with head
 1.17.2.1 28-Aug-2013  rmind sync with head
 1.27.28.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.28.2.2 21-Apr-2020  martin Sync with HEAD
 1.28.2.1 10-Jun-2019  christos Sync with HEAD
 1.30.10.2 25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)
 1.30.10.1 20-Apr-2020  bouyer Sync with HEAD
 1.35.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 26-Sep-2020  skrll G/C arm/atomic.h
 1.11 19-Nov-2008  matt This is not longer needed since atomic_{set|clear}_bit are now dead.
So temporarily this has no contents.
 1.10 13-Jan-2008  chris branches: 1.10.6; 1.10.10; 1.10.16; 1.10.18;
When manipulating the interrupt status for atomic ops use cpsr_c rather
than cpsr_all, this avoids updating unnecessary fields in the cpsr.

As a side effect, the inline versions no longer clobber the condition
codes.
 1.9 04-Mar-2007  matt branches: 1.9.8; 1.9.16; 1.9.20; 1.9.22; 1.9.28; 1.9.34;
Don't export to userland functions that will only be used in the kernel.
 1.8 28-Feb-2007  bjh21 PROG26 version of __with_interrupts_disabled(), and hence of the various
functions in this file.
 1.7 19-Feb-2007  he Fix a typo, spotted by martin (I stared myself blind on that one...).
 1.6 18-Feb-2007  matt Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.5 28-Dec-2005  perry branches: 1.5.26;
inline -> __inline
 1.4 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 26-Nov-2003  bsh branches: 1.2.16;
fix typo pointed out by Olivier Houchard. thanks.
 1.1 19-Oct-2002  bsh branches: 1.1.2; 1.1.4; 1.1.10;
make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 11-Nov-2002  nathanw Catch up to -current
 1.1.4.1 19-Oct-2002  nathanw file atomic.h was added on branch nathanw_sa on 2002-11-11 21:56:46 +0000
 1.1.2.2 24-Oct-2002  bjh21 Sync with trunk.
 1.1.2.1 19-Oct-2002  bjh21 file atomic.h was added on branch bjh21-hydra on 2002-10-24 22:33:49 +0000
 1.2.16.4 21-Jan-2008  yamt sync with head
 1.2.16.3 03-Sep-2007  yamt sync with head.
 1.2.16.2 26-Feb-2007  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.5.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.5.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.9.34.1 19-Jan-2008  bouyer Sync with HEAD
 1.9.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.22.1 23-Mar-2008  matt sync with HEAD
 1.9.20.1 20-Jan-2008  chris Sync to HEAD.
 1.9.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.9.8.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.10.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.10.10.1 04-May-2009  yamt sync with head.
 1.10.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.3 06-Oct-2021  skrll More trailing whitespace
 1.2 02-Jun-2001  bjh21 branches: 1.2.2; 1.2.10;
Add write_multi_1().
 1.1 30-May-2001  bjh21 Move the declarations of blockio.S functions from katelib.h to a new, exciting
<arm/blockio.h>. katelib.h includes it for compatibility.
 1.2.10.2 02-Jun-2001  bjh21 Add write_multi_1().
 1.2.10.1 02-Jun-2001  bjh21 file blockio.h was added on branch nathanw_sa on 2001-06-02 10:44:57 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10 18-Oct-2020  skrll Trailing whitespace
 1.9 03-Mar-2018  skrll Multiple inclusion protection
 1.8 28-May-2017  jmcneill Add a few bootconfig helpers:
- get_bootconf_string: returns a copy of the "value" part of a k=v pair
as a string.
- match_bootconf_option: returns true if the "value" part of a k=v pair
exists and the supplied val param is present in the beginning of the
k=v pair's value.
 1.7 06-Jan-2015  jmcneill add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
 1.6 31-Aug-2012  matt branches: 1.6.2; 1.6.14; 1.6.16;
Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.5 14-Mar-2009  dsl branches: 1.5.12; 1.5.20;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 26-Oct-2006  bjh21 branches: 1.4.58; 1.4.66; 1.4.72; 1.4.76;
boot_file is not used by generic NetBSD/arm code, and its type varies by
MACHINE. Thus, move it out of <arm/bootconfig.h> and put it into
<machine/bootconfig.h> on those MACHINEs (cats, hpcarm, and shark) where
it's used outside the file in which it's defined.
 1.3 11-Dec-2005  christos branches: 1.3.20; 1.3.22;
merge ktrace-lwp.
 1.2 02-Jun-2005  he branches: 1.2.2;
Adapt to shadowing and qualifier-cast warnings.
 1.1 13-May-2001  bjh21 branches: 1.1.2; 1.1.10; 1.1.28;
Add <machine/bootconfig.h> on arm26, and add an <arm/bootconfig.h> for it to
include (since all the contents are MI).
 1.1.28.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.2 13-May-2001  bjh21 Add <machine/bootconfig.h> on arm26, and add an <arm/bootconfig.h> for it to
include (since all the contents are MI).
 1.1.10.1 13-May-2001  bjh21 file bootconfig.h was added on branch nathanw_sa on 2001-05-13 13:46:24 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 30-Dec-2006  yamt sync with head.
 1.3.22.1 10-Dec-2006  yamt sync with head.
 1.3.20.1 18-Nov-2006  ad Sync with head.
 1.4.76.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.72.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.66.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.58.1 04-May-2009  yamt sync with head.
 1.5.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.5.12.1 30-Oct-2012  yamt sync with head
 1.6.16.2 28-Aug-2017  skrll Sync with HEAD
 1.6.16.1 06-Apr-2015  skrll Sync with HEAD
 1.6.14.1 21-Mar-2015  snj Pull up following revision(s) (requested by jmcneill in ticket #598):
sys/arch/arm/amlogic/amlogic_board.c: up to revision 1.9
sys/arch/arm/amlogic/amlogic_canvasreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_com.c: up to revision 1.4
sys/arch/arm/amlogic/amlogic_comreg.h: up to revision 1.3
sys/arch/arm/amlogic/amlogic_comvar.h: revision 1.1
sys/arch/arm/amlogic/amlogic_cpufreq.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_crureg.h: up to revision 1.7
sys/arch/arm/amlogic/amlogic_dwctwo.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.1
sys/arch/arm/amlogic/amlogic_gmac.c: up to revision 1.2
sys/arch/arm/amlogic/amlogic_hdmireg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_intr.h: up to revision 1.5
sys/arch/arm/amlogic/amlogic_io.c: up to revision 1.7
sys/arch/arm/amlogic/amlogic_reg.h: up to revision 1.9
sys/arch/arm/amlogic/amlogic_rng.c: revision 1.1
sys/arch/arm/amlogic/amlogic_sdhc.c: up to revision 1.3
sys/arch/arm/amlogic/amlogic_sdhcreg.h: revision 1.1
sys/arch/arm/amlogic/amlogic_space.c: revision 1.1
sys/arch/arm/amlogic/amlogic_var.h: up to revision 1.8
sys/arch/arm/amlogic/amlogic_vpureg.h: revision 1.1
sys/arch/arm/arm/bootconfig.c: revisions 1.7-1.8
sys/arch/arm/conf/files.arm: revision 1.129
sys/arch/arm/cortex/pl310.c: revisions 1.16-1.17
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.25-1.29
sys/arch/arm/cortex/a9tmr.c: revisions 1.8-1.12
sys/arch/arm/cortex/a9tmr_var.h: revision 1.4
sys/arch/arm/cortex/a9wdt.c: revisions 1.3-1.4
sys/arch/arm/cortex/armperiph.c: revisions 1.5-1.7
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/include/bootconfig.h: revision 1.7
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/evbarm/amlogic/amlogic_machdep.c: up to revision 1.17
sys/arch/evbarm/amlogic/amlogic_start.S: up to revision 1.2
sys/arch/evbarm/amlogic/genassym.cf: revision 1.1
sys/arch/evbarm/amlogic/platform.h: revision 1.1
sys/arch/evbarm/conf/files.amlogic: up to revision 1.8
sys/arch/evbarm/conf/std.amlogic: up to revision 1.2
sys/arch/evbarm/conf/mk.amlogic: revision 1.1
sys/arch/evbarm/conf/ODROID-C1: up to revision 1.12
sys/arch/evarm/conf/ODROID-C1_INSTALL: revision 1.1
Don't use not as a variable since it's reserved in C++.
--
clean the a9 l2 cache before turning it on.
--
Add Cortex-A17 support
--
Fix CORTEXA17 support
--
Let the "cbar" device property override the cbar value, to work around
broken bootloaders
--
add a helper to update a9tmr frequency
--
detach and re-attach timecounter when updating freq, and reinit timer on
each cpu
--
fix typo
--
add BOOTOPT_TYPE_MACADDR for parsing mac address parameters
--
make sure we set ACTLR.SMP=1 for CPU_CORTEXA5 in !MP case, ok matt@
--
According to the Cortex-A5 TRM, the CBAR register is not implemented and
always reads as 0x00000000. Add ARM_CBAR option to set this in kernel
config.
--
skip a TLBIALL on Cortex-A5 that stops my odroid-c1 from booting, ok matt
--
match on Cortex-A5
--
match on Cortex-A5
--
allow arml2cc to be used on Cortex-A5 if the "offset" property is specified
--
print "A5" instead of "A9" at attach time if running on a Cortex-A5
--
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
--
Work-in-progress Odroid-C1 support.
--
no need to override ARM_CBAR, remove unused COM_16750 option
--
Add basic serial console support.
--
add dwctwo and usb devices
--
ODROID-C1 SMP support.
--
auto-detect RAM size
--
ODROID-C1 onboard ethernet support.
--
add amlogicrng, add commented-out genfb placeholder
--
enable amlogicsdhc
--
add ODROID-C1 install kernel
--
Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised
as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config
and make sure to set the correct speed before attaching CPUs.
The speed can still be scaled down with machdep.cpu sysctls.
--
disable DEBUG, LOCKDEBUG, VERBOSE_INIT_ARM
--
Basic framebuffer console support. Work in progress.
 1.6.2.1 03-Dec-2017  jdolecek update from HEAD
 1.6 29-Jan-2014  matt Add latent AArch64 support.
 1.5 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.4 31-Jan-2006  dsl branches: 1.4.112; 1.4.122; 1.4.128;
Change sys/arch/xxx/include/bswap.h to #include machine/byte_swap.h then
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
 1.3 14-Aug-2002  thorpej branches: 1.3.24; 1.3.36;
* Rename "word" -> 16, and "long" -> 32, as suggested by Ben Harris.
* Replace __byte_swap_32_variable() with a C version from Richard
Earnshaw that generates nearly identical assembly (and it would be
exactly identical with the addition of another peephole to GCC ARM
back-end).
 1.2 13-Aug-2002  thorpej Byte-swapping optimizations, enabled if compiling with GCC:
* Byte-swap 16-bit and 32-bit constants at compile-time.
* Inline 16-bit and 32-bit variable byte-swaps. These take 3 and 4
insns, respectively, and inlining saves the minimum 6 cycle penalty
to call/return from the byte swap function.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10; 1.1.18; 1.1.20;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.20.2 18-Nov-2002  he Pull up revision 1.3 (requested by thorpej in ticket #673):
Rename ``word'' -> 16 and ``long'' -> 32.
Replace __byte_swap_32_variable() with a C version that
generates nearly identical assembly.
 1.1.20.1 18-Nov-2002  he Pull up revision 1.2 (requested by thorpej in ticket #667):
Byte-swapping optimizations, enabled if compiling with GCC:
o Byte-swap 16-bit and 32-bit constants at compile-time
o Inline 16-bit and 32-bit variable byte-swaps
 1.1.18.1 30-Aug-2002  gehenna catch up with -current.
 1.1.10.1 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.6.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file bswap.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.3.36.1 01-Feb-2006  yamt sync with head.
 1.3.24.1 21-Jun-2006  yamt sync with head.
 1.4.128.1 18-May-2014  rmind sync with head
 1.4.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.112.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.21 17-Jul-2011  dyoung On ARM-ish ports having PCI support, use new-style <sys/bus.h>. Do not
install <machine/bus.h>. Remove various <machine/bus.h> sources.
 1.20 14-Mar-2009  dsl branches: 1.20.2;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.19 28-Apr-2008  martin branches: 1.19.8; 1.19.14; 1.19.18;
Remove clause 3 and 4 from TNF licenses
 1.18 04-Mar-2007  christos branches: 1.18.42; 1.18.44; 1.18.46;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to. this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
 1.16 01-Mar-2006  yamt branches: 1.16.20;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.15 11-Dec-2005  christos branches: 1.15.2; 1.15.4; 1.15.6;
merge ktrace-lwp.
 1.14 09-Mar-2005  matt branches: 1.14.4;
Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.13 09-Nov-2003  tsutsui branches: 1.13.8; 1.13.10;
Use #if defined(_KERNEL_OPT) to protect #include "opt_xxx.h"
from building LKM etc. Suggested by mrg.
 1.12 23-Oct-2003  scw Add a defflag for __BUS_SPACE_HAS_STREAM_METHODS, and add the
appropriate glue in bus.h, contingent on the option being defined.

This allows stream methods to be available on a port-by-port basis.
 1.11 28-Jul-2003  thorpej Add an opaque cookie field to the bus dma tag.
 1.10 15-Jun-2003  fvdl branches: 1.10.2;
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.9 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.8 17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.7 14-Aug-2002  thorpej * Add an ARM32_DMAMAP_COHERENT flag to indicate that a loaded DMA
map contains "coherent" (non-cached in ARM-land) mappings.
* Set ARM32_DMAMAP_COHERENT in the map at the start of a load operation,
and clear it in _bus_dmamap_load_buffer() if we encounter any cacheable
mappings.
* In _bus_dmamap_sync(), if the map is marked COHERENT, skip any cache
flushing.
 1.6 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.5 28-Jul-2002  thorpej Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that. This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
 1.4 25-Jan-2002  thorpej branches: 1.4.8; 1.4.10;
Overhaul bus_dmamap_sync for the ARM:
* Track which process (XXX really, vmspace) owns the mapping. When
we sync the map, if the mapping doesn't belong to the kernel or to
the current process (XXX really, vmspace), then no cache fobbing
is necessary, since the cache is Wb-Inv'd on context switch (XXX need
to revisit this when we support FCSE).
* Be smarter about which cache operation we do when sync'ing the map:
- PREREAD -- Invalidate D$ (XXX right now, we actually do Wb-Inv)
- PREWRITE -- Write-back D$ (note, we do NOT invalidate here)
- PREREAD|PREWRITE -- Wb-Inv D$

More work is needed here. In particular, a version for CPUs
with write-through caches should be provided, to eliminate
the write-back steps (which are noops on such CPUs, but skipping
two branches would be nice).
 1.3 10-Sep-2001  reinoud branches: 1.3.4;
Initial commitment of the bus_space_mmap() functions as proposed by Jason R
Thorpe as an extension to the bus_space(9) API.

Only the mainbus has a working mmap... iomd, podulebus and isa dont have
one yet. Its trivial to add the iomd and isa's memory part but am a bit
hessistant to add it without knowing its implications by heart.

Podulebus might be implemented in 32 bits EASI but otherwise its not really
transparent since there is AFAIK no function to explicitly read one byte or
so .. or is this implemented in a higher level ?

ARM26 and arch/arm32/dnard (Shark) kernels compile and RiscPC and Shark
kernels are tested and function OK.

Implications of other ARM systems like hpcarm and ebarm are propably
minimal or solved trivially.
 1.2 19-Jul-2001  thorpej branches: 1.2.2;
Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
 1.1 18-Jun-2001  bjh21 branches: 1.1.2; 1.1.4;
Move <arm/arm32/bus.h> to <arm/bus.h>, since it looks like it's going to be
necessary on arm26 as well.
 1.1.4.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 03-Aug-2001  lukem update to -current
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.4.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 10-Sep-2001  nathanw file bus.h was added on branch nathanw_sa on 2002-02-28 04:07:32 +0000
 1.4.10.1 07-Dec-2002  he Pull up revision 1.5 (requested by thorpej in ticket #568):
Remove warning from bus_dmamap_destroy().
Change the way DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a
pointer to the original buffer/buftype used to load the
DMA map, and use that. Shrinks bus_dma_segment_t from 12
to 8 bytes, and the cache flushing is also more efficient.
 1.4.8.1 30-Aug-2002  gehenna catch up with -current.
 1.10.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.14.4.3 03-Sep-2007  yamt sync with head.
 1.14.4.2 26-Feb-2007  yamt sync with head.
 1.14.4.1 21-Jun-2006  yamt 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 18-Feb-2006  yamt keep vmspace rather than proc in bus_dmamap_t.
 1.16.20.2 12-Mar-2007  rmind Sync with HEAD.
 1.16.20.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.18.46.2 04-May-2009  yamt sync with head.
 1.18.46.1 16-May-2008  yamt sync with head.
 1.18.44.1 18-May-2008  yamt sync with head.
 1.18.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.19.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.20.2.4 28-Jul-2010  uebayasi Correct bus_space_physload(9) arguments to take "int freelist".

A possible use case of bus_space_physload(9) would be some high-performance
device with huge local memory, like InfiniBand HCA. We can register
its local memory using bus_space_physload(..., VM_FREELIST_INFINIBAND0),
then later map it to userspace via cdev_mmap(9) -> bus_dmamem_mmap(9).

(bus_dma(9) needs changes too, of course.)
 1.20.2.3 26-Jul-2010  uebayasi After much consideration, rename bus_space_physload_direct(9) back to
bus_space_physload_device(9).

The latter registers a segment as "device pages". "Device pages" are
managed, but not used for general purpose memory. Most typically XIP
pages.
 1.20.2.2 31-May-2010  uebayasi Re-define the definition of "device page"; device pages are pages of
device memory. Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.
 1.20.2.1 28-Apr-2010  uebayasi Initial implemention of bus_space_physload(9) for NetBSD/arm (only i.MX31
for now).
 1.19 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.18 22-Jan-2022  skrll Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.
 1.17 30-Aug-2021  jmcneill Add storage for an iommu cookie in bus_dmamap_t and store untranslated CPU
address in bus_dma_segment_t.
 1.16 23-Apr-2021  skrll Trialing whitespace
 1.15 13-Apr-2020  maxv Add KASAN-DMA support on aarch64, same as amd64. Discussed with skrll@.
 1.14 28-Dec-2019  jmcneill branches: 1.14.6;
Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.13 19-Nov-2018  jmcneill branches: 1.13.4;
On second thought, get rid of "bs_base" from struct bus_space and use a
custom bs_map for acpipchb instead.
 1.12 18-Nov-2018  jmcneill Add a "bs_base" field to struct bus_space. If present, use it to translate
mappings by appending the value to the pa passed to bus_space_map.
 1.11 01-Apr-2018  ryo branches: 1.11.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.10 29-Jan-2014  matt branches: 1.10.28;
Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.9 16-Feb-2013  matt branches: 1.9.2;
Add PRIxBUSADDR, etal
 1.8 27-Jan-2013  matt Get rid of _BUS_DMAMAP_MEM_XLATE
 1.7 27-Jan-2013  matt Add a _BUS_DMAMAP_NOALLOC which tells bus_dmamem_alloc to skip that
dmarange when allocating memory.
Add a second dmarange to bcm23xx obio to allow it to map coherently mapped
memory.
 1.6 27-Jan-2013  matt Add a flag to make bus_dmamem_map use the bus/sys transation table when
mapping bus addresses. Make bcm2835 obio use it.
 1.5 12-Nov-2012  skrll C99 types
 1.4 19-Oct-2012  matt Make IS_BOUNCING a map flag and use it to simplify code and to avoid calling
the sync routines if (COHERENT|IS_BOUNCING) == COHERENT. (this eeks out a
little bit more performance).
 1.3 17-Oct-2012  matt Add per-segment and per-ragne flag (to store _BUS_DMAMAP_COHERENT).
Use the per-range flag to set the per-segment flag.
This allows bus_dma to skip flushing for known coherent memory regions.
 1.2 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.1 01-Jul-2011  dyoung branches: 1.1.2; 1.1.10; 1.1.12;
Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.12.2 25-Feb-2013  tls resync with head
 1.1.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.10.2 13-Feb-2013  matt Sync with HEAD
 1.1.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.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.1.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.1 30-Oct-2012  yamt sync with head
 1.9.2.1 18-May-2014  rmind sync with head
 1.10.28.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.10.28.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.11.2.3 21-Apr-2020  martin Sync with HEAD
 1.11.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.2.1 10-Jun-2019  christos Sync with HEAD
 1.13.4.1 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.14.6.1 20-Apr-2020  bouyer Sync with HEAD
 1.13 18-Apr-2023  skrll G/C unnecessary

extern paddr_t physical_start, physical_end;
 1.12 19-Nov-2022  skrll Fix _bus_dmamem_alloc_range function declaration - low and high are
paddr_t
 1.11 24-Jan-2021  martin Obey __HAVE_BUS_SPACE_8
 1.10 05-Sep-2020  jakllsch branches: 1.10.2;
Add missing prototypes for __bs_c(f,_bs_sm_?_swap)

(implementations of these already exist for aarch64)
 1.9 13-Apr-2020  maxv Add KASAN-DMA support on aarch64, same as amd64. Discussed with skrll@.
 1.8 16-Jul-2019  skrll branches: 1.8.8;
Remove the _BUS_DMAMAP_COHERENT optimisation in the bus_dmamap_sync macro
as the real function performs memory barriers now.
 1.7 01-Apr-2018  ryo branches: 1.7.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.6 29-Jan-2014  matt branches: 1.6.28;
Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.5 17-Jan-2013  matt branches: 1.5.2;
Cortex needs ._dmamap_sync_post for BUS_DMASYNC_POSTREAD
 1.4 19-Oct-2012  matt Make IS_BOUNCING a map flag and use it to simplify code and to avoid calling
the sync routines if (COHERENT|IS_BOUNCING) == COHERENT. (this eeks out a
little bit more performance).
 1.3 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.2 15-Jul-2012  matt branches: 1.2.2;
s/u_int*_t/ -> uint_*_t
Add swap variants for many accessors.
 1.1 01-Jul-2011  dyoung branches: 1.1.2; 1.1.10;
Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1.10.2 17-Jan-2013  matt Pullup from HEAD:
Cortex needs ._dmamap_sync_post for BUS_DMASYNC_POSTREAD
 1.1.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.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.1.2.2 23-Jan-2013  yamt sync with head
 1.1.2.1 30-Oct-2012  yamt sync with head
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 25-Feb-2013  tls resync with head
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 18-May-2014  rmind sync with head
 1.6.28.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.7.2.2 21-Apr-2020  martin Sync with HEAD
 1.7.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.10.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 17-Jan-2017  rin remove unnecessary cast, KNF
 1.15 14-Jan-2017  martin branches: 1.15.2;
Avoid gcc warnings
 1.14 13-Jan-2017  christos elide conversion warning.
 1.13 28-Jan-2013  matt branches: 1.13.14; 1.13.18;
Use uint32_t for __asm to appease clang.
 1.12 05-Sep-2012  matt branches: 1.12.2;
Disable arm32 __asm for _byte_swap_u16_variable since gcc4.5 produces
decent code for it. Fixes PR/46898.
 1.11 20-Jul-2012  matt Use defined(_ARM_ARCH_[67])
 1.10 15-Jul-2012  matt Add BSWAP16 and BSWAP32 macros for use in assembly.
 1.9 12-Jul-2012  matt Use __builtin_constant_p so that we only emit asm when
the expression is not a constant.
 1.8 28-Apr-2008  martin branches: 1.8.18; 1.8.34; 1.8.40; 1.8.42;
Remove clause 3 and 4 from TNF licenses
 1.7 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.6 30-Jan-2006  dsl branches: 1.6.50; 1.6.74; 1.6.76; 1.6.78;
Move all the stuff that detects bswapxx(constant) into the MI sys/bswap.h
Put the minimum to define the required inline assembler or C into the MD files.
NB: there may be some fallout from this!
 1.5 28-Dec-2005  perry branches: 1.5.2;
inline -> __inline
 1.4 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 08-Nov-2002  thorpej branches: 1.3.2; 1.3.24;
Ensure that some integer constants are always unsigned.
 1.2 14-Aug-2002  thorpej branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
* Rename "word" -> 16, and "long" -> 32, as suggested by Ben Harris.
* Replace __byte_swap_32_variable() with a C version from Richard
Earnshaw that generates nearly identical assembly (and it would be
exactly identical with the addition of another peephole to GCC ARM
back-end).
 1.1 13-Aug-2002  thorpej Byte-swapping optimizations, enabled if compiling with GCC:
* Byte-swap 16-bit and 32-bit constants at compile-time.
* Inline 16-bit and 32-bit variable byte-swaps. These take 3 and 4
insns, respectively, and inlining saves the minimum 6 cycle penalty
to call/return from the byte swap function.
 1.2.8.1 09-Nov-2002  bjh21 Catch up with -current.
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 14-Aug-2002  jdolecek file byte_swap.h was added on branch kqueue on 2002-09-06 08:32:35 +0000
 1.2.4.2 30-Aug-2002  gehenna catch up with -current.
 1.2.4.1 14-Aug-2002  gehenna file byte_swap.h was added on branch gehenna-devsw on 2002-08-30 00:19:11 +0000
 1.2.2.3 11-Nov-2002  nathanw Catch up to -current
 1.2.2.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.2.1 14-Aug-2002  thorpej file byte_swap.h was added on branch nathanw_sa on 2002-08-19 21:39:13 +0000
 1.3.24.1 21-Jun-2006  yamt sync with head.
 1.3.2.3 18-Nov-2002  he Pull up revision 1.2 (requested by thorpej in ticket #673):
Rename ``word'' -> 16 and ``long'' -> 32.
Replace __byte_swap_32_variable() with a C version that
generates nearly identical assembly.
 1.3.2.2 18-Nov-2002  he Pull up revision 1.1 (new, requested by thorpej in ticket #667):
Byte-swapping optimizations, enabled if compiling with GCC:
o Byte-swap 16-bit and 32-bit constants at compile-time
o Inline 16-bit and 32-bit variable byte-swaps
 1.3.2.1 08-Nov-2002  he file byte_swap.h was added on branch netbsd-1-6 on 2002-11-18 01:04:18 +0000
 1.5.2.1 01-Feb-2006  yamt sync with head.
 1.6.78.1 16-May-2008  yamt sync with head.
 1.6.76.1 18-May-2008  yamt sync with head.
 1.6.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.50.2 29-Feb-2008  matt Rework establish_irq to take an intrsource.
Enable an interrupt after establishing it.
 1.6.50.1 28-Aug-2007  matt On ARMv6, expand bswap32/bswap16 to a "rev" or "rev16" instructions.
 1.8.42.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.8.42.1 01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.8.40.1 13-Sep-2012  riz Pull up following revision(s) (requested by martin in ticket #542):
sys/arch/arm/include/byte_swap.h: revision 1.12
Disable arm32 __asm for _byte_swap_u16_variable since gcc4.5 produces
decent code for it. Fixes PR/46898.
 1.8.34.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.34.1 30-Oct-2012  yamt sync with head
 1.8.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.2.2 03-Dec-2017  jdolecek update from HEAD
 1.12.2.1 25-Feb-2013  tls resync with head
 1.13.18.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.14.1 05-Feb-2017  skrll Sync with HEAD
 1.15.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.19 01-Dec-2020  rin Switch earmv6{,hf}eb to BE8 in kernel side.

My strategy here is to define _ARM_ARCH_BE8 macro in arm/cdefs.h, if
__ARMEB__ && _ARM_ARCH_6.

Use this macro to determine whether system is compiled for and running on
BE8 mode or not.

Note that, for __ARMEB__, some conditions become compile-time constants
determined by _ARM_ARCH_BE8 macro, e.g., whether BE8 or BE32 are accepted
as a userland binary, or unaligned memory access is possible or not.
 1.18 03-Nov-2020  skrll The ARM C Language Extenstion document defines __ARCH_ARM as the integer
macro indicating the current ARM instruction set. Let's use it.

PR/55778: evbarm64 GENERIC64 kernel fails to build with clang

XXX Handle the fact that for an ARM architecture ARMvX.Y then,
XXX __ARM_ARCH= X * 100 + Y. E.g. for ARMv8.1 __ARM_ARCH = 801.
 1.17 11-Oct-2020  skrll branches: 1.17.2;
Define _ARM_ARCH_8 when __ARM_ARCH_8A (no trailing double underscore) as
it is defined by gcc.

__ARM_ARCH_8A__ (with trailing double underscore) seems to be a typo (or
maybe historical)
 1.16 02-Aug-2019  joerg ARMv6KZ has been misspelled by GCC since forever, but clang only
provides the correct name. Support both.
 1.15 23-Jun-2014  christos branches: 1.15.28;
unbreak lint
 1.14 24-Mar-2014  matt branches: 1.14.2;
Use sizeof(__int128_t) for aarch64 and sizeof(long long) for ARM EABI
 1.13 18-Mar-2014  christos Make all __ALIGNBYTES macros return the same type (size_t)
 1.12 29-Jan-2014  matt Fix inverted GCC version test
 1.11 29-Jan-2014  matt Add a check for minimum compiler compatible with gcc 4.1
__ARM_PCS_AAPCS64 also requires __ALIGNBYTES to be 7
 1.10 28-Jan-2014  matt Deal with __ARM_ARCH_8A__
 1.9 17-Aug-2013  matt Add _ARM_ARCH_5T (needed for blx <reg> support)
 1.8 15-Aug-2013  matt Add _ARM_ARCH_T2 to indicate Thumb2 support
Don't define _ARM_ARCH_DWORD_OK disappear if compiling for Thumb1
 1.7 05-Aug-2012  matt branches: 1.7.2; 1.7.4;
Add a macro for determining whether we can use LDRD/STRD instructions
 1.6 31-Jul-2012  matt If we are using EABI (aapcs-linux), then ALIGNBYTES needs to deal with
8-byte long types.
 1.5 12-Jul-2012  matt Add more arm7 and arm6 variants.
 1.4 20-Jan-2012  joerg branches: 1.4.4;
Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.3 17-Oct-2007  garbled branches: 1.3.38; 1.3.54; 1.3.58;
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.2 26-Aug-2007  matt Move _ARM_ARCH_* from asm.h to cdefs.h so everyone can use them.
Add _END/END/ASEND which every port's asm.h should have.
Add GET_CPUFINO(rX). Reserved for future use. :)
Use %foo instead of #foo
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.44; 1.1.86; 1.1.94; 1.1.100; 1.1.102; 1.1.104; 1.1.106;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.106.1 01-Jan-2008  chris Sync with HEAD.
 1.1.104.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.1.102.1 01-Nov-2007  rjs Sync with HEAD.
 1.1.100.1 03-Sep-2007  skrll Sync with HEAD.
 1.1.94.1 03-Oct-2007  garbled Sync with HEAD
 1.1.86.1 09-Oct-2007  ad Sync with head.
 1.1.44.1 03-Sep-2007  yamt sync with head.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file cdefs.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.3.58.1 18-Feb-2012  mrg merge to -current.
 1.3.54.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.3.54.2 30-Oct-2012  yamt sync with head
 1.3.54.1 17-Apr-2012  yamt sync with head
 1.3.38.2 26-Mar-2014  matt Make the minimal alignment 8 if EABI or ldrd/strd are supported.
 1.3.38.1 19-Dec-2013  matt Pull from HEAD (for post armv6 defines).
 1.4.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.4.2 18-May-2014  rmind sync with head
 1.7.4.1 28-Aug-2013  rmind sync with head
 1.7.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.15.28.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.9 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.8 16-Jul-2002  ichiro add ixpcom to cdevsw
 1.7 19-Apr-2002  wiz branches: 1.7.2;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.6 28-Feb-2002  simonb Use "#define<tab>".
 1.5 27-Feb-2002  christos - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
 1.4 27-Oct-2001  rearnsha branches: 1.4.2;
Declare the plcom device.
 1.3 16-Sep-2001  matt branches: 1.3.2;
Add cdev_decl for new devices in conf.c
 1.2 09-Sep-2001  toshii branches: 1.2.2;
Readd sacom to cdevsw.
 1.1 03-Sep-2001  matt branches: 1.1.2;
Switch netwinder to use a common conf.c for the arm ports.
 1.1.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.2.7 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 09-Sep-2001  thorpej file conf.h was added on branch kqueue on 2001-09-13 01:13:09 +0000
 1.3.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.2.6 17-Sep-2002  nathanw Catch up to -current.
 1.4.2.5 01-Aug-2002  nathanw Catch up to -current.
 1.4.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.4.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.1 27-Oct-2001  nathanw file conf.h was added on branch nathanw_sa on 2002-02-28 04:07:32 +0000
 1.7.2.1 19-May-2002  gehenna Remove port-dependent conf.h.
 1.125 11-Jul-2023  riastradh arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.
 1.124 25-Jun-2023  skrll G/C an unused struct cpu_info member
 1.123 25-Jun-2022  jmcneill branches: 1.123.4;
pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.122 18-Dec-2021  riastradh arm: Forward-declare `struct proc' before using in prototype.
 1.121 01-Nov-2021  skrll Move arm_cache_info from cpufunc.h to cpu.h
 1.120 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.119 14-Aug-2021  ryo Improved the performance of kernel profiling on MULTIPROCESSOR, and possible to get profiling data for each CPU.

In the current implementation, locks are acquired at the entrance of the mcount
internal function, so the higher the number of cores, the more lock conflict
occurs, making profiling performance in a MULTIPROCESSOR environment unusable
and slow. Profiling buffers has been changed to be reserved for each CPU,
improving profiling performance in MP by several to several dozen times.

- Eliminated cpu_simple_lock in mcount internal function, using per-CPU buffers.
- Add ci_gmon member to struct cpu_info of each MP arch.
- Add kern.profiling.percpu node in sysctl tree.
- Add new -c <cpuid> option to kgmon(8) to specify the cpuid, like openbsd.
For compatibility, if the -c option is not specified, the entire system can be
operated as before, and the -p option will get the total profiling data for
all CPUs.
 1.118 08-Aug-2021  skrll Re-apply

Move 'struct pic_pending' from percpu to struct cpu_info. Saves a few
instructions in splx.

There is(/was) no need to use atomic operations on the percpu / cpu_info
members, so don't.

Finally removng the use of percpu should help avoid problems with "late"
attaching cpus.
 1.117 27-Mar-2021  jmcneill Revert recent pic optimizations until I have more time to work on this.
 1.116 21-Feb-2021  jmcneill branches: 1.116.2;
Keep current hardware priority value in struct cpu_info and use it instead
of reading icc_pmr_el1 in gicv3_set_priority.
 1.115 20-Feb-2021  jmcneill Move 'struct pic_pending' from percpu to struct cpu_info. Saves a few
instructions in splx.
 1.114 17-Aug-2020  mrg branches: 1.114.2;
swap sys/param.h for machine/param.h. this still obtains the
wanted COHERENCY_UNIT, while avoiding have a cascade of
failures where sys/mutex.h ends up including arm/cpu.h which
ends up including sys/resourcevar.h and then sys/mutex.h,
but as the first includer of sys/mutex.h has defined the
idempotent header define, the second one is empty, and as
kmutex_t isn't defined by the first attempt yet the kmutex_t
used in resourcevar.h generates an error.

should fix evbarm v5/v5eb, hpcarm, iyonix and zaurus builds.

tested building iyonix, zaurus and evbarmv7hf.
 1.113 16-Aug-2020  skrll G/C MP_CPU_INFO_MEMBERS
 1.112 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.111 29-Jun-2020  riastradh Implement fpu_kern_enter/leave for arm32.
 1.110 29-Mar-2020  skrll Provide a curpcb
 1.109 09-Mar-2020  christos Don't expose curproc/curlwp and other random kernel macros/functions/variables
du-jour.
 1.108 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.107 22-Jan-2020  skrll #ifdef whack-a-mole for the pmap_maxproc_set functionality
 1.106 20-Jan-2020  skrll s/_ARM_ARCH_6/ARM_MMU_EXTENDED/ in the #ifdef for the recent 4k pages
change
 1.105 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.104 15-Jan-2020  mrg port the arm64 cpu topology setup for big.little to arm.

rename arm64 cpu_do_topology() to arm_cpu_do_topology() and
call it from both arm cpu_attach().

replace both aarch64_set_topology() inline code in arm
cpu_attach() with new arm_cpu_do_topology(), which is called
by the arm64 locore as well (possibly not needed, which would
allow it to become static.)

not yet tested on a real big.little armv7 system. tested
on rockpro64 and pinebook pro.
 1.103 01-Dec-2019  ad branches: 1.103.2;
Fix false sharing problems with cpu_info. Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
the IPI bitmask and ci_want_resched.
 1.102 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.101 19-Oct-2019  jmcneill Increase aarch64 MAXCPUS to 256.
 1.100 03-Jan-2019  skrll branches: 1.100.4;
Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.99 25-Oct-2018  skrll Align struct cpu_info member names. NFC.
 1.98 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.97 22-Aug-2018  msaitoh - Cleanup for dynamic sysctl:
- Remove unused *_NAMES macros for sysctl.
- Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
use them on all m68k machines.
 1.96 01-Apr-2018  ryo branches: 1.96.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.95 24-Jan-2018  skrll branches: 1.95.2;
Remove port-acorn26

OK core@
 1.94 16-Dec-2017  mrg CPU_INFO_FOREACH() must always iterate at least the boot cpu.
document this in sys/cpu.h and fix the arm and mips versions
to check ncpu is non zero before using it as an iterator max.

this should fix the new assert in init_main.c.
 1.93 04-Apr-2017  sevan branches: 1.93.6;
Fix rcs tag.
 1.92 27-Mar-2017  skrll Expose correct cpu_number(), CPU_IS_PRIMARY() and CPU_INFO_FOREACH() for
modules so that the dtrace module works on an MP system.
 1.91 06-Mar-2017  skrll Trailing whitespace
 1.90 15-Apr-2015  matt branches: 1.90.2; 1.90.4;
Make setsoftast take a cpu_info *
 1.89 14-Apr-2015  jmcneill __HAVE_PREEEMPTION -> __HAVE_PREEMPTION
 1.88 08-Apr-2015  matt Make sure TPIDRPRw_IS_CURLWP is being used when __HAVE_PREEEMPTION is defined.
 1.87 08-Apr-2015  matt Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
 1.86 08-Apr-2015  matt Add an agnostic version of curlwp and curcpu() for modules since they won't
know if the kernel was built with TPIDRPRW_IS_CUR{LWP,CPU} or not.
 1.85 02-Apr-2015  matt Allow TPIDRPRW_IS_CURLWP to be used with MULTIPROCESSOR kernels
 1.84 23-Nov-2014  skrll branches: 1.84.2;
Fix TPIDRPRW_IS_CURLWP builds.

A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
 1.83 28-Mar-2014  matt branches: 1.83.4;
Make ddb_regs, undefined & vfp evcnt's per cpu.
 1.82 26-Feb-2014  matt Move some static/global variables to here.
 1.81 06-Nov-2013  christos use cii
 1.80 18-Aug-2013  matt Fix CLKF_INTR for EABI to (void) its argument so it isn't mark unused by the
optimizer.
 1.79 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.78 18-Aug-2013  matt If _KMEMUSER, include <sys/intr.h>
 1.77 18-Aug-2013  matt There are only 16 faults.
 1.76 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.75 28-Jan-2013  matt branches: 1.75.2;
Add a machdep.fpu_present sysctl for ld.elf_so to use in ld.so.conf to load
libc_vfp.so.
 1.74 26-Dec-2012  matt Add vfp_kernel_acquire and vfp_kernel_release prototypes.
 1.73 07-Sep-2012  matt branches: 1.73.2;
Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.72 29-Aug-2012  matt Don't use locations in .data to store exception temporaries, use decidicated
space in cpu_info instead. This also moves undefined_handler_address into
cpu_info as well.
Use the new armreg* inlines for getting TPIDRPRW register.
Add MULTIPROCESSOR version of CPU_INFO_FOREACH
 1.71 29-Aug-2012  matt Remove undeeded struct device;
 1.70 29-Aug-2012  matt Use new armv7 CP15 register to print out cache types.
If the cpu_cc_freq is set, report it.
Add macros to make inlines for reading/writing co-processor registers.
 1.69 29-Aug-2012  matt Rename ARM options PROCESS_ID_IS_CUR{CPU,LWP} to TPIDRPRW_IS_CUR{CPU,LWP}
since TPIDRPRW is the cp15 register name.
Initialize it early in start along with CI_ARM_CPUID.
Remove other initializations.
We alays have ci_curlwp.
Enable TIPRPRW_IS_CURCPU in std.beagle.
[tested on a beaglboard (cortex-a8)]
 1.68 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.67 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.66 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.65 02-Aug-2012  skrll Remove irqframe and replace with identical trapframe.
 1.64 16-Jul-2012  skrll Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"
 1.63 16-Feb-2012  christos expose cpu structures to kmemuser and prevent opt_*.h from being included
if kmemuser
 1.62 13-Nov-2010  uebayasi branches: 1.62.8; 1.62.12; 1.62.14;
Include sys/device_if.h instead of sys/device.h. machine/cpu.h is
one of the lower-most definitions. Relying on the huge sys/device.h
is not a good idea.
 1.61 13-Nov-2010  uebayasi Include sys/evcnt.h for struct evcnt.
 1.60 07-Jul-2010  chs implement ucas_* for arm.
 1.59 10-Dec-2009  rmind branches: 1.59.2; 1.59.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.58 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.57 18-Jan-2009  bjh21 Define a version of GET_CURCPU, GET_CURLWP, and GET_CURPCB for use on
old uniprocessor ARMs, and re-arrange the ifdefs so that it gets
used on 26-bit systems as well. This allows us to uniformly use these
macros everywhere.
 1.56 07-Aug-2008  matt branches: 1.56.2; 1.56.10;
Only call dosoftints() is ci_intr_depth == 0
 1.55 07-Aug-2008  matt Do fast softint processing in DO_AST_AND_RESTORE_ALIGNMENT_FAULTS.
Redo the softint mask so ci_softints >> ci_cpl != 0 becomes an easy
test for work to be done.
 1.54 27-Apr-2008  matt branches: 1.54.2; 1.54.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.53 15-Mar-2008  rearnsha branches: 1.53.2; 1.53.4;
VFP support.
 1.52 27-Feb-2008  xtraeme Remove CTL_MACHDEP_NAMES, it's not used anywhere.

Ok by martin@.
 1.51 19-Feb-2008  dogcow branches: 1.51.2; 1.51.6;
revert previous; as yamt pointed out, these bits are in <sys/cpu.h>.
 1.50 19-Feb-2008  dogcow cargo-cult CPU_INFOITERATOR and _FOREACH to make kern_prf.c build again.
These should probably be abstracted out to sys/cpu.h at some point, since
they don't really change from arch to arch.
 1.49 06-Jan-2008  matt current_intr_depth is dead. Make sure we don't use it anymore.
 1.48 11-Dec-2007  ad Add cpu_intr_p().
 1.47 17-Oct-2007  garbled branches: 1.47.2; 1.47.4; 1.47.6; 1.47.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.46 02-Oct-2007  ad Make want_resched a member of cpu_info.
 1.45 04-Aug-2007  ad branches: 1.45.2; 1.45.4; 1.45.6;
Add ci_cpuid where it's missing.
 1.44 01-Jun-2007  skrll branches: 1.44.2; 1.44.4; 1.44.6; 1.44.8;
Another missed changed for acorn26 idlelwp. Provide IRQenable/IRQdisable
macros.
 1.43 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.42 18-Feb-2007  matt branches: 1.42.4; 1.42.6; 1.42.10; 1.42.12;
Changes for newlock2.
 1.41 16-Feb-2007  ad branches: 1.41.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.40 05-Aug-2006  bjh21 Centralize the various checks for validity of a CPU context in one macro,
so we don't have to get it right in lots of different places.
 1.39 05-Apr-2006  uwe Don't define, just declare want_resched here.
 1.38 11-Dec-2005  christos branches: 1.38.4; 1.38.6; 1.38.8; 1.38.10; 1.38.12;
merge ktrace-lwp.
 1.37 11-Aug-2005  cube Change all archs that did:

#define clockframe somethingelse

to:

struct clockframe {
struct somethingelse cf_se;
};

and change access macros accordingly.

That means that, at least for that very issue, things will not go
ka-boomy if you don't have the actual definition of struct clockframe
before including systm.h.
 1.36 22-Sep-2004  yamt branches: 1.36.12;
move some per-cpu data definitions to MI place so that they can be modified
without touching all ports. discussed on tech-kern@.
 1.35 04-Jan-2004  jdolecek Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
as FPU state), and is the last potentially blocking operation;
all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
 1.34 23-Jun-2003  martin branches: 1.34.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.33 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.32 13-Oct-2002  bjh21 It appears that MI code requires ci_cpuid to be the CPU number of the CPU
in question, whereas the ARM code was using it to hold the model
identification. To fix this, rename:

ci_cpuid -> ci_arm_cpuid
ci_cputype -> ci_arm_cputype (for consistency)
ci_cpurev -> ci_arm_cpurev (ditto)
ci_cpunum -> ci_cpuid

This makes top(1) give correct CPU numbers in its "STATE" column (all 0 for
now).
 1.31 12-Oct-2002  bjh21 Remember the location of each CPU's idle PCB in struct cpu_info.
Move allocation of the idle PCB from hydra.c to cpu.c and add some
extra initialisation from cpu_fork().
 1.30 05-Oct-2002  bjh21 Minimal changes to allow a kernel with "options MULTIPROCESSOR" to compile
and boot multi-user on a single-processor machine. Many of these changes
are wildly inappropriate for actual multi-processor operation, and correcting
this will be my next task.
 1.29 16-Aug-2002  thorpej * Add a new machdep.powersave sysctl, which controls the use of
the CPU's "sleep" function in the idle loop.
* Default all CPUs to not use powersave, except for the PDA processors
(SA11x0 and PXA2x0).

This significantly reduces inteterrupt latency in high-performance
applications (and was good to squeeze another ~10% out of an XScale
IOP on a Gig-E benchmark).
 1.28 14-Aug-2002  briggs Inline SetCPSR calls where it seems prudent to do so. This avoids two
branches and allows the compiler to better utilize registers around
calls to disable/enable/restore_interrupts().
 1.27 08-May-2002  thorpej branches: 1.27.2;
Hard-wire CLKF_BASEPRI() to 0 on the ARM, since spllowersoftclock() might
not actually be able to unblock the interrupt, which would cause us
to run the softclock interrupts with hardclock blocked.

Per discussion w/ Charles Hannum.
 1.26 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.25 03-Apr-2002  thorpej Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.24 24-Mar-2002  thorpej Cache the cpu type and cpu revision in cpu_info.
 1.23 24-Mar-2002  bjh21 arm26->acorn26 transition.
 1.22 10-Mar-2002  bjh21 Add a ci_dev element to struct cpu_info, pointing to the device that
corresponds to the CPU.
 1.21 09-Mar-2002  bjh21 Replace cpu_id and cpu_ctrl in struct _cpu with ci_cpuid and ci_ctrl in
struct cpu_info. Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
 1.20 09-Mar-2002  bjh21 Move arm700bugcount into stuct cpu_info, and attach it in
identify_master_cpu().
 1.19 20-Jan-2002  thorpej Some prototype cleanup.
 1.18 21-Dec-2001  bjh21 Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
 1.17 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.16 09-Nov-2001  thorpej branches: 1.16.2;
Implement a badaddr_read() routine which performs a load of the
specified size for the caller, and returns true or false indicating
whether or not a Data Abort occurred (i.e. the address was "bad").
 1.15 10-Jul-2001  bjh21 branches: 1.15.4;
Purge CPU_ARM7500. Thanks to Reinoud's work, it's no longer needed.
 1.14 09-Jul-2001  reinoud branches: 1.14.2;
Initial commit for merging A7000/NC with the RISCPC in order to get _one_
bootable GENERAL kernel for the 3 machines.

This is done by integrating the ARM7500 in a better way. In various places
the IOMD ID is checked and action is taken at runtime compared to
compiletime.

The small piece of assembler that is changed now uses the flag
`arm7500_ioc_found' that is set up by iomd.c at startup. When this chip
isnt found at startup it will skip reading the ARM7500 extended IRQ
registers and wont clear them either.

The next step will be getting the mode-definition files to the bootloader.
Currently they are compiled in.
 1.13 14-Jun-2001  thorpej Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.12 13-May-2001  bjh21 strstr() is no longer used in the kernel. G/C it.
 1.11 24-Apr-2001  bjh21 Rather large overhaul. Mostly cosmetic, but also:

Provide PROC_PC on arm26.
Provide working CLKF_INTR on arm26.
Make setsoftast a macro everywhere.
 1.10 20-Apr-2001  matt Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.9 28-Feb-2001  bjh21 branches: 1.9.2; 1.9.4;
PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26). Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway). Someone should try running one.
 1.8 28-Feb-2001  bjh21 Large overhaul for arm26 compatibility. This file is now even more of a mess
than it was.
 1.7 27-Feb-2001  bjh21 Tidy up ARM7500 restrictions.
Also insist on precisely one of PROG32 and PROG26's being turned on.
 1.6 27-Feb-2001  reinoud cpu_number() macro has no args
 1.5 27-Feb-2001  reinoud Rollback of patch ... there was a bug in the proc.h
 1.4 27-Feb-2001  reinoud Due to changes in ../sys/proc.h ``cpu_wait(p)'' is now a function due to the
prototype defined it in ... added it to arm/vm_machdep.c since all ARM machines
are still single processor anyway
 1.3 25-Feb-2001  bjh21 Move arm32 ports over to using <arm/armreg.h>, so <cpu.h> mostly contains
NetBSD-specific definitions.

This also entails some changes to the way CPU identification is done. I hope
I've got it right.
 1.2 25-Feb-2001  bjh21 COPY_SIGCODE is never referenced in the kernel, and the comment attached to it
is out of date. Assume it's obsolete and g/c it.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.9.4.3 23-Apr-2001  bouyer Sync with HEAD.
 1.9.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.9.4.1 28-Feb-2001  bouyer file cpu.h was added on branch thorpej_scsipi on 2001-03-12 13:27:21 +0000
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.14.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.14.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.14.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.14.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.1 03-Aug-2001  lukem update to -current
 1.15.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.16.2.13 31-Dec-2002  thorpej Copy/initialize PMC state in cpu_proc_fork().
 1.16.2.12 18-Oct-2002  nathanw Catch up to -current.
 1.16.2.11 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.16.2.10 20-Jun-2002  nathanw Catch up to -current.
 1.16.2.9 17-Apr-2002  nathanw Catch up to -current.
 1.16.2.8 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.2.7 28-Feb-2002  nathanw Catch up to -current.
 1.16.2.6 08-Jan-2002  nathanw Catch up to -current.
 1.16.2.5 08-Dec-2001  thorpej Add a cpu_proc_fork(), called from uvm_proc_fork(), which takes care
of machine-dependent handling a fork() time (this is different from
forking the actual context in an LWP world). #define it away on
platforms which do not need it.

Problem noted by Gregory McGarry.
 1.16.2.4 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
26-bit ARM processors. Kernel builds, but I have no 26-bit
ARM with which I can test, at the moment.
 1.16.2.3 15-Nov-2001  thorpej PROC_PC -> LWP_PC
 1.16.2.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.16.2.1 09-Nov-2001  thorpej file cpu.h was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.27.2.1 30-Aug-2002  gehenna catch up with -current.
 1.34.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.4 24-Sep-2004  skrll Sync with HEAD.
 1.34.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1 03-Aug-2004  skrll Sync with HEAD
 1.36.12.7 17-Mar-2008  yamt sync with head.
 1.36.12.6 21-Jan-2008  yamt sync with head
 1.36.12.5 27-Oct-2007  yamt sync with head.
 1.36.12.4 03-Sep-2007  yamt sync with head.
 1.36.12.3 26-Feb-2007  yamt sync with head.
 1.36.12.2 30-Dec-2006  yamt sync with head.
 1.36.12.1 21-Jun-2006  yamt sync with head.
 1.38.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.38.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.38.8.2 11-Aug-2006  yamt sync with head
 1.38.8.1 11-Apr-2006  yamt sync with head
 1.38.6.1 22-Apr-2006  simonb Sync with head.
 1.38.4.1 09-Sep-2006  rpaulo sync with head
 1.41.2.3 08-Apr-2007  skrll Set curlwp in cpu_switchto and provide a cpu_did_resched.

Who is copying who now?
 1.41.2.2 29-Mar-2007  skrll Adapt arm32. Thanks to scw for helping out.

Tested on my cats (SA1)

XXX hydra should die. i've made some changes, but no guarantees.
 1.41.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.42.12.3 03-Oct-2007  garbled Sync with HEAD
 1.42.12.2 26-Jun-2007  garbled Sync with HEAD.
 1.42.12.1 22-May-2007  matt Update to HEAD.
 1.42.10.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.42.6.1 11-Jul-2007  mjf Sync with head.
 1.42.4.4 09-Oct-2007  ad Sync with head.
 1.42.4.3 20-Aug-2007  ad Sync with HEAD.
 1.42.4.2 09-Jun-2007  ad Sync with head.
 1.42.4.1 27-May-2007  ad Sync with head.
 1.44.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.44.8.1 04-Aug-2007  jmcneill Sync with HEAD.
 1.44.6.4 28-Feb-2008  rjs Sync with HEAD.
 1.44.6.3 26-Dec-2007  rjs Sync with HEAD.
 1.44.6.2 06-Oct-2007  rjs Sync with HEAD.
 1.44.6.1 02-Oct-2007  rjs Sync with HEAD.
 1.44.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.44.2.1 07-Aug-2007  matt Sync with HEAD.
 1.45.6.1 06-Oct-2007  yamt sync with head.
 1.45.4.8 23-Mar-2008  matt sync with HEAD
 1.45.4.7 28-Jan-2008  matt Add fast softint switching support.
 1.45.4.6 09-Jan-2008  matt sync with HEAD
 1.45.4.5 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.45.4.4 06-Nov-2007  matt sync with HEAD
 1.45.4.3 09-Sep-2007  matt Make sure we won't set NULL curlwp.
 1.45.4.2 29-Aug-2007  matt If we are doing PROCESS_ID_IS_CURLWP, we don't need a ci_curlwp.
 1.45.4.1 28-Aug-2007  matt Move curpcb, curlwp, astpending, want_resched, current_spl_level,
and current_intr_depth to cpu_info.
Add support for storing either curlwp or curcpu in the ARMv6
supervisor process/thread id coprocessor register.
Add LWP0_CPU_INFO to store location of static cpu_info for lwp0 static
initialization.
Use cpsi[ed] on ARMv6.
 1.45.2.6 21-Mar-2008  chris Sync with head.
 1.45.2.5 09-Feb-2008  chris Fix acorn32 to boot. Also fix cpu.h, a change sneaked in that isn't
currently being used.
 1.45.2.4 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.45.2.3 20-Jan-2008  chris Sync to HEAD.
 1.45.2.2 01-Jan-2008  chris Sync with HEAD.
 1.45.2.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.47.8.2 08-Jan-2008  bouyer Sync with HEAD
 1.47.8.1 13-Dec-2007  bouyer Sync with HEAD
 1.47.6.1 13-Dec-2007  yamt sync with head.
 1.47.4.1 26-Dec-2007  ad Sync with head.
 1.47.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.51.6.3 28-Sep-2008  mjf Sync with HEAD.
 1.51.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.51.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.51.2.1 24-Mar-2008  keiichi sync with head.
 1.53.4.4 11-Aug-2010  yamt sync with head.
 1.53.4.3 11-Mar-2010  yamt sync with head
 1.53.4.2 04-May-2009  yamt sync with head.
 1.53.4.1 16-May-2008  yamt sync with head.
 1.53.2.1 18-May-2008  yamt sync with head.
 1.54.6.1 19-Oct-2008  haad Sync with HEAD.
 1.54.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.56.10.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.56.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.59.4.1 05-Mar-2011  rmind sync with head
 1.59.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.62.14.1 09-Aug-2012  jdc branches: 1.62.14.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.62.14.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.62.12.1 18-Feb-2012  mrg merge to -current.
 1.62.8.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.62.8.3 23-Jan-2013  yamt sync with head
 1.62.8.2 30-Oct-2012  yamt sync with head
 1.62.8.1 17-Apr-2012  yamt sync with head
 1.73.2.3 03-Dec-2017  jdolecek update from HEAD
 1.73.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.73.2.1 25-Feb-2013  tls resync with head
 1.75.2.2 18-May-2014  rmind sync with head
 1.75.2.1 28-Aug-2013  rmind sync with head
 1.83.4.1 11-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #582):
distrib/utils/embedded/conf/rpi.conf: revision 1.27
etc/etc.evbarm/Makefile.inc: revision 1.70
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.5-1.7
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.23, 1.24
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.8
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.14
sys/arch/arm/broadcom/bcm2835var.h: revision 1.2
sys/arch/arm/broadcom/files.bcm2835: revision 1.24
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.30
sys/arch/arm/cortex/armperiph.c: revision 1.8, 1.9
sys/arch/arm/cortex/gtmr.c: revision 1.9
sys/arch/arm/cortex/gtmr_var.h: revision 1.5
sys/arch/arm/cortex/mpcore_var.h: revision 1.3
sys/arch/arm/include/cpu.h: revision 1.84
sys/arch/evbarm/conf/RPI2: revision 1.1, 1.2
sys/arch/evbarm/conf/RPI2_INSTALL: revision 1.1
sys/arch/evbarm/conf/RPI: revision 1.59, 1.60
sys/arch/evbarm/conf/mk.rpi: revision 1.4
sys/arch/evbarm/conf/std.rpi: revisions 1.16-1.19 via patch
sys/arch/evbarm/rpi/genassym.cf: revision 1.2
sys/arch/evbarm/rpi/rpi.h: revision 1.4
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.1
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.57, 1.58 via patch
sys/arch/evbarm/rpi/rpi_start.S: revision 1.13
Move some options into std.rpi
--
Add __HAVE_MM_MD_CACHE_ALIASING
Pull up following revision(s) (requested by skrll in ticket #582):
Fix TPIDRPRW_IS_CURLWP builds.
--
A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.
--
Use TPIDRPRW_IS_CURLWP as it's a slight code reduction and performance
improvement.
Initial RPI2 support - it doesn't work yet. The generic timer gets messed
up somehow.
This commit changes the KVA layout of the RPI.
--
Make this compile where gtmr isn't used.
--
Spin up the non-boot CPUs, but don't allow cpu_boot_secondary_processors
to see them for now.
RPI2 nows works well with only the boot cpu.
--
Appease a KASSERT - will be remove when MULTIPROCESSOR RPI2 is fixed.
--
Add RPI2 to kernels build for both earmv[67].
Use the earmv6 built kernels to create an image that can be used on both
RPI and RPI2
--
Add an RPI2_INSTALL
 1.84.2.3 28-Aug-2017  skrll Sync with HEAD
 1.84.2.2 06-Jun-2015  skrll Sync with HEAD
 1.84.2.1 06-Apr-2015  skrll Sync with HEAD
 1.90.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.90.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.90.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.93.6.1 26-Feb-2018  snj Pull up following revision(s) (requested by skrll in ticket #566):
sys/arch/arm/include/cpu.h: 1.94
sys/arch/mips/include/cpu.h: 1.122
sys/arch/powerpc/include/cpu.h: 1.103
sys/sys/cpu.h: 1.42
CPU_INFO_FOREACH() must always iterate at least the boot cpu.
document this in sys/cpu.h and fix the arm and mips versions
to check ncpu is non zero before using it as an iterator max.
this should fix the new assert in init_main.c.
--
apply the same change for powerpc as mrg did for arm and mips:
CPU_INFO_FOREACH() must always iterate at least the boot cpu.
document this in sys/cpu.h and fix the arm and mips versions
to check ncpu is non zero before using it as an iterator max.
this should fix the new assert in init_main.c.
 1.95.2.5 18-Jan-2019  pgoyette Synch with HEAD
 1.95.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.95.2.3 20-Oct-2018  pgoyette Sync with head
 1.95.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.95.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.96.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.96.2.1 10-Jun-2019  christos Sync with HEAD
 1.100.4.1 23-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #359):

sys/arch/aarch64/aarch64/locore.S: revision 1.42
sys/arch/aarch64/aarch64/locore.S: revision 1.43
sys/arch/aarch64/aarch64/locore.S: revision 1.44
sys/arch/arm/fdt/cpu_fdt.c: revision 1.28
sys/arch/aarch64/include/cpu.h: revision 1.14
sys/arch/aarch64/include/param.h: revision 1.12
sys/arch/arm/arm32/cpu.c: revision 1.133
sys/arch/arm/arm32/cpu.c: revision 1.134
sys/arch/arm/include/cpu.h: revision 1.101
sys/arch/arm/acpi/cpu_acpi.c: revision 1.7
sys/arch/aarch64/aarch64/cpu.c: revision 1.23
sys/arch/aarch64/aarch64/cpu.c: revision 1.24
sys/arch/aarch64/aarch64/cpu.c: revision 1.25

Increase aarch64 MAXCPUS to 256.

-

Invalidate dcache before polling AP hatched status

-

Avoid overlap between BP and last AP stack. AP stacks are now in order of
increasing address order.

Spotted by and idea from mlelstv.

-

Use separate cacheline aligned arrays for mbox and hatched as before.

-

cpu_hatched_p only for MULTIPROCESSOR
 1.103.2.3 29-Feb-2020  ad Sync with head.
 1.103.2.2 25-Jan-2020  ad Sync with head.
 1.103.2.1 17-Jan-2020  ad Sync with head.
 1.114.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.116.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.123.4.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.3 26-Feb-2014  matt ci_cpu_id -> ci_arm_cpuid
 1.2 29-Aug-2012  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.16;
Use ci->ci_data.cpu_cc_freq.
Use new armreg_* macros.
 1.1 14-Aug-2012  matt Add __HAVE_CPU_COUNTER support for ARM11 and Cortex CPUs
 1.2.16.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.2.16.1 29-Aug-2012  matt file cpu_counter.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.2.8.1 18-May-2014  rmind sync with head
 1.2.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.1 29-Aug-2012  matt file cpu_counter.h was added on branch matt-nb6-plus on 2012-11-28 22:40:28 +0000
 1.2.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.2.4.2 30-Oct-2012  yamt sync with head
 1.2.4.1 29-Aug-2012  yamt file cpu_counter.h was added on branch yamt-pagecache on 2012-10-30 17:19:04 +0000
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.2 15-Feb-2020  skrll branches: 1.2.4;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.1 15-Jan-2020  mrg branches: 1.1.2;
port the arm64 cpu topology setup for big.little to arm.

rename arm64 cpu_do_topology() to arm_cpu_do_topology() and
call it from both arm cpu_attach().

replace both aarch64_set_topology() inline code in arm
cpu_attach() with new arm_cpu_do_topology(), which is called
by the arm64 locore as well (possibly not needed, which would
allow it to become static.)

not yet tested on a real big.little armv7 system. tested
on rockpro64 and pinebook pro.
 1.1.2.3 29-Feb-2020  ad Sync with head.
 1.1.2.2 17-Jan-2020  ad Sync with head.
 1.1.2.1 15-Jan-2020  ad file cpu_topology.h was added on branch ad-namecache on 2020-01-17 21:47:24 +0000
 1.2.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.1 15-Feb-2020  martin file cpu_topology.h was added on branch phil-wifi on 2020-04-08 14:07:29 +0000
 1.28 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.27 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.26 01-Apr-2018  ryo branches: 1.26.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.25 08-Jul-2015  skrll branches: 1.25.16;
Remove CPU_CORTEXA8 from a conditional - it doesn't believe there.
 1.24 14-Apr-2014  matt branches: 1.24.4;
Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.23 30-Mar-2014  matt branches: 1.23.2;
Make the ARM pmap use ASIDs, split TTBRs, and MP safe. This only happens for
ARMv6 or later CPUs. This means that on context switch that the TLBs and
caches no longer to cleaned/flushed. Also, eXecute Never (XN) protection has
been added so non-exec pages can not be run. Change the page size for ARMv6+
to be 8KB while allows a L1PT to be a normal page. This means that the L1PT
is not special. Use the XN support to only sync pages that are executed from.
 1.22 25-Feb-2014  matt Default ARM11 to ARM_MMU_V6N
 1.21 19-May-2013  rkujawa branches: 1.21.2;
Make PJ4B support code compilable.

Obtained from Marvell, Semihalf.
 1.20 10-Mar-2011  bsh branches: 1.20.4; 1.20.14;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.19 02-Oct-2010  kiyohara branches: 1.19.2;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.18 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.17 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.16 27-Feb-2009  msaitoh branches: 1.16.2; 1.16.4;
IXP425 is not ARM_ARCH_4 but ARM_ARCH_5
 1.15 14-Oct-2008  matt branches: 1.15.2; 1.15.8; 1.15.12;
Add FA526 support (compile tested only)
 1.14 27-Apr-2008  matt branches: 1.14.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.13 06-Jan-2007  christos branches: 1.13.26; 1.13.46; 1.13.48; 1.13.50;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.12 11-Dec-2005  christos branches: 1.12.20; 1.12.24;
merge ktrace-lwp.
 1.11 04-Jul-2005  bsh branches: 1.11.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.10 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.9 21-Aug-2004  rearnsha ARM10 is an architecture 5 device (not 4).

If supporting architecture 5, enable Thumb code support.

Note: we could probably enable this for 4T processors as well, but
getting interworking right is much more tricky.
 1.8 06-Sep-2003  rearnsha Add support for ARM10 class devices.
 1.7 23-May-2003  ichiro branches: 1.7.2;
support IXP425 Intel Network Processor
running on BigEndian
 1.6 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.5 09-Apr-2003  thorpej Fix a typo.
 1.4 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.3 15-Jul-2002  ichiro add support for ixp12x0
 1.2 03-May-2002  thorpej branches: 1.2.2; 1.2.6;
Add support for the Intel PXA210 and PXA250. From Hiroyuki Bessho, PR 16617.
 1.1 12-Apr-2002  thorpej branches: 1.1.2;
Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.1.2.5 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 12-Apr-2002  nathanw file cpuconf.h was added on branch nathanw_sa on 2002-04-17 00:02:30 +0000
 1.2.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 03-May-2002  jdolecek file cpuconf.h was added on branch kqueue on 2002-06-23 17:34:51 +0000
 1.2.2.2 30-Aug-2002  gehenna catch up with -current.
 1.2.2.1 21-Jul-2002  gehenna catch up with -current.
 1.7.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.1 26-Feb-2007  yamt sync with head.
 1.12.24.1 21-Feb-2007  snj branches: 1.12.24.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.12.24.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.12.20.1 12-Jan-2007  ad Sync with head.
 1.13.50.4 09-Oct-2010  yamt sync with head
 1.13.50.3 11-Aug-2010  yamt sync with head.
 1.13.50.2 04-May-2009  yamt sync with head.
 1.13.50.1 16-May-2008  yamt sync with head.
 1.13.48.1 18-May-2008  yamt sync with head.
 1.13.46.2 17-Jan-2009  mjf Sync with HEAD.
 1.13.46.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.26.1 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.14.6.1 19-Oct-2008  haad Sync with HEAD.
 1.15.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.15.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.2.1 03-Mar-2009  skrll Sync with HEAD.
 1.16.4.3 21-Apr-2011  rmind sync with head
 1.16.4.2 05-Mar-2011  rmind sync with head
 1.16.4.1 03-Jul-2010  rmind sync with head
 1.16.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.16.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.19.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.14.3 03-Dec-2017  jdolecek update from HEAD
 1.20.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.14.1 23-Jun-2013  tls resync from head
 1.20.4.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.21.2.1 18-May-2014  rmind sync with head
 1.23.2.1 10-Aug-2014  tls Rebase.
 1.24.4.1 22-Sep-2015  skrll Sync with HEAD
 1.25.16.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.25.16.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.26.2.1 10-Jun-2019  christos Sync with HEAD
 1.93 09-Oct-2025  rin arm/cpufunc.h: Fix RCSID, NFC
 1.92 26-Sep-2025  skrll arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.

PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.

These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:

op old new
 1.91 25-Sep-2025  skrll #define<tab> and other <tab> consistency
 1.90 28-Apr-2022  skrll branches: 1.90.4; 1.90.12;
G/C
 1.89 01-Nov-2021  skrll Move arm_cache_info from cpufunc.h to cpu.h
 1.88 01-Mar-2021  jmcneill Add DISABLE_INTERRUPT_SAVE(), like DISABLE_INTERRUPT() but also returns
the previous state.

Use DISABLE_INTERRUPT_SAVE()/ENABLE_INTERRUPT() in pic_splfuncs instead
of cpsid()/cpsie(). The difference here is the caller no longer specifies
which bits to disable and enable; on arm32 we continue to use I32_bit and
on aarch64 we now consistently toggle both IRQ and FIQ state.
 1.87 07-Feb-2021  jmcneill Add ENABLE_INTERRUPT() / DISABLE_INTERRUPT() macros for compatibility
with aarch64.
 1.86 03-Dec-2020  skrll Provide and use a sev() macro for the sev instruction.

While here use the correct barrier to ensure completion of memory accesses
before a couple of the sev() calls.
 1.85 31-Oct-2020  skrll branches: 1.85.2;
Fix armv6 builds by providing an armv6 is macro
 1.84 29-Sep-2020  skrll Fix RPI (armv6) build
 1.83 26-Sep-2020  skrll Define isb(), dsb(option), and dmb(option)

Catch up with vchiq upstream to allow this.
 1.82 11-Dec-2018  alnsn Don't exclude code from rump kernel build.
 1.81 20-Oct-2018  skrll Clean up around cpu_ttb and fix a bunch of builds
 1.80 29-Aug-2018  skrll Whitespace
 1.79 01-Apr-2018  ryo branches: 1.79.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.78 24-Jan-2018  skrll branches: 1.78.2;
Remove port-acorn26

OK core@
 1.77 16-Jul-2016  mrg apply some #if (ARM_MMU_V6 + ARM_MMU_V7) != 0.
now this builds on pre v6-only.
 1.76 23-Jan-2016  christos branches: 1.76.2;
Rename the cpu_id() define to cpu_idnum() so that it does not conflict with
dtrace and friends.
 1.75 17-Oct-2015  jmcneill remove tlb_flush define and change callers to use cpu_tlb_flushID directly, ok matt@
 1.74 20-Apr-2014  christos branches: 1.74.4;
include cpufunc_proto.h since things need it.
 1.73 19-Apr-2014  matt Move xscale cpu_cpwait back from cpufunc_proto.ht to cpufunc.h
 1.72 14-Apr-2014  matt Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.71 07-Apr-2014  matt Declare armv7 routines if CPU_ARMV7 is defined.
Rearrange in less random manner.
 1.70 29-Mar-2014  matt branches: 1.70.2;
cortex doesn't need xscale_setup
use arm11_setttb for arm11x6.
 1.69 28-Mar-2014  matt Use cpsie/cpsid if possible.
change cache_type to uint8_t
more ARM_MMU_EXTENDED support (ASID)
 1.68 22-Feb-2014  matt Add way_size to arm_cache_info
Fix arm67_tlb_purge prototype
 1.67 20-Feb-2014  matt Keep track of what each cache is (VIVT/VIPT/PIPT).

cpu0: 32KB/32B 2-way L1 VIPT Instruction cache
cpu0: 32KB/64B 4-way write-back-locking-C L1 PIPT Data cache
cpu0: 256KB/64B 8-way write-through L2 PIPT Unified cache
 1.66 20-Feb-2014  matt Make the tlb_flush*SE take a vaddr_t, not a u_int.
 1.65 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.64 12-Jun-2013  matt branches: 1.64.2;
Nuke cpu_pfr, just use the armreg_pfr?_read inlines
 1.63 19-May-2013  rkujawa Make PJ4B support code compilable.

Obtained from Marvell, Semihalf.
 1.62 12-Nov-2012  skrll C99 types
 1.61 19-Oct-2012  matt Add armv7_drain_writebuf (which is just a dsb).
 1.60 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.59 11-Sep-2012  matt branches: 1.59.2;
Add secondary cache range ops
 1.58 07-Sep-2012  matt Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.57 21-Jul-2012  skrll Add support for the ARM1176JZS
 1.56 14-Jul-2012  hans Support cpu_sleep() on Sheeva CPUs.
 1.55 16-Feb-2012  christos expose functions needed to compute stack traces to kmemuser
 1.54 11-Dec-2011  kiyohara branches: 1.54.2;
Require arm3_cache_flush for ARM2/ARM250.
 1.53 10-Mar-2011  bsh branches: 1.53.4; 1.53.8;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.52 02-Oct-2010  kiyohara branches: 1.52.2;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.51 19-Jun-2010  matt Cleanup the armv7 changes. Add ARM_ARCH_7. Use CPU_CORTEX instead of
CPU_CORTEXA8 everywhere since there more types of Cortex than just the A8.
CPU_CORTEXA8 still exists but causes CPU_CORTEX to be defined.
Add CPU_CORTEXA9 as well. Use .arch armv7a to get us the isb/dsb
instructions.

Test booted to root device prompt on a Beagleboard.
All ARM kernels successfully test built.
 1.50 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.49 21-Oct-2008  matt branches: 1.49.12; 1.49.14; 1.49.16;
Use #ifdef, not #if
 1.48 17-Oct-2008  cliff use generic enable_interrupts() and disable_interrupts() instead of
armv6-specific interrupt control ops when _ARM_ARCH_6 not defined
 1.47 15-Oct-2008  matt Add fa526_flush_prefetchbuf
 1.46 14-Oct-2008  matt Add FA526 support (compile tested only)
 1.45 27-Apr-2008  matt branches: 1.45.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.44 25-Feb-2008  dogcow branches: 1.44.2; 1.44.4;
we need I32_bit, so #include <arm/armreg.h>
 1.43 24-Feb-2008  chris Micro-optimizations for arm.

Make enable and disable interrupts one instruction shorter.

Make cpu_cpwait() do nothing on anything other than an xscale, where it
will still call via the cpufuncs table.

This avoids loading a function from cpufuncs and then branching into it. On
older hardware the function does nothing, so this is just a waste of CPU
cycles.
 1.42 17-Oct-2007  garbled branches: 1.42.12; 1.42.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.41 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.40 04-Mar-2007  bjh21 branches: 1.40.2; 1.40.10; 1.40.16; 1.40.18; 1.40.20; 1.40.22;
Finally make cpufuncs work properly on acorn26, since something seems to be
using it. This entailed adding support for ARM2 and ARM2as, and allowing
for getting CPU IDs other than from CP15, since ARM2(as) doesn't have CP15.
 1.39 04-Mar-2007  bjh21 Un-__P.
 1.38 06-Jan-2007  christos branches: 1.38.2;
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.37 28-Dec-2005  perry branches: 1.37.20; 1.37.24;
inline -> __inline
 1.36 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.35 11-Dec-2005  christos merge ktrace-lwp.
 1.34 04-Jul-2005  bsh branches: 1.34.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.33 03-Jun-2005  rearnsha Very basic support for the ARM1136.

This code takes no advantage of any 'new' features provided by
architecture 6 devices (such as physically tagged caches or new
MMU features), and basically runs the chip in a 'legacy v5' mode.
 1.32 02-Jun-2005  uwe Drop parameter names from prototypes to avoid shadowing warnings.
 1.31 07-Aug-2004  rearnsha Changing the interrupt mask is a scheduling barrier.
 1.30 26-Jan-2004  rearnsha Switch the ARM9 to using the Dcache in write-back mode. Avoid an
unknown problem with dcache_inv_range by using a wbinv for now
(similarly for ARM10).

When setting the ARM9 system control register, use the computed
cpuctrlmask value (not 0xffffffff) so that the clocking-mode bits are
not reset to FastBus mode (which isn't very fast).
 1.29 06-Sep-2003  rearnsha Add processor-specific declarations for ARM10 class processors.
 1.28 06-Sep-2003  rearnsha Fix declarations of primary cache variables, so that they are
declarations, not definitions.
 1.27 23-May-2003  ichiro branches: 1.27.2;
support IXP425 Intel Network Processor
running on BigEndian
 1.26 14-Aug-2002  thorpej Garbage-collect some unused routines.
 1.25 14-Aug-2002  briggs Inline SetCPSR calls where it seems prudent to do so. This avoids two
branches and allows the compiler to better utilize registers around
calls to disable/enable/restore_interrupts().
 1.24 15-Jul-2002  ichiro add support for ixp12x0
 1.23 03-May-2002  rjs branches: 1.23.2; 1.23.4;
Use processor specific versions of ARM cache control functions for SA1100
and SA1110 instead of using SA110 ones.

Rename common StrongARM functions from sa110_* to sa1_*.

Reviewed by Jason Thorpe.
 1.22 03-May-2002  thorpej Add support for the Intel PXA210 and PXA250. From Hiroyuki Bessho, PR 16617.
 1.21 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.20 09-Apr-2002  thorpej * Move the code that cleans the XScale mini-data cache into its
own function.
* Add a new function which sets up the mini-data cache clean area
properly.
 1.19 26-Mar-2002  thorpej Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.18 30-Jan-2002  thorpej Add prototype for sa11x0_cpu_sleep().
 1.17 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.16 24-Jan-2002  briggs Two changes for XScale:
1) Add defparam XSCALE_CCLKCFG to define a parameter for the
CCLKCFG register. Default it to '9' on the IQ80310.
2) Add a sleep call to the xscale CPU function vector (replacing
the nullop) which should drop the CPU into "idle" mode when
cpu_switch finds nothing on the run queues.
 1.15 20-Dec-2001  thorpej * Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.14 29-Nov-2001  thorpej Fetch cache info from the Cache Type register on ARM7TDMI and "greater"
processors. Report this when the processor is attached.
 1.13 28-Nov-2001  thorpej Add prototypes for new XScale write-through cache routines.
 1.12 19-Nov-2001  thorpej Add a "cpwait" cpufunc, currently a nullop on all but XScale.
"cpwait" ensures that all coprocessor operations have completed
before returning.
 1.11 14-Nov-2001  thorpej branches: 1.11.2;
* Give the XScale its own cpu_control() entry point; we have to flush
the Branch Target Buffer of the BPRD bit changes.
* Enable Branch Prediction on the XScale by default.
* Don't invalidate the Branch Target Buffer explicitly. the i80200
manual (section 5.1, Branch Target Buffer Operation) notes that
manual software management of the BTB is unnecessary; it is flushed
implicitly when:
* processor resets
* FCSE process ID is written
* I-cache is invalidated
 1.10 18-Oct-2001  rearnsha Add support calls for ARM9.

Where ARM9, StrongARM and XScale share the same function, rename it
as armv4_XXX.
 1.9 14-Oct-2001  bjh21 Make the declaration of get_pc_str_offset() into a prototype.
 1.8 26-Aug-2001  matt Add xscale cpu functions
 1.7 20-Aug-2001  wiz Fix typo in comment (suceed).
 1.6 05-Jun-2001  bjh21 branches: 1.6.2;
Add get_pc_str_offset(), which returns the offset between the address of an
instruction that stores the program counter and the value of PC that's stored.
This can vary between ARM implementations, but is guaranteed to be constant on
a given one.
 1.5 03-Jun-2001  chris Add support for ARM7TDMI, as provided in a patch from John Fremlin to port-arm32.

Shouldn't effect any currently in tree ports.
 1.4 02-Jun-2001  bjh21 Replace arm6_dataabt_fixup() and arm7_dataabt_fixup() with early_abort_fixup()
and late_abort_fixup(), based on the abort model in use, rather than the CPU
type. This cleans up the code and makes it smaller. Only tested on an
ARM6 -- I can't find my ARM710a card right now.
 1.3 02-Jun-2001  bjh21 Initial cpufunc operations for ARM3. Not actually used yet.
 1.2 06-Mar-2001  bjh21 branches: 1.2.2;
Create cpufunc_null_fixup() to replace all the CPU-specific abort-fixup
routines that did nothing.
 1.1 23-Feb-2001  reinoud branches: 1.1.2;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 06-Mar-2001  bouyer file cpufunc.h was added on branch thorpej_scsipi on 2001-03-12 13:27:21 +0000
 1.6.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.6.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.6.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.11.2.8 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.11.2.7 01-Aug-2002  nathanw Catch up to -current.
 1.11.2.6 20-Jun-2002  nathanw Catch up to -current.
 1.11.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.11.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.11.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.11.2.1 14-Nov-2001  nathanw file cpufunc.h was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.23.4.1 18-Nov-2002  he Pull up revision 1.26 (requested by thorpej in ticket #682):
Garbage-collect some unused routines.
 1.23.2.2 30-Aug-2002  gehenna catch up with -current.
 1.23.2.1 21-Jul-2002  gehenna catch up with -current.
 1.27.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.27.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.27.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.27.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.27.2.1 03-Aug-2004  skrll Sync with HEAD
 1.34.2.5 27-Feb-2008  yamt sync with head.
 1.34.2.4 27-Oct-2007  yamt sync with head.
 1.34.2.3 03-Sep-2007  yamt sync with head.
 1.34.2.2 26-Feb-2007  yamt sync with head.
 1.34.2.1 21-Jun-2006  yamt sync with head.
 1.37.24.1 21-Feb-2007  snj branches: 1.37.24.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/cpufunc.h: revision 1.38
sys/arch/arm/arm/cpufunc.c: revision 1.78
sys/arch/arm/arm/cpufunc_asm_arm10.S: revision 1.6
sys/arch/arm/include/armreg.h: revision 1.37
sys/arch/arm/arm32/cpu.c: revision 1.64
sys/arch/arm/arm/cpufunc_asm_armv5.S: revision 1.3
sys/arch/arm/include/cpuconf.h: revision 1.13
sys/arch/arm/conf/files.arm: revision 1.82
sys/arch/arm/arm/cpufunc_asm_armv5_ec.S: revision 1.1
Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/31/0000.html
Patch to add support for ARM9E
 1.37.24.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.37.20.1 12-Jan-2007  ad Sync with head.
 1.38.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.40.22.5 23-Mar-2008  matt sync with HEAD
 1.40.22.4 08-Nov-2007  matt sync with -HEAD
 1.40.22.3 06-Nov-2007  matt sync with HEAD
 1.40.22.2 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.40.22.1 29-Aug-2007  matt Make arm11 use the armv6 cpufuncs.
 1.40.20.3 21-Mar-2008  chris Sync with head.
 1.40.20.2 20-Jan-2008  chris Sync to HEAD.
 1.40.20.1 01-Jan-2008  chris Sync with HEAD.
 1.40.18.1 02-Oct-2007  joerg Sync with HEAD.
 1.40.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.40.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.40.10.1 03-Oct-2007  garbled Sync with HEAD
 1.40.2.1 09-Oct-2007  ad Sync with head.
 1.42.16.3 17-Jan-2009  mjf Sync with HEAD.
 1.42.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.42.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.42.12.1 24-Mar-2008  keiichi sync with head.
 1.44.4.4 09-Oct-2010  yamt sync with head
 1.44.4.3 11-Aug-2010  yamt sync with head.
 1.44.4.2 04-May-2009  yamt sync with head.
 1.44.4.1 16-May-2008  yamt sync with head.
 1.44.2.1 18-May-2008  yamt sync with head.
 1.45.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.45.6.1 19-Oct-2008  haad Sync with HEAD.
 1.49.16.3 21-Apr-2011  rmind sync with head
 1.49.16.2 05-Mar-2011  rmind sync with head
 1.49.16.1 03-Jul-2010  rmind sync with head
 1.49.14.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.49.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.49.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.52.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.53.8.1 18-Feb-2012  mrg merge to -current.
 1.53.4.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.53.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.53.4.2 30-Oct-2012  yamt sync with head
 1.53.4.1 17-Apr-2012  yamt sync with head
 1.54.2.1 09-Aug-2012  jdc branches: 1.54.2.1.2;
Pull up revisions:
src/sys/arch/evbarm/dev/plcomreg.h revisions 1.2,1.3,1.4
src/sys/arch/evbarm/conf/INTEGRATOR revision 1.65
src/sys/arch/evbarm/dev/plcom.c revisions 1.34,1.35,1.36,1.37,1.38,1.39,1.40
src/sys/arch/evbarm/ifpga/plcom_ifpga.c revisions 1.12,1.13,1.14
src/sys/arch/evbarm/dev/plcomvar.h revisions 1.9,1.10,1.11
src/sys/arch/evbarm/ifpga/plcom_ifpgavar.h revision 1.2
src/sys/arch/arm/arm/cpufunc.c revisions 1.105,1.108
src/sys/arch/arm/arm32/cpu.c revision 1.79
src/sys/arch/arm/include/armreg.h revisions 1.49,1.54
src/sys/arch/arm/arm32/pmap.c revision 1.229
src/sys/arch/arm/arm32/arm32_machdep.c revision 1.77
src/sys/arch/arm/include/cpu.h revision 1.64
src/sys/arch/arm/arm/cpufunc_asm_arm1136.S revision 1.3
src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S revision 1.1
src/sys/arch/arm/conf/files.arm revision 1.106
src/sys/arch/arm/include/cpufunc.h revision 1.57
src/sys/dev/sdmmc/sdhc.c revisions 1.14,1.24
src/sys/dev/sdmmc/sdhcvar.h revisions 1.7,1.8
src/sys/arch/evbarm/ifpga/ifpgareg.h revision 1.4
src/sys/arch/evbarm/integrator/integrator_machdep.c revision 1.69
src/sys/arch/arm/broadcom/bcm2835_dma.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_emmc.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_intr.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_obio.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_plcom.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pm.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_pmvar.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835_space.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835_tmr.c revision 1.1
src/sys/arch/arm/broadcom/bcm2835reg.h revision 1.1
src/sys/arch/arm/broadcom/bcm2835var.h revision 1.1
src/sys/arch/arm/broadcom/bcm_amba.h revision 1.1
src/sys/arch/arm/broadcom/files.bcm2835 revision 1.1
src/sys/arch/evbarm/Makefile revision 1.9
src/sys/arch/evbarm/conf/RPI revision 1.1
src/sys/arch/evbarm/conf/files.rpi revision 1.1
src/sys/arch/evbarm/conf/mk.rpi revision 1.1
src/sys/arch/evbarm/conf/std.rpi revision 1.1
src/sys/arch/evbarm/rpi/genassym.cf revision 1.1
src/sys/arch/evbarm/rpi/rpi.h revision 1.1
src/sys/arch/evbarm/rpi/rpi_machdep.c revision 1.1
src/sys/arch/evbarm/rpi/rpi_start.S revision 1.1,1.2
src/etc/etc.evbarm/Makefile.inc revision 1.28
(requested by skrll in ticket #454).

don't mix #define<TAB> and #define<SPACE> in a file.

avoid warning with options PLCOM_DEBUG for INTEGRATOR.

Rename register values. No functional change - same code before and after.

Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.

Replace the simple_lock with a kmutex_t. Update the locking to match
com(4) in the few places it didn't already.

DOH. Replace a line that got accidently deleted in the last commit.

device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t

Add the 'Z' to the 1176 cpu product name.

ok matt@

Fix locking botch introduced in 1.36.

Fix a KASSERT. From/OK'ed by matt@

Fix racy softint dispatch that lead to KASSERT(si->si_active) in
softint_execute

Discussed with matt@. "Looks good to me"

Add the documented ARM11[37]6 Auxiliary control register defines.

Add support for the ARM1176JZS

Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).

Provide a method for attachments to specify capabilites.

Add support for the PL011 to plcom. Pull across a bunch of fixes from
com(4) while I'm here and do some other tidyup.

Tested on a RaspberryPi.

PL010 not tested.

Initial commit of support for the RaspberryPI (www.raspberrypi.org)

This is enough for serial console via the gpio header pins and to get to
multiuser.

A huge thank you to Matt Thomas for all his help.

Add RPI to KERNEL_SETS

Remove #if 0 code.
 1.54.2.1.2.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.59.2.4 03-Dec-2017  jdolecek update from HEAD
 1.59.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.59.2.2 23-Jun-2013  tls resync from head
 1.59.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.64.2.1 18-May-2014  rmind sync with head
 1.70.2.1 10-Aug-2014  tls Rebase.
 1.74.4.3 05-Oct-2016  skrll Sync with HEAD
 1.74.4.2 19-Mar-2016  skrll Sync with HEAD
 1.74.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.76.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.78.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.78.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.78.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.78.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.79.2.1 10-Jun-2019  christos Sync with HEAD
 1.85.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.85.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.90.12.1 01-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #40):

sys/arch/arm/include/cpufunc.h: revision 1.92
sys/arch/arm/arm32/bus_dma.c: revision 1.150

arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.
PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.
These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:
op old new
 1.90.4.1 01-Oct-2025  martin Pull up following revision(s) (requested by skrll in ticket #1166):

sys/arch/arm/arm32/bus_dma.c: revision 1.142
sys/arch/arm/include/cpufunc.h: revision 1.92
sys/arch/arm/arm32/bus_dma.c: revision 1.150

More KNF


arm: Adjust barriers issued in bus_dmamap_sync for the coherent case.
PR/59654

This change adjusts the memory barriers issued by bus_dmamap_sync for
the coherent case. In the non-coherent case the CPU cache operations
are expected to provide any, and all required barriers.

These barriers are emitted after bouncing for PREWRITE and before
bouncing for POSTREAD.

A new indrection is introduced to deal with the differencs in barrier
(dsb) options between Arm V8 and V7, the lack of options in Arm V6,
and the need to use cpu_drain_writebuf for all other earlier versions.

The Arm V8 Net change is:
op old new
 1.8 10-Aug-2018  maxv Retire CPU_ARM2, CPU_ARM250 and CPU_ARM3, they are all leftovers of
acorn26.

ok jmcneill@ skrll@
 1.7 25-Aug-2017  christos branches: 1.7.2; 1.7.4;
fix the build (rump does not have opt_foo.h)
 1.6 24-Aug-2017  jmcneill Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.5 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.4 15-Apr-2015  hsuenaga clean up cpufuncs of CPU_PJ4B.

PJ4B is a ARMv7 compatible CPU, so most of cpufuncs are just redundant.
we need funcs for:
- Marvell specific registers
- workaround of errata
- and Marvell specific L2 cache maintainance
if I/O coherency fabric is enabled(option AURORA_IO_CACHE_COHERENCY),
probaly we don't need to maintain L2 cache by software.
 1.3 13-Sep-2014  matt branches: 1.3.2;
vm_offset_t -> vaddr_t, vm_size_t -> vsize_t
nuke vm_offset_t and vm_size_t
 1.2 19-Apr-2014  matt branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10;
Move xscale cpu_cpwait back from cpufunc_proto.ht to cpufunc.h
 1.1 14-Apr-2014  matt Support (untested) SHEEVA_L2_CACHE and SHEEVA_L2_CACHE_WT options.
Move prototypes out to <arm/cpufunc.h> to their own file.
Add sdcache routines to cpufunc_asm_sheeva.S
Add code sheeve_setup to init the sdcache and sdcache info.
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 19-Apr-2014  tls file cpufunc_proto.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.2.6.2 10-Aug-2014  tls Rebase.
 1.2.6.1 19-Apr-2014  tls file cpufunc_proto.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 19-Apr-2014  yamt file cpufunc_proto.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 19-Apr-2014  rmind file cpufunc_proto.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 06-Jun-2015  skrll Sync with HEAD
 1.7.4.1 10-Jun-2019  christos Sync with HEAD
 1.7.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14 10-Mar-2002  bjh21 Re-work the way that FPAs are handled. If ARMFPE isn't configured, don't
even bother probing for an FPA. If ARMFPE is configured, always use it,
even if there's an FPA (since it provides the FPA support code). Move all
printfs about FPAs into armfpe_init.c.

This means I can delete the last two elements from struct _cpu, so that the
structure, and the whole of <arm/cpus.h> is redundant and can be deleted.
 1.13 10-Mar-2002  bjh21 Remove fpu_model from struct _cpu. Instead, have initialise_arm_fpe()
printf() the FPE version number itself.
 1.12 10-Mar-2002  bjh21 Kill the fpu_flags element from struct _cpu. It was only ever set to 0
anyway.
 1.11 09-Mar-2002  bjh21 Remove the cpu_model member from struct _cpu, and just use the cpu_model
variable directly. While we're at it, make cpu_model rather larger.
 1.10 09-Mar-2002  bjh21 Remove the cpu_class element from struct _cpu, and make it a local variable
in identify_arm_cpu(), since it's almost unused elsewhere.

Change the detection of bugged StrongARMs to use the cpu ID rather than the
class. This turns "almost" into "entirely".
 1.9 09-Mar-2002  bjh21 Replace cpu_id and cpu_ctrl in struct _cpu with ci_cpuid and ci_ctrl in
struct cpu_info. Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
 1.8 11-Mar-2001  bjh21 branches: 1.8.2; 1.8.4; 1.8.10;
G/C more unused elements of struct _cpu.
 1.7 10-Mar-2001  bjh21 Change the meaning of cpu_class. It now has one value for each core we
support, which corresponds to one for each CPU_* option, or one for each
cpufunc structure.

Also remove some more residual code for the support of multiple and non-ARM
CPUs.
 1.6 04-Mar-2001  bjh21 branches: 1.6.2;
Make "options ARMFPE" work again.
Mostly due to Richard Earnshaw.
 1.5 03-Mar-2001  bjh21 Kill cpu_host and cpu_flags: they weren't having any practical effect.
 1.4 26-Feb-2001  bjh21 Nothing in this file needs <sys/param.h>, so stop including it.
 1.3 26-Feb-2001  bjh21 The cpu_local and cpu_cd elements of struct _cpu were utterly unused. Remove
them.
 1.2 25-Feb-2001  bjh21 The cpu_type element of struct _cpu was only used in identify_arm_cpu().
Make it a local variable.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.6.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.8.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.8.10.1 11-Mar-2001  nathanw file cpus.h was added on branch nathanw_sa on 2002-04-01 07:39:10 +0000
 1.8.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.8.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.8.2.1 11-Mar-2001  bouyer file cpus.h was added on branch thorpej_scsipi on 2001-03-12 13:27:21 +0000
 1.20 31-Jan-2025  jmcneill aarch64: Identify Cortex-A520, Cortex-A720 cores
 1.19 09-Dec-2024  jmcneill arm64: Identify Qualcomm Oryon CPUs
 1.18 07-Oct-2024  jakllsch CPU ID strings for Arm Cortex-A710, Neoverse V1, Neoverse N2, and Fujitsu A64FX
 1.17 27-Sep-2024  jakllsch Add Ampere 1 and 1A CPU IDs
 1.16 13-Nov-2021  simonb branches: 1.16.4; 1.16.10;
Fix tyop in a comment.
 1.15 12-Nov-2021  skrll Print a big warning about trying to run on early ThunderX parts
 1.14 30-Aug-2021  jmcneill Identify Apple M1 "Icestorm" and "Firestorm" CPU types.
 1.13 01-Jul-2020  ryo add workaround for Neoverse N1 erratum 1542419
 1.12 27-Jan-2020  skrll Identify the Denver2 CPU in the Nvidia TX2
 1.11 28-Dec-2019  jmcneill branches: 1.11.2;
Identify Arm Neoverse E1 and N1 CPUs.
 1.10 08-Sep-2019  tnn cpu identification macros for A17
 1.9 07-Sep-2019  tnn Cortex A12 is marketed as A17 but has a distinct part number

observed on Rockchip RK3288
 1.8 16-Jul-2019  jmcneill branches: 1.8.2;
Add Ampere eMAG 8180 cpuid
 1.7 19-Jun-2019  mrg add several cortex CPU implementations found in their TRMs:
- A32 R1 (aarch32 only, not supported)
- A35 R1
- A65 R0
- A76AE R1
- A77

add the aarch64 ones to cpu.c for identification.
 1.6 09-May-2019  mrg add cortex A-76 detection.
 1.5 03-Jan-2019  jmcneill Add CPU_ID_CORTEXA15R4
 1.4 24-Nov-2018  skrll Add some ThunderX CPU Ids
 1.3 03-Oct-2018  skrll Add some Cavium CPU_IDs (implementor and primary part number only aka
CPU_PARTMASK)
 1.2 01-May-2018  ryo branches: 1.2.2;
fix define of CPU IDs
* fix incorrect CPU_ID of APM/APPLE
* add CPU_ID of SAMSUNG
* fix typo about BROADCOM
 1.1 20-Mar-2018  ryo branches: 1.1.2;
separate cputypes.h for CPU_ID_* from armreg.h,
and add some implementor IDs, CortexA55,73,75 IDs.

(preliminary changes for merging aarch64)
 1.1.2.6 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.5 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.4 20-Oct-2018  pgoyette Sync with head
 1.1.2.3 02-May-2018  pgoyette Synch with HEAD
 1.1.2.2 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1.2.1 20-Mar-2018  pgoyette file cputypes.h was added on branch pgoyette-compat on 2018-03-22 01:44:42 +0000
 1.2.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.8.2.1 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #589):

sys/arch/arm/include/cputypes.h: revision 1.11
sys/arch/aarch64/aarch64/cpu.c: revision 1.31

Identify Arm Neoverse E1 and N1 CPUs.
 1.11.2.1 29-Feb-2020  ad Sync with head.
 1.16.10.1 02-Aug-2025  perseant Sync with HEAD
 1.16.4.1 03-Oct-2024  martin Pull up following revision(s) (requested by jakllsch in ticket #922):

sys/arch/aarch64/aarch64/cpu.c: revision 1.79
sys/arch/arm/include/cputypes.h: revision 1.17
usr.sbin/cpuctl/arch/aarch64.c: revision 1.24
sys/arch/aarch64/aarch64/cpu.c: revision 1.80

Add Ampere 1 and 1A CPU IDs

refine previous
add Ampere 1 and 1A
 1.2 09-May-2024  pho kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.
 1.1 15-Feb-2020  skrll branches: 1.1.2; 1.1.6;
Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 15-Feb-2020  martin file cpuvar.h was added on branch phil-wifi on 2020-04-08 14:07:29 +0000
 1.1.2.2 29-Feb-2020  ad Sync with head.
 1.1.2.1 15-Feb-2020  ad file cpuvar.h was added on branch ad-namecache on 2020-02-29 20:18:19 +0000
 1.28 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.27 01-Apr-2018  ryo branches: 1.27.14;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.26 24-Jan-2018  skrll branches: 1.26.2;
Remove port-acorn26

OK core@
 1.25 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.24 20-Feb-2017  skrll Trailing whitespace.
 1.23 20-Feb-2017  skrll Whitespace
 1.22 13-Sep-2014  matt branches: 1.22.2; 1.22.4; 1.22.6;
Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.21 30-Mar-2014  skrll Provide a DDB_REGS in the same way to others. Makes crash buildable.
 1.20 28-Mar-2014  matt Make ddb_registers per-cpu. All switching of CPUs (xxx doesn't work yet).
 1.19 05-Mar-2014  matt Define all the instruction conditions.
Use __SHIFTOUT to get the condition.
Add bool arm_cond_ok_p(uint32_t insn, uint32_t psr) inline
Add tlbtr inline
 1.18 16-Feb-2012  christos branches: 1.18.2; 1.18.4;
include <sys/types.h>; things included from here need it.
 1.17 26-May-2011  joerg branches: 1.17.4; 1.17.8;
Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD.
 1.16 14-Mar-2009  dsl branches: 1.16.4; 1.16.6;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.15 29-Aug-2008  matt branches: 1.15.2; 1.15.8;
Remove non-__ELF__ snippets.
 1.14 06-Jan-2007  christos branches: 1.14.46; 1.14.50; 1.14.52; 1.14.56;
Fix branch handling in ddb. From Bucky Katz.
 1.13 10-May-2006  skrll branches: 1.13.8;
Fix a bunch of cast lvalues.
 1.12 08-May-2006  skrll s/4/BKPT_SIZE/ in PC_ADVANCE
 1.11 05-Apr-2006  uwe Define ddb_regs in db_interface.c.
Change its definion in db_machdep.h into a declaration.
 1.10 01-Apr-2006  cherry closes: PR kern/32359

modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.

Patch from cherry@mahiti.org
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 09-Jul-2003  thorpej branches: 1.8.16;
Make faulting in DDB continue back in the top-level command
loop properly.
 1.7 29-Apr-2003  scw branches: 1.7.2;
Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
 1.6 28-Apr-2003  briggs Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.5 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.4 13-May-2001  bjh21 branches: 1.4.2; 1.4.8;
Make use of a.out or ELF symbols dependent on the compile-time definition of
__ELF__.
 1.3 11-Mar-2001  bjh21 branches: 1.3.2;
Make this suitable for use on arm26 as well.
 1.2 04-Mar-2001  matt branches: 1.2.2;
s/vm_offset_t/vaddr_t/g
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 11-Mar-2001  bouyer file db_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.4.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.8.1 13-May-2001  nathanw file db_machdep.h was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.2 26-Feb-2007  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.2 11-May-2006  elad sync with head
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.2 24-May-2006  yamt sync with head.
 1.9.8.1 11-Apr-2006  yamt sync with head
 1.9.6.2 01-Jun-2006  kardel Sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.13.8.1 12-Jan-2007  ad Sync with head.
 1.14.56.1 19-Oct-2008  haad Sync with HEAD.
 1.14.52.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14.50.1 04-May-2009  yamt sync with head.
 1.14.46.1 28-Sep-2008  mjf Sync with HEAD.
 1.15.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.2.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 31-May-2011  rmind sync with head
 1.17.8.1 18-Feb-2012  mrg merge to -current.
 1.17.4.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.17.4.1 17-Apr-2012  yamt sync with head
 1.18.4.1 18-May-2014  rmind sync with head
 1.18.2.2 03-Dec-2017  jdolecek update from HEAD
 1.18.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.22.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.22.2.1 28-Aug-2017  skrll Sync with HEAD
 1.26.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.27.14.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.14 24-May-2022  andvar s/dosen't/doesn't/ in copy pasted comment.
 1.13 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.12 27-May-2013  msaitoh branches: 1.12.32;
Fix comment. arm ports which don't explicitly set LABELUSESMBR use MBR
partitioning.
 1.11 07-May-2013  matt Make all ports use a common disklabel.h with MAXPARTITIONS set to 16.
Only RAW_PART varies between ports.
 1.10 30-Aug-2011  bouyer branches: 1.10.2; 1.10.12;
Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.9 23-Nov-2009  pooka If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
 1.8 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.7 11-Dec-2005  christos branches: 1.7.80; 1.7.88; 1.7.94;
merge ktrace-lwp.
 1.6 12-Jun-2005  dyoung Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
 1.5 02-Jun-2005  he Adapt to shadowing and qualifier-cast warnings.
 1.4 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.3 10-May-2003  thorpej branches: 1.3.2;
Remove redundant bounds_check_with_label() prototype.
 1.2 25-Nov-2001  thorpej G/c the unused (and #if 0'd) bits of cpu_disklabel. Fetch disklabel_acorn.h
from the correct place.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file disklabel.h was added on branch thorpej_scsipi on 2001-01-10 19:02:06 +0000
 1.3.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.7.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.80.2 11-Mar-2010  yamt sync with head
 1.7.80.1 04-May-2009  yamt sync with head.
 1.10.12.1 23-Jun-2013  tls resync from head
 1.10.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.32.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2 26-Nov-2001  thorpej Moved to <sys/disklabel_acorn.h>
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file disklabel_acorn.h was added on branch thorpej_scsipi on 2001-01-10 19:02:07 +0000
 1.7 20-Aug-2022  riastradh machine/efi.h: Migrate common definitions to dev/efi/efi.h.
 1.6 20-Aug-2022  riastradh arm/efi.h: Add explicit padding to efi_systbl.
 1.5 20-Aug-2022  riastradh arm/efi.h: Assert size of struct efi_systbl.
 1.4 20-Aug-2022  riastradh arm/efi.h, x86/efi.h: Fix whitespace around RCS id.

No functional change intended.
 1.3 20-Aug-2022  riastradh arm/efi.h: Fix whitespace. No functional change intended.
 1.2 20-Aug-2022  riastradh machine/efi.h: Add more memory descriptor attributes.
 1.1 28-Oct-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for EFI runtime services on aarch64.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 28-Oct-2018  christos file efi.h was added on branch phil-wifi on 2019-06-10 22:05:54 +0000
 1.1.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.1 28-Oct-2018  pgoyette file efi.h was added on branch pgoyette-compat on 2018-11-26 01:52:19 +0000
 1.1 10-Jul-2023  rin Factor out some fdt(4) features from {,evb}arm into dev/fdt.

Now, FDT-based support to efirt, initrd, rndseed, and efirng can be
used from, e.g., riscv.

Mostly from Nick Hudson.

XXX
As Nick comments, there can be some optimizations for fdt_map_range().
efiboot may also be modified to load these objects into aligned PAs.
 1.1 12-Aug-2013  matt branches: 1.1.2; 1.1.6; 1.1.10;
Add EHABI unwind stubs to libkern so prevent errors in linking if unwind
tables are present.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 12-Aug-2013  tls file ehabi.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 12-Aug-2013  yamt file ehabi.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.2.2 28-Aug-2013  rmind sync with head
 1.1.2.1 12-Aug-2013  rmind file ehabi.h was added on branch rmind-smpnet on 2013-08-28 23:59:12 +0000
 1.19 06-Nov-2017  christos Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.
 1.18 10-Aug-2017  joerg Add IRELATIVE support for ARM, X86 and PowerPC.
 1.17 25-Feb-2014  matt branches: 1.17.6;
Fix thinko.
 1.16 24-Feb-2014  matt If we are dumping a EABI coredump, set the version to EABI5.
If we are dumping a BE coredump on a BE8 system, set the BE8 flag.
 1.15 29-Jan-2014  matt Remove AArch64 stuff.
 1.14 29-Oct-2013  matt Add AARCH64 definitions
 1.13 07-Aug-2013  matt Add more relocs
 1.12 05-Aug-2013  matt Add EF_ARM_BE8
Make sure that running a program, that it right big-endian format for the
processor. (BE8 for armv7, BE32 for all others).
 1.11 24-Apr-2013  matt branches: 1.11.4;
Add PT_ARM_EXIDX
 1.10 05-Aug-2012  matt branches: 1.10.2;
Add ABI version stuff.
 1.9 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.8 30-May-2009  skrll branches: 1.8.12; 1.8.20;
Add TLS relocation definitions.
 1.7 08-Sep-2006  he branches: 1.7.60; 1.7.78;
Provide ELF64_MACHDEP_ID_CASES and ELF64_MACHDEP_ENDIANNESS patterned
after the other 32-bit ports, so that the arm ports can build
usr.sbin/lockstat/.
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.8; 1.6.20;
merge ktrace-lwp.
 1.5 21-Aug-2004  rearnsha branches: 1.5.12;
Add STT_ARM_TFUNC (needed for the dynamic linker to handle Thumb
symbols).
 1.4 29-Sep-2003  scw Define ELF32_MACHDEP_ENDIANNESS according to target byte order.
 1.3 09-Dec-2001  thorpej branches: 1.3.18;
Add support for dumping ELF-cormat core files.
 1.2 18-Jan-2001  bjh21 branches: 1.2.2; 1.2.6; 1.2.10;
Add extra constants defined by ARM ELF revision B01.
 1.1 11-Jan-2001  bjh21 Share <machine/elf_machdep.h> between arm26 and arm32.
 1.2.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 18-Jan-2001  bjh21 Add extra constants defined by ARM ELF revision B01.
 1.2.2.1 18-Jan-2001  bjh21 file elf_machdep.h was added on branch thorpej_scsipi on 2001-01-18 23:50:51 +0000
 1.3.18.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.18.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.18.2 25-Aug-2004  skrll Sync with HEAD.
 1.3.18.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.1 30-Dec-2006  yamt sync with head.
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.6.8.1 14-Sep-2006  yamt sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.7.78.3 26-Feb-2014  matt Use right name
 1.7.78.2 25-Feb-2014  matt Tag BE8 coredumps properly.
 1.7.78.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.7.60.1 20-Jun-2009  yamt sync with head
 1.8.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.8.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.12.1 30-Oct-2012  yamt sync with head
 1.10.2.3 03-Dec-2017  jdolecek update from HEAD
 1.10.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 23-Jun-2013  tls resync from head
 1.11.4.2 18-May-2014  rmind sync with head
 1.11.4.1 28-Aug-2013  rmind sync with head
 1.17.6.1 28-Aug-2017  skrll Sync with HEAD
 1.3 23-Jun-2001  bjh21 branches: 1.3.8;
Add <arm/endian.h> and remove the cats, dnard and netwinder versions, since
they're all the same (a redirect to <sys/endian.h>).
 1.2 10-Jan-2001  bjh21 ... this one's utterly pointless though.
 1.1 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.3.8.2 23-Jun-2001  bjh21 Add <arm/endian.h> and remove the cats, dnard and netwinder versions, since
they're all the same (a redirect to <sys/endian.h>).
 1.3.8.1 23-Jun-2001  bjh21 file endian.h was added on branch nathanw_sa on 2001-06-23 12:20:28 +0000
 1.9 29-Jan-2014  matt Also test for __AARCH64EB__ as well as __ARMEB__ for big-endian.
 1.8 30-Jan-2006  dsl branches: 1.8.112; 1.8.122; 1.8.128;
Move the definitions of ntohl() and friends into sys/endian.h where they
are defined in terms of bswap32() and bswap16().
This makes the definition be in the same place for all systems regardless
of creed^Wendianness.
 1.7 11-Dec-2005  christos branches: 1.7.2;
merge ktrace-lwp.
 1.6 10-Jun-2004  kleink branches: 1.6.12;
Reflect <sys/endian.h> rev. 1.4: make htonl() et al. arguments and
results uint{16,32}_t. Noted by Ian Zagorskih.
 1.5 14-Aug-2002  thorpej branches: 1.5.8; 1.5.10;
* Rename "word" -> 16, and "long" -> 32, as suggested by Ben Harris.
* Replace __byte_swap_32_variable() with a C version from Richard
Earnshaw that generates nearly identical assembly (and it would be
exactly identical with the addition of another peephole to GCC ARM
back-end).
 1.4 13-Aug-2002  thorpej Byte-swapping optimizations, enabled if compiling with GCC:
* Byte-swap 16-bit and 32-bit constants at compile-time.
* Inline 16-bit and 32-bit variable byte-swaps. These take 3 and 4
insns, respectively, and inlining saves the minimum 6 cycle penalty
to call/return from the byte swap function.
 1.3 17-Feb-2001  bjh21 branches: 1.3.4; 1.3.6; 1.3.10; 1.3.18; 1.3.20;
Re-introduce <arm/endian_machdep.h>, this time using GCC's idea of the target
endianness.
 1.2 11-Jan-2001  bjh21 Remove <arm/endian_machdep.h>, since we might get a big-endian ARM port
some time.
 1.1 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.3.20.2 18-Nov-2002  he Pull up revision 1.5 (requested by thorpej in ticket #673):
Rename ``word'' -> 16 and ``long'' -> 32.
Replace __byte_swap_32_variable() with a C version that
generates nearly identical assembly.
 1.3.20.1 18-Nov-2002  he Pull up revision 1.4 (requested by thoeprj in ticket #667):
Byte-swapping optimizations, enabled if compiling with GCC:
o Byte-swap 16-bit and 32-bit constants at compile-time
o Inline 16-bit and 32-bit variable byte-swaps
 1.3.18.1 30-Aug-2002  gehenna catch up with -current.
 1.3.10.1 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.6.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.4.1 17-Feb-2001  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.5.10.1 14-Jun-2004  tron Pull up revision 1.6 (requested by kleink in ticket #467):
Reflect <sys/endian.h> rev. 1.4: make htonl() et al. arguments and
results uint{16,32}_t. Noted by Ian Zagorskih.
 1.5.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.1 21-Jun-2006  yamt sync with head.
 1.7.2.1 01-Feb-2006  yamt sync with head.
 1.8.128.1 18-May-2014  rmind sync with head
 1.8.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.112.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.6 06-Oct-2021  skrll More trailing whitespace
 1.5 09-Apr-2017  christos one typedef for fenv_t is enough.
 1.4 22-Mar-2017  chs provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
 1.3 17-Mar-2015  joerg branches: 1.3.2; 1.3.4;
__BEGIN_DECLS and __END_DECLS only exist if sys/cdefs.h was included.
 1.2 29-Jan-2014  matt branches: 1.2.4; 1.2.6; 1.2.8;
Add AAPCS64 fenv_t
 1.1 23-Apr-2013  matt branches: 1.1.4; 1.1.6;
Move C99 fenv definitions to this file.
 1.1.6.1 18-May-2014  rmind sync with head
 1.1.4.4 03-Dec-2017  jdolecek update from HEAD
 1.1.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 23-Apr-2013  tls file fenv.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.2.8.2 28-Aug-2017  skrll Sync with HEAD
 1.2.8.1 06-Apr-2015  skrll Sync with HEAD
 1.2.6.1 18-Mar-2015  snj Pull up following revision(s) (requested by joerg in ticket #616):
sys/arch/arm/include/fenv.h: revision 1.3
__BEGIN_DECLS and __END_DECLS only exist if sys/cdefs.h was included.
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 29-Jan-2014  yamt file fenv.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.3.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.3.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.1 20-Dec-2001  thorpej branches: 1.1.2; 1.1.4;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 20-Dec-2001  thorpej file fiq.h was added on branch kqueue on 2002-01-10 19:37:53 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 20-Dec-2001  nathanw file fiq.h was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.9 30-Oct-2024  riastradh Sprinkle <sys/featuretest.h> where _*_SOURCE macros are consulted.

Otherwise, the feature tests might come out wrong. For example,
header files that check for _NETBSD_SOURCE won't get the default when
no other _*_SOURCE macros are defined; header files that check for
_POSIX_C_SOURCE might miss _XOPEN_SOURCE, which is supposed to imply
a corresponding _POSIX_C_SOURCE.

PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
 1.8 29-Jan-2014  matt branches: 1.8.66;
if __ARM_PCS_AAPCS64 is defined, expose LDBL_* and DECIMAL_DIGIT
 1.7 24-Jan-2013  matt branches: 1.7.2;
Kill more FPA leftovers.
 1.6 11-Dec-2005  christos branches: 1.6.114; 1.6.124;
merge ktrace-lwp.
 1.5 25-Oct-2003  kleink Update for FPA long double being 80-bit extended-precision format.
 1.4 23-Oct-2003  kleink * Move the definitions for types other than single-precision and double-
precision back to machine-dependent headers. C99 has no strict
requirement which, if any, extended-precision type `long double' must
match, and even between 80-bit formats there are differences in
implementation (m68k vs. x86).
* On arm, consider __VFP_FP__.
 1.3 12-May-2003  kleink branches: 1.3.2;
Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
 1.2 19-Apr-2003  christos PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
 1.1 10-Jan-2001  bjh21 branches: 1.1.2;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file float.h was added on branch thorpej_scsipi on 2001-01-10 19:02:07 +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.124.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.124.1 25-Feb-2013  tls resync with head
 1.6.114.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.2.1 18-May-2014  rmind sync with head
 1.8.66.1 02-Aug-2025  perseant Sync with HEAD
 1.3 11-Jan-2013  matt Remove FPA specific header.
 1.2 12-Nov-2012  skrll C99 types
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.170; 1.1.180;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.180.2 25-Feb-2013  tls resync with head
 1.1.180.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.170.2 23-Jan-2013  yamt sync with head
 1.1.170.1 16-Jan-2013  yamt sync with (a bit old) head
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file fp.h was added on branch thorpej_scsipi on 2001-01-10 19:02:07 +0000
 1.1 29-Jun-2020  riastradh Move aarch64/fpu.h to arm/fpu.h.
 1.23 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.22 06-Oct-2021  skrll Trailing whitespace
 1.21 24-Jan-2018  skrll Remove references to arm26
 1.20 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.19 25-Apr-2017  skrll Expose lwp_trapframe for _KEMUSER, e.g. crash(8)
 1.18 18-Aug-2013  matt branches: 1.18.6; 1.18.10;
fix comment.
 1.17 16-Aug-2012  matt branches: 1.17.2; 1.17.4;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.16 16-Aug-2012  matt Rename process_frame to lwp_trapframe
 1.15 01-Aug-2012  matt Move fill to between spsr and r0 so that the registers will be dword aligned.
Adjust PUSH/PULL macros accordingly.
 1.14 31-Jul-2012  matt Make trapframe/irqframe an even number of words (make adjustments for
the filler word).
Improve the comments in PUSH/PULL macros.
Use the armv6+ CPS instruction if we can.
 1.13 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.12 21-Nov-2009  rmind branches: 1.12.12; 1.12.16; 1.12.20;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.11 15-Oct-2008  wrstuden branches: 1.11.12;
Merge wrstuden-revivesa into HEAD.
 1.10 27-Apr-2008  matt branches: 1.10.2; 1.10.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.9 09-Feb-2007  ad branches: 1.9.26; 1.9.46; 1.9.48; 1.9.50;
Merge newlock2 to head.
 1.8 11-Dec-2005  christos branches: 1.8.20;
merge ktrace-lwp.
 1.7 13-Sep-2005  christos split compat_16 functions to their own file and make this compile again.
 1.6 05-Oct-2003  matt branches: 1.6.16;
Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.5 17-Jan-2003  thorpej branches: 1.5.2;
Merge the nathanw_sa branch.
 1.4 23-Jun-2002  thorpej When delivering a signal, there is no need to push the signal number,
code, context pointer, or handler onto the stack, so don't do so.
 1.3 31-Aug-2001  simonb branches: 1.3.6; 1.3.14;
Use comments around the token after a #endif.
 1.2 20-Jan-2001  bjh21 branches: 1.2.2; 1.2.6;
Unify arm26 and arm32 trapframe structures. The unified trapframe is the same
shape as the old arm32 one, but there are a few #defines to keep arm26 code
happy. Anything that depends on the precise shape of the trapframe,
and especially on being able to treat it as an array of registers, has been
updated.
 1.1 18-Jan-2001  bjh21 Add <arm/frame.h>, for shared stack frame structures. Currently, only sigframes
are common.
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 20-Jan-2001  bouyer file frame.h was added on branch thorpej_scsipi on 2001-02-11 19:08:51 +0000
 1.3.14.1 16-Jul-2002  gehenna catch up with -current.
 1.3.6.5 01-Aug-2002  nathanw Catch up to -current.
 1.3.6.4 05-Jul-2002  thorpej When delivering an upcall, arrange to have the kernel return to
the upcall directly, and use the upcall trampoline only to exit
if the upcall returns.
 1.3.6.3 17-Nov-2001  thorpej Adapt to latest MI changes. Update copyright in arm_machdep.c
 1.3.6.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.3.6.1 31-Aug-2001  thorpej file frame.h was added on branch nathanw_sa on 2001-11-15 06:39:22 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.2 26-Feb-2007  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.8.20.1 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.9.50.3 11-Mar-2010  yamt sync with head
 1.9.50.2 04-May-2009  yamt sync with head.
 1.9.50.1 16-May-2008  yamt sync with head.
 1.9.48.1 18-May-2008  yamt sync with head.
 1.9.46.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.46.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.26.1 29-Aug-2007  matt Add define for tf_ip (tf_r12)
 1.10.6.1 19-Oct-2008  haad Sync with HEAD.
 1.10.2.3 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.10.2.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.10.2.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.11.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.12.16.1 24-Feb-2012  mrg sync to -current.
 1.12.12.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.12.12.2 30-Oct-2012  yamt sync with head
 1.12.12.1 17-Apr-2012  yamt sync with head
 1.17.4.1 28-Aug-2013  rmind sync with head
 1.17.2.2 03-Dec-2017  jdolecek update from HEAD
 1.17.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.18.6.1 28-Aug-2017  skrll Sync with HEAD
 1.11 31-Jan-2014  matt Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
 1.10 29-Jan-2014  matt If __ARM_PCS_AAPCS64 is defined, define struct ieee_ext and union ieee_ext_u.
Use uint64_t so we can just have ext_frach and ext_fracl.
 1.9 11-Dec-2005  christos branches: 1.9.114; 1.9.124; 1.9.130;
merge ktrace-lwp.
 1.8 15-Apr-2005  kleink Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
 1.7 28-Oct-2003  kleink branches: 1.7.8; 1.7.14;
Retire FPA support from this file at last; suggested by Richard Earnshaw
and not objected to by port-arm.
 1.6 27-Oct-2003  kleink For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.
 1.5 26-Oct-2003  kleink Remove the FPA extended-precision format entirely; according to Richard
Earnshaw it was never supported by the toolchain.
 1.4 25-Oct-2003  kleink G/c the 128-bit extended-precision format, which is not applicable to
this platform. Name the 80-bit version the extended format, which it
is for the FPA case according to the ARM7500FE manual.
 1.3 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.2 21-Feb-2001  bjh21 branches: 1.2.26;
Update to support VFP formats. Also a half-hearted attempt at armeb support.
Note that I'm using __VFP_FP__ to indicate compilation with VFP-format
floating-point data. There doesn't (currently) seem to be a standard define
for this purpose. __VFP_FP__ was suggested by Richard Earnshaw.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 10-Jan-2001  bouyer file ieee.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.2.26.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.26.1 03-Aug-2004  skrll Sync with HEAD
 1.7.14.1 19-Apr-2005  tron Pull up revision 1.8 (requested by kleink in ticket #163):
Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.
IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.130.1 18-May-2014  rmind sync with head
 1.9.124.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.114.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.5 06-Oct-2021  skrll More trailing whitespace
 1.4 22-Mar-2017  chs provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
 1.3 23-Apr-2013  matt branches: 1.3.12; 1.3.16; 1.3.20;
Install fenv.h
 1.2 05-Aug-2008  matt branches: 1.2.28; 1.2.38;
Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones. Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.132; 1.1.136; 1.1.138; 1.1.142;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.142.1 19-Oct-2008  haad Sync with HEAD.
 1.1.138.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.136.1 04-May-2009  yamt sync with head.
 1.1.132.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file ieeefp.h was added on branch thorpej_scsipi on 2001-01-10 19:02:07 +0000
 1.2.38.2 03-Dec-2017  jdolecek update from HEAD
 1.2.38.1 23-Jun-2013  tls resync from head
 1.2.28.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.20.1 21-Apr-2017  bouyer Sync with HEAD
 1.3.16.1 26-Apr-2017  pgoyette Sync with HEAD
 1.3.12.1 28-Aug-2017  skrll Sync with HEAD
 1.5 10-Aug-2018  jakllsch fix arm int_const.h for aarch64
 1.4 25-Jul-2014  joerg branches: 1.4.26; 1.4.28;
Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.
 1.3 29-May-2010  tnozaki branches: 1.3.18; 1.3.32;
fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
 1.2 28-Apr-2008  martin branches: 1.2.20; 1.2.22;
Remove clause 3 and 4 from TNF licenses
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12; 1.1.134; 1.1.136; 1.1.138;
Add definitions of C99 integer constant macros.
 1.1.138.2 11-Aug-2010  yamt sync with head.
 1.1.138.1 16-May-2008  yamt sync with head.
 1.1.136.1 18-May-2008  yamt sync with head.
 1.1.134.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:36 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:53:10 +0000
 1.2.22.1 30-May-2010  rmind sync with head
 1.2.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.32.1 10-Aug-2014  tls Rebase.
 1.3.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.28.1 10-Jun-2019  christos Sync with HEAD
 1.4.26.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10 15-Jul-2018  christos Fix formats for gcc where int64 is long not long long (like clang which
should be changed).
 1.9 13-Aug-2014  matt branches: 1.9.18; 1.9.20;
include <sys/common_int_fmtio.h> if __INTPTR_FMTd__ is defined
 1.8 25-Jul-2014  joerg Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.
 1.7 29-Jan-2014  matt branches: 1.7.2;
Make {,u}int{8,16,32} be of type int.
 1.6 29-Jan-2014  matt Take advantage of compiler predefines for types.
Add _LP64 support.
 1.5 29-Aug-2008  matt branches: 1.5.38;
Remove non-__ELF__ snippets.
 1.4 28-Apr-2008  martin branches: 1.4.2; 1.4.6;
Remove clause 3 and 4 from TNF licenses
 1.3 03-Sep-2001  matt branches: 1.3.6; 1.3.128; 1.3.130; 1.3.132;
Add __ELF__ stuff for resized types under ELF.
 1.2 26-Apr-2001  kleink branches: 1.2.2; 1.2.4;
Add definitions for C99 fastest minimum-width integer types.
 1.1 15-Apr-2001  kleink branches: 1.1.2;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:53:10 +0000
 1.2.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.132.2 04-May-2009  yamt sync with head.
 1.3.132.1 16-May-2008  yamt sync with head.
 1.3.130.1 18-May-2008  yamt sync with head.
 1.3.128.2 28-Sep-2008  mjf Sync with HEAD.
 1.3.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.6.2 03-Sep-2001  matt Add __ELF__ stuff for resized types under ELF.
 1.3.6.1 03-Sep-2001  matt file int_fmtio.h was added on branch nathanw_sa on 2001-09-03 01:51:40 +0000
 1.4.6.1 19-Oct-2008  haad Sync with HEAD.
 1.4.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.5.38.2 03-Dec-2017  jdolecek update from HEAD
 1.5.38.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.9.20.1 10-Jun-2019  christos Sync with HEAD
 1.9.18.1 28-Jul-2018  pgoyette Sync with HEAD
 1.12 06-Oct-2021  skrll More trailing whitespace
 1.11 25-Jul-2014  joerg Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.
 1.10 29-Jan-2014  matt branches: 1.10.2;
Take advantage of compiler predefines for types.
Add _LP64 support.
 1.9 29-Aug-2008  matt branches: 1.9.28; 1.9.38; 1.9.44;
Remove non-__ELF__ snippets.
 1.8 28-Apr-2008  martin branches: 1.8.2; 1.8.6;
Remove clause 3 and 4 from TNF licenses
 1.7 17-Oct-2007  garbled branches: 1.7.16; 1.7.18; 1.7.20;
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.6 31-Aug-2007  drochner Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
 1.5 11-Dec-2005  christos branches: 1.5.30; 1.5.38; 1.5.44; 1.5.46; 1.5.48; 1.5.50; 1.5.52;
merge ktrace-lwp.
 1.4 08-May-2004  kleink branches: 1.4.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.3 03-Sep-2001  matt branches: 1.3.6; 1.3.24;
Add __ELF__ stuff for resized types under ELF.
 1.2 26-Apr-2001  kleink branches: 1.2.2; 1.2.4;
Add definitions for C99 fastest minimum-width integer types.
 1.1 15-Apr-2001  kleink branches: 1.1.2;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:53:10 +0000
 1.2.4.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.3.6.2 03-Sep-2001  matt Add __ELF__ stuff for resized types under ELF.
 1.3.6.1 03-Sep-2001  matt file int_limits.h was added on branch nathanw_sa on 2001-09-03 01:51:40 +0000
 1.4.12.1 03-Sep-2007  yamt sync with head.
 1.5.52.1 06-Nov-2007  matt sync with HEAD
 1.5.50.1 01-Jan-2008  chris Sync with HEAD.
 1.5.48.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.5.46.1 01-Nov-2007  rjs Sync with HEAD.
 1.5.44.1 03-Sep-2007  skrll Sync with HEAD.
 1.5.38.1 03-Oct-2007  garbled Sync with HEAD
 1.5.30.1 09-Oct-2007  ad Sync with head.
 1.7.20.2 04-May-2009  yamt sync with head.
 1.7.20.1 16-May-2008  yamt sync with head.
 1.7.18.1 18-May-2008  yamt sync with head.
 1.7.16.2 28-Sep-2008  mjf Sync with HEAD.
 1.7.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.6.1 19-Oct-2008  haad Sync with HEAD.
 1.8.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.44.1 18-May-2014  rmind sync with head
 1.9.38.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.28.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.10.2.1 10-Aug-2014  tls Rebase.
 1.7 25-Jul-2014  joerg Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.
 1.6 29-Jan-2014  matt branches: 1.6.2;
Make {,u}int{8,16,32} be of type int.
 1.5 29-Jan-2014  matt Take advantage of compiler predefines for types.
Add _LP64 support.
 1.4 28-Apr-2008  martin branches: 1.4.34; 1.4.44; 1.4.50;
Remove clause 3 and 4 from TNF licenses
 1.3 24-Dec-2005  perry branches: 1.3.76; 1.3.78; 1.3.80;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 26-Apr-2001  kleink branches: 1.2.2; 1.2.10; 1.2.44;
Add definitions for C99 fastest minimum-width integer types.
 1.1 14-Apr-2001  kleink branches: 1.1.2;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:53:10 +0000
 1.2.44.1 21-Jun-2006  yamt sync with head.
 1.2.10.2 26-Apr-2001  kleink Add definitions for C99 fastest minimum-width integer types.
 1.2.10.1 26-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-26 16:25:22 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.80.1 16-May-2008  yamt sync with head.
 1.3.78.1 18-May-2008  yamt sync with head.
 1.3.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.50.1 18-May-2014  rmind sync with head
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.34.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.6.2.1 10-Aug-2014  tls Rebase.
 1.17 25-Jul-2014  joerg Add generic versions of machine/int_*.h for compilers providing
appropiate macros for all necessary types.
 1.16 14-Jul-2014  joerg Do not explicitly undef __INT8_TYPE__, clang is handled specially below.
 1.15 13-Jul-2014  joerg Clang expects __INTx_TYPE__ to be used with signed/unsigned modifier
when defining (u)intx_t, GCC has a separate __UINTx_TYPE__. Newer Clang
will also provide the latter, but expects the behavior of the former to
remain. As ARM uses unsigned char by default, distinguish between Clang
and non-Clang here to the right type for int8_t.
 1.14 24-Feb-2014  christos branches: 1.14.2;
consistency in include protection
 1.13 31-Jan-2014  matt Fix the naked char __INT8_TYPE__ and unsigned char case.
 1.12 29-Jan-2014  matt Deal with the case when __UINT<N>_TYPE__ is defined as well
__INT<N>_TYPE__ is defined. We make the assumption that if the former is
defined, the latter is also defined.
 1.11 29-Jan-2014  matt Take advantage of compiler predefines for types.
Add _LP64 support.
 1.10 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.9 29-Aug-2008  matt branches: 1.9.28; 1.9.38; 1.9.44;
Remove non-__ELF__ snippets.
 1.8 24-Dec-2005  perry branches: 1.8.76; 1.8.80; 1.8.82; 1.8.86;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 25-May-2005  kleink branches: 1.6.2;
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.5 07-Aug-2003  agc branches: 1.5.6; 1.5.14;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 16-Oct-2001  bjh21 branches: 1.4.4; 1.4.22;
On ELF systems, make intptr_t and uintptr_t long, because Matt says so.
This makes regress/lib/libc/int_fmtio compile.
 1.3 28-Apr-2001  kleink branches: 1.3.2;
* Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
intmax_t, pointer-type and size_t arguments.
 1.2 12-Apr-2001  kleink Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.4;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 10-Jan-2001  bouyer file int_types.h was added on branch thorpej_scsipi on 2001-04-21 17:53:10 +0000
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.22.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.22.1 03-Aug-2004  skrll Sync with HEAD
 1.4.4.2 16-Oct-2001  bjh21 On ELF systems, make intptr_t and uintptr_t long, because Matt says so.
This makes regress/lib/libc/int_fmtio compile.
 1.4.4.1 16-Oct-2001  bjh21 file int_types.h was added on branch nathanw_sa on 2001-10-16 20:40:46 +0000
 1.5.14.1 28-May-2005  tron Pull up revision 1.6 (requested by klein in ticket #346):
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.5.6.1 29-May-2005  riz Pull up revision 1.6 (requested by kleink in ticket #1555):
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.8.86.1 19-Oct-2008  haad Sync with HEAD.
 1.8.82.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.8.80.1 04-May-2009  yamt sync with head.
 1.8.76.1 28-Sep-2008  mjf Sync with HEAD.
 1.9.44.1 18-May-2014  rmind sync with head
 1.9.38.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.28.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.14.2.1 10-Aug-2014  tls Rebase.
 1.2 19-Jan-2008  chris Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.44; 1.1.102; 1.1.106; 1.1.108; 1.1.114; 1.1.122;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.122.1 20-Jan-2008  bouyer Sync with HEAD
 1.1.114.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.108.1 23-Mar-2008  matt sync with HEAD
 1.1.106.1 20-Jan-2008  chris Sync to HEAD.
 1.1.102.1 28-Feb-2008  rjs Sync with HEAD.
 1.1.44.1 21-Jan-2008  yamt sync with head
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file ipkdb.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.13 12-Dec-2021  andvar s/Miscellanous/Miscellaneous/ in copypasta comments.
 1.12 18-Oct-2016  jdolecek add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers
 1.11 29-Jan-2014  matt branches: 1.11.6; 1.11.10;
Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 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 21-Sep-2012  matt Switch to the generic bounce buffer support.
 1.8 01-Jul-2011  dyoung branches: 1.8.2; 1.8.10; 1.8.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 19-Aug-2009  dyoung isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t.
 1.6 19-Aug-2009  dyoung Define isa_dmadestroy(). Declare isa_detach_hook().
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 09-May-2003  fvdl branches: 1.4.80; 1.4.106; 1.4.108; 1.4.110;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
 1.3 07-Jan-2002  chris Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
 1.2 04-Mar-2001  matt branches: 1.2.4; 1.2.6; 1.2.10;
s/vm_offset_t/vaddr_t/g
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.10.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.10.1 11-Jan-2002  nathanw More catchup.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 04-Mar-2001  bouyer file isa_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.4.110.2 19-Aug-2009  yamt sync with head.
 1.4.110.1 16-May-2008  yamt sync with head.
 1.4.108.1 18-May-2008  yamt sync with head.
 1.4.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.80.2 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.4.80.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.8.12.3 03-Dec-2017  jdolecek update from 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.10.1 06-Dec-2012  matt Merge changes from -current.
 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.10.2.1 18-May-2014  rmind sync with head
 1.11.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.11.6.1 05-Dec-2016  skrll Sync with HEAD
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.132; 1.1.134; 1.1.136;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.136.1 16-May-2008  yamt sync with head.
 1.1.134.1 18-May-2008  yamt sync with head.
 1.1.132.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file isapnp_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.1 02-May-2013  matt branches: 1.1.4; 1.1.12;
This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 02-May-2013  yamt file joystick.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 02-May-2013  tls file joystick.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.1 01-Jan-2008  chris branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.18;
Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.1.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.1.18.1 01-Jan-2008  rjs file kcore.h was added on branch hpcarm-cleanup on 2008-02-28 21:58:52 +0000
 1.1.10.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.10.1 01-Jan-2008  mjf file kcore.h was added on branch mjf-devfs on 2008-02-18 21:04:23 +0000
 1.1.8.2 21-Jan-2008  yamt sync with head
 1.1.8.1 01-Jan-2008  yamt file kcore.h was added on branch yamt-lazymbuf on 2008-01-21 09:35:41 +0000
 1.1.6.2 09-Jan-2008  matt sync with HEAD
 1.1.6.1 01-Jan-2008  matt file kcore.h was added on branch matt-armv6 on 2008-01-09 01:45:17 +0000
 1.1.4.2 02-Jan-2008  bouyer Sync with HEAD
 1.1.4.1 01-Jan-2008  bouyer file kcore.h was added on branch bouyer-xeni386 on 2008-01-02 21:47:24 +0000
 1.1.2.2 01-Jan-2008  chris Sync with HEAD.
 1.1.2.1 01-Jan-2008  chris file kcore.h was added on branch chris-arm-intr-rework on 2008-01-01 15:39:30 +0000
 1.19 21-Jan-2019  dholland Fix wrong scoping of {U,}LLONG_MAX. More cases, not just amd64.
PR 53298 from Roberto E. Vargas Caballero.
 1.18 24-Feb-2014  christos branches: 1.18.28; 1.18.30;
consistency in include protection
 1.17 29-Jan-2014  matt Take advantage of compiler predefines for types.
Add _LP64 support.
 1.16 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.15 29-Jan-2014  matt replace spaces in SHRT_MIN definition with tabs
 1.14 29-Jan-2014  matt SIZE_T is unsigned so SIZE_T_MAX needs to be ULONG_MAX
 1.13 11-Apr-2013  christos branches: 1.13.4;
add missing SSIZE_MIN
 1.12 28-Mar-2012  christos branches: 1.12.2;
- Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.11 22-Mar-2012  he Make sure that the UQUAD_MAX constant is marked as unsigned, to avoid
"ANSI C treats constant as unsigned" warning from lint.
 1.10 07-Jun-2010  tnozaki branches: 1.10.8; 1.10.12;
1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.9 29-Aug-2008  matt branches: 1.9.14; 1.9.16;
Remove non-__ELF__ snippets.
 1.8 17-Oct-2007  garbled branches: 1.8.16; 1.8.20; 1.8.22; 1.8.26;
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.7 31-Aug-2007  drochner Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
 1.6 11-Dec-2005  christos branches: 1.6.30; 1.6.38; 1.6.44; 1.6.46; 1.6.48; 1.6.50; 1.6.52;
merge ktrace-lwp.
 1.5 07-Aug-2003  agc branches: 1.5.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 28-Apr-2003  bjh21 branches: 1.4.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.3 03-Sep-2001  matt branches: 1.3.6;
Add __ELF__ stuff for resized types under ELF.
 1.2 04-May-2001  simonb branches: 1.2.2;
Be consistent with limit constants:
- use "U" suffix for unsigned constants
- use "L" suffix for long constants
- use "UL" suffix for unsigned long constants
- use hexadecimal instead of decimal

Fixes build problems with vi (now that warnings/errors are enabled) on
mips, powerpc and arm platforms.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.4;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file limits.h was added on branch thorpej_scsipi on 2001-01-10 19:02:07 +0000
 1.2.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.6.2 03-Sep-2001  matt Add __ELF__ stuff for resized types under ELF.
 1.3.6.1 03-Sep-2001  matt file limits.h was added on branch nathanw_sa on 2001-09-03 01:51:40 +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.5.16.1 03-Sep-2007  yamt sync with head.
 1.6.52.1 06-Nov-2007  matt sync with HEAD
 1.6.50.1 01-Jan-2008  chris Sync with HEAD.
 1.6.48.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.6.46.1 01-Nov-2007  rjs Sync with HEAD.
 1.6.44.1 03-Sep-2007  skrll Sync with HEAD.
 1.6.38.1 03-Oct-2007  garbled Sync with HEAD
 1.6.30.1 09-Oct-2007  ad Sync with head.
 1.8.26.1 19-Oct-2008  haad Sync with HEAD.
 1.8.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.8.20.2 11-Aug-2010  yamt sync with head.
 1.8.20.1 04-May-2009  yamt sync with head.
 1.8.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.9.16.1 03-Jul-2010  rmind sync with head
 1.9.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.12.1 05-Apr-2012  mrg sync to latest -current.
 1.10.8.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.10.8.1 17-Apr-2012  yamt sync with head
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 23-Jun-2013  tls resync from head
 1.13.4.1 18-May-2014  rmind sync with head
 1.18.30.1 10-Jun-2019  christos Sync with HEAD
 1.18.28.1 26-Jan-2019  pgoyette Sync with HEAD
 1.39 30-May-2021  joerg Don't use V8 atomic instruction for AA32 mode.
 1.38 27-Apr-2021  skrll branches: 1.38.2;
Fix the barrier confusion. From Riastradh - thanks!.
 1.37 26-Apr-2021  skrll Change #ifdef FOO to #if defined(FOO). NFCI.
 1.36 24-Apr-2021  skrll branches: 1.36.2;
Fix ARMv8 instructions
 1.35 24-Apr-2021  skrll G/C
 1.34 29-Nov-2019  riastradh Nix mb_* on arm.
 1.33 17-Sep-2017  christos branches: 1.33.4; 1.33.8;
more const.
 1.32 25-Feb-2015  joerg branches: 1.32.10;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.31 23-Feb-2015  joerg Indentation.
 1.30 19-Feb-2015  joerg Don't use plain inline in that might end up compiled with -ansi.
 1.29 02-Jan-2015  christos add constcond.
 1.28 10-Aug-2014  matt branches: 1.28.2; 1.28.4;
Correct _ARM_ARCH_8 instructions
 1.27 13-Mar-2014  matt Fix non-armv6 case.
 1.26 12-Mar-2014  matt Rather than having long complicated asm statements, use inlines for
ldrex/strex and let the compiler arrange the code how it wants.
 1.25 18-Aug-2013  matt Support thumb1 indirectly and thumb2 directly
 1.24 28-Jan-2013  matt branches: 1.24.2;
Use uint32_t for __asm to appease clang.
 1.23 24-Jan-2013  matt Shut up clang but returning the result to a uint32_t variable.
 1.22 25-Nov-2012  pgoyette For consistency, define the _KERNEL version of __swp() using a non-volatile
type, similar to how it is defined in non-KERNEL

Fixes the 'build.sh release' for evbarm-{eb,el}
 1.21 31-Aug-2012  matt branches: 1.21.2;
The arm11 barriers are mcr (write), not mrc (read)
 1.20 29-Aug-2012  matt Add required dsb/dmb instructions (or placeholders for them) required for
the weak memory ordering of the ARMV7-A architecture.
 1.19 23-Jul-2012  matt Change cmpeq to cmp and add "cc" to clobber in the ldrex/strex asm.
 1.18 15-Jul-2012  matt Use ldrexb/strexb for ARMv6 and above platforms since
"swp{b} use is deprecated" for them.
 1.17 28-Apr-2008  martin branches: 1.17.18; 1.17.34; 1.17.42;
Remove clause 3 and 4 from TNF licenses
 1.16 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.15 17-Oct-2007  garbled branches: 1.15.16; 1.15.18; 1.15.20;
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.14 10-Sep-2007  skrll Merge nick-csl-alignment.
 1.13 09-Mar-2007  thorpej branches: 1.13.2; 1.13.10; 1.13.14; 1.13.16; 1.13.18; 1.13.20; 1.13.22;
Make __cpu_simple_lock_t an unsigned char if _KERNEL, and operate on it
using SWPB.

Approved by Matt Thomas.
 1.12 20-Feb-2007  matt Protect MB_* and <arm/cpufunc.h> by _KERNEL
 1.11 19-Feb-2007  he Since drain_writebuf() is #defined in <arm/cpufunc.h>, we need to
include it here.
 1.10 18-Feb-2007  ad + mb_memory()
 1.9 18-Feb-2007  matt Equate mb_write and mb_read to drain_writebuf (from cpu.h)
 1.8 18-Feb-2007  matt Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.7 28-Dec-2005  perry branches: 1.7.26;
inline -> __inline
 1.6 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 26-Sep-2003  nathanw branches: 1.4.16;
Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
 1.3 07-Oct-2002  bjh21 branches: 1.3.8;
Minor tidy-up, mostly to improve readability. The SWP instruction is now
in its own little inline function, and this allows us to get rid of all the
automatic variables elsewhere. This subtly changes the semantics of
__cpu_simple_lock() such that the loop ends up one instruction longer, but
I'm not sure that's a particularly bad thing.
 1.2 15-Nov-2001  thorpej Implement __cpu_simple_lock*() primitives using the SWP insn. Note
this insn is available only on ARM arch v3 and later (and 2a). We
don't expect to be using these ops in the kernel on processors too
old to have SWP, and for userland uses (in e.g. a pthread library),
the kernel will simply have to trap and emulate the insn (it needs
to be "atomic", so a kernel trap of some sort will be necessary on
such platforms anyway).
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.10.1 15-Nov-2001  thorpej Merge from -current; locking primitives implemented.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file lock.h was added on branch thorpej_scsipi on 2001-01-10 19:02:08 +0000
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.4 27-Oct-2007  yamt sync with head.
 1.4.16.3 03-Sep-2007  yamt sync with head.
 1.4.16.2 26-Feb-2007  yamt sync with head.
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.7.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.7.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.22.2 06-Nov-2007  matt sync with HEAD
 1.13.22.1 09-Sep-2007  matt Use & constraint to avoid swpb/swp compile bug.
 1.13.20.1 01-Jan-2008  chris Sync with HEAD.
 1.13.18.1 02-Oct-2007  joerg Sync with HEAD.
 1.13.16.1 02-Oct-2007  rjs Sync with HEAD.
 1.13.14.1 15-Aug-2007  skrll Provide __SIMPLELOCK_{UN,}LOCKED_P and __cpu_simple_lock_{set,clear}
for all architectures.
 1.13.10.1 03-Oct-2007  garbled Sync with HEAD
 1.13.2.1 09-Oct-2007  ad Sync with head.
 1.15.20.1 16-May-2008  yamt sync with head.
 1.15.18.1 18-May-2008  yamt sync with head.
 1.15.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.42.2 28-Nov-2012  matt Make __swp for the kernel return unsigned char and restore __cpu_simple_lock_t
(match what -HEAD has).
 1.17.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.17.34.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.17.34.2 16-Jan-2013  yamt sync with (a bit old) head
 1.17.34.1 30-Oct-2012  yamt sync with head
 1.17.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.21.2.3 03-Dec-2017  jdolecek update from HEAD
 1.21.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1 25-Feb-2013  tls resync with head
 1.24.2.2 18-May-2014  rmind sync with head
 1.24.2.1 28-Aug-2013  rmind sync with head
 1.28.4.1 06-Apr-2015  skrll Sync with HEAD
 1.28.2.2 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.28.2.1 21-Feb-2015  martin Pull up following revision(s) (requested by joerg in ticket #536):
sys/arch/arm/include/lock.h: revision 1.30
Don't use plain inline in that might end up compiled with -ansi.
 1.32.10.1 26-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1672):

sys/arch/arm/include/lock.h: revision 1.37
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.11
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.15
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.16
sys/arch/arm/include/lock.h: revision 1.36

Fix ARMv8 instructions

Fix __sync_lock_release_4 to actually zeroise the whole 4bytes/32bits.

Trailing whitespace

Change #ifdef FOO to #if defined(FOO). NFCI.
 1.33.8.2 30-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1261):

sys/arch/arm/include/lock.h: revision 1.38
common/lib/libc/arch/arm/atomic/membar_ops.S: revision 1.7
common/lib/libc/arch/arm/atomic/atomic_swap_16.S: revision 1.5
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.12
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.17

Add the appropriate memory barrier before the lock is cleared in
__sync_lock_release_{1,2,4,8}. That is, all reads and write for the
inner shareability domain before the lock clear store.

Improve the membar_ops barriers - no need to use dsb and wait for
completion. Also, we only to act on the inner shareability domain.

Fix the barrier confusion. From Riastradh - thanks!.
 1.33.8.1 26-Apr-2021  martin Pull up following revision(s) (requested by skrll in ticket #1254):

sys/arch/arm/include/lock.h: revision 1.37
common/lib/libc/arch/arm/atomic/atomic_swap_64.S: revision 1.11
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.15
common/lib/libc/arch/arm/atomic/atomic_swap.S: revision 1.16
sys/arch/arm/include/lock.h: revision 1.36

Fix ARMv8 instructions

Fix __sync_lock_release_4 to actually zeroise the whole 4bytes/32bits.

Trailing whitespace

Change #ifdef FOO to #if defined(FOO). NFCI.
 1.33.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.36.2.2 17-Jun-2021  thorpej Sync w/ HEAD.
 1.36.2.1 13-May-2021  thorpej Sync with HEAD.
 1.38.2.1 31-May-2021  cjep sync with head
 1.40 07-Oct-2025  skrll Provide new assembly macros

INTERRUPT_{DISABLE,ENABLE}

which mask/unmask both IRQs and FIQs
 1.39 07-Oct-2025  skrll Retire the locore.h assembly versions of IRQ{enable,disable} in favour of
the "experimental" cpuswitch.S versions, but rename them

IRQ_{DISABLE,ENABLE}

and have them take a temporary register which is only used for < armv6.
 1.38 06-Oct-2025  skrll #define<tab> consistency
 1.37 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.36 01-Feb-2021  skrll G/C some old code that was for acorn26
 1.35 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.34 30-Oct-2020  skrll branches: 1.34.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.33 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.32 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.31 06-Apr-2019  thorpej branches: 1.31.6;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.30 01-Apr-2018  ryo branches: 1.30.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.29 24-Jan-2018  skrll branches: 1.29.2;
Remove port-acorn26

OK core@
 1.28 24-Aug-2017  jmcneill Do runtime detection of MP extensions to allow using a MULTIPROCESSOR
kernel on CPUs without the MP extensions feature (like Cortex-A8).
 1.27 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.26 09-Jun-2015  skrll branches: 1.26.2; 1.26.4;
KNF a comment
 1.25 09-Jun-2015  skrll Trailing whitespace.
 1.24 09-Jun-2015  skrll Use TTBR_[UM]PATTR in a9_mpsubr.S as well as cpufunc_asm_armv7

Prompted by matt@
 1.23 28-May-2015  matt Appease clang's integrated assembler and have separate thumb2 and arm asm's
for ldrht
 1.22 28-May-2015  matt Fix ldrht
 1.21 30-Mar-2015  matt #include <sys/pcu.h>
 1.20 29-Mar-2015  matt If using TPIDRPRW_IS_CURLWP and !MP and ARMV7, use movw/movt to load address
of cpu_info_store
 1.19 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.18 07-Nov-2014  martin branches: 1.18.2;
Guard a few inline functions by #ifndef _RUMPKERNEL, to allow including
this file in rump builds.
 1.17 13-Aug-2014  matt branches: 1.17.2;
Add __NO_FIQ to prevent testing of the PSR FIQ bit
Use VALID_R15_PSR(pc, spsr) instead of testing explicitly
 1.16 28-Mar-2014  matt branches: 1.16.4; 1.16.6;
Various MP changes.
 1.15 18-Mar-2014  matt defflag VERBOSE_INIT_ARM
 1.14 03-Mar-2014  matt Add most of the cpu_* variables to <arm/locore.h>
Add and initialize cpu_synchprim_present
 1.13 26-Feb-2014  matt Add arm_cpu_max
 1.12 01-Feb-2014  joerg branches: 1.12.2;
Typos.
 1.11 01-Feb-2014  joerg Fix RCS ID.
 1.10 01-Feb-2014  joerg Be nice to LLVM and use an explicit immediate.
 1.9 30-Jan-2014  matt ldrht is v6t2 or later so use ldrt and extract the right halfword.
 1.8 29-Jan-2014  matt Add read_insn and read_thumb_insn inlines to hide the endianness of
instructions and use them as appropriate.
 1.7 11-Jan-2014  matt Add hw.printfataltraps sysctl. Always print fatal traps for init. For all
other processes, only do so if cpu_printfataltraps is true.
 1.6 20-Dec-2013  matt Add CPU_IS_ARMV6_P() macro
 1.5 07-Sep-2013  matt Add a machdep.hwdiv_present sysctl (cortex A7 and A15 have hwdiv instructions)
 1.4 23-Aug-2013  matt branches: 1.4.2;
Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.3 18-Aug-2013  matt Include <arm/cpufunc.h> if !_LOCORE
 1.2 18-Aug-2013  matt Add a CPU_IS_ARMV7_P() macro (nonv7 evals to false, v7 only true, otherwise
cpu_armv7_p is checked (and is set by cpuconf for cortex and pj4b).
 1.1 18-Aug-2013  matt Move the MD parts of <arm/cpu.h> to here.
 1.4.2.3 18-May-2014  rmind sync with head
 1.4.2.2 28-Aug-2013  rmind sync with head
 1.4.2.1 23-Aug-2013  rmind file locore.h was added on branch rmind-smpnet on 2013-08-28 23:59:12 +0000
 1.12.2.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.2.1 01-Feb-2014  matt file locore.h was added on branch matt-nb5-mips64 on 2014-02-15 16:18:36 +0000
 1.16.6.2 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.16.6.1 15-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #240):
sys/arch/arm/include/locore.h: revision 1.18
Guard a few inline functions by #ifndef _RUMPKERNEL, to allow including
this file in rump builds.
 1.16.4.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.16.4.1 28-Mar-2014  yamt file locore.h was added on branch yamt-pagecache on 2014-05-22 11:39:32 +0000
 1.17.2.3 03-Dec-2017  jdolecek update from HEAD
 1.17.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 13-Aug-2014  tls file locore.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.18.2.4 28-Aug-2017  skrll Sync with HEAD
 1.18.2.3 22-Sep-2015  skrll Sync with HEAD
 1.18.2.2 06-Jun-2015  skrll Sync with HEAD
 1.18.2.1 06-Apr-2015  skrll Sync with HEAD
 1.26.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.26.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.29.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.30.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.2.1 10-Jun-2019  christos Sync with HEAD
 1.31.6.1 29-Feb-2020  ad Sync with head.
 1.34.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.34.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 04-Nov-2024  christos Undo previous lwp.h change.
 1.1 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:28 +0000
 1.4 31-Jan-2014  matt Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
 1.3 29-Jan-2014  matt AAPCS64 supports 16-byte long doubles
 1.2 19-Feb-2002  simonb branches: 1.2.160; 1.2.170; 1.2.176;
Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
- Use the above for the __infinity and __nan constants on all
architectures that use the standard ieee754 representation of
those constants.
- Add a single copy of various ieee754 math functions (frexp, isinf,
isnan, ldexp and modf) that had numerous duplicates among the
arch-specific directories.
- Use the above functions on all architectures where the generic C
versions where used. Architectures that had local assembly
routines are untouched (for those functions only).
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file math.h was added on branch thorpej_scsipi on 2001-01-10 19:02:08 +0000
 1.2.176.1 18-May-2014  rmind sync with head
 1.2.170.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.160.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.27 30-Nov-2024  christos Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.26 04-Nov-2024  christos Undo previous lwp.h change.
 1.25 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 1.24 18-May-2024  thorpej branches: 1.24.2;
Clean up the <sys/ucontext.h> <-> <machine/mcontext.h> interface up
a little:
- Define _UC_MD_BIT* constants for the available machine-dependent bits,
and use those constants to define the machine-dependent bits as well
as the machine-independent bits that have machine-dependent values.
- Explicitly generate an error if _UC_TLSBASE, _UC_SETSTACK, or
_UC_CLRSTACK are not defined by <machine/mcontext.h>.
 1.23 06-Oct-2021  skrll More trailing whitespace
 1.22 22-Sep-2021  ryo fix typo in comment
 1.21 12-Oct-2018  ryo add initial support of COMPAT_NETBSD32 on AArch64.
arm ELF32 EABI binaries could be execute in AArch32 state on AArch64. A32 THUMB mode is not supported yet.
 1.20 01-Apr-2018  ryo branches: 1.20.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.19 15-Feb-2018  kamil branches: 1.19.2;
Introduce _UC_MACHINE_FP() as a macro

_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.

Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.


For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).

For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:

./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM LOC_REG (79)

Once ia64 will mature, this should be revisited.

A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.


For the remaining CPUs, reuse standard register as defined in appropriate ABI.

The direct users of this macro are LLVM and GCC with Sanitizers.

Proposed on tech-userlevel@.

Sponsored by <The NetBSD Foundation>
 1.18 24-Mar-2015  matt branches: 1.18.10;
Preserve/restore user r/w tpid in mcontext.
 1.17 18-Mar-2015  joerg Ensure _lwp_setcontext gets consistent language binding.
 1.16 15-Aug-2013  matt branches: 1.16.4; 1.16.6;
If compiling for Thumb1, make __lwp_getprivate_fast call __aeabi_read_tp.
 1.15 08-Dec-2012  matt branches: 1.15.2;
Define the correct __UCONTEXT_SIZE for EABI.
 1.14 08-Dec-2012  christos need stdint.h for uint64_t and it is messy to do it open-coded.
 1.13 07-Dec-2012  matt Extend vfpreg to include all 32 64-bit FP registers.
For __ARM_EABI__, define __vfp_fstmx to have space for all 32 32-bit
FP registers (It's a newly supported ABI so we can "break" binary
compatibility.
 1.12 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.11 03-Aug-2012  matt branches: 1.11.2;
COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.10 13-Feb-2012  matt Modify __lwp_getprivate_fast to call _lwp_getprivate if the mrc instruction
returns 0 (some ARM cores are broken and don't raise an undefined exception
when encountering an unknown or privileged mrc instruction in user mode).
 1.9 07-Apr-2011  matt branches: 1.9.4; 1.9.8;
Add __lwp_getprivate_fast
 1.8 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.7 23-Feb-2011  joerg Fix ucontext32_t on AMD64. Add optional compile time assertions for
ucontext_t and ucontext32_t to ensure that they don't change.
Provide the constants for AMD64, ARM, i386, and M68K.
 1.6 28-Apr-2008  martin branches: 1.6.22; 1.6.28; 1.6.30;
Remove clause 3 and 4 from TNF licenses
 1.5 11-Dec-2005  christos branches: 1.5.76; 1.5.78; 1.5.80;
merge ktrace-lwp.
 1.4 08-Oct-2003  thorpej Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
special handling on some platforms).
 1.3 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.2 17-Jan-2003  thorpej branches: 1.2.2;
Merge the nathanw_sa branch.
 1.1 14-Nov-2001  thorpej branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.3 17-Dec-2002  thorpej Add VFP context to mcontext_t.
 1.1.2.2 28-Dec-2001  nathanw Add a macro, _UC_MACHINE_SP(), to fetch the user stack pointer from
a ucontext_t.
 1.1.2.1 14-Nov-2001  thorpej ARM-specific mcontext support. From Klaus Klein <kleink@netbsd.org>.
 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.80.1 16-May-2008  yamt sync with head.
 1.5.78.1 18-May-2008  yamt sync with head.
 1.5.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.30.1 05-Mar-2011  bouyer Sync with HEAD
 1.6.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.22.2 21-Apr-2011  rmind sync with head
 1.6.22.1 05-Mar-2011  rmind sync with head
 1.9.8.1 18-Feb-2012  mrg merge to -current.
 1.9.4.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.9.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.9.4.2 30-Oct-2012  yamt sync with head
 1.9.4.1 17-Apr-2012  yamt sync with head
 1.11.2.3 03-Dec-2017  jdolecek update from HEAD
 1.11.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 25-Feb-2013  tls resync with head
 1.15.2.1 28-Aug-2013  rmind sync with head
 1.16.6.1 06-Apr-2015  skrll Sync with HEAD
 1.16.4.1 21-Mar-2015  snj Pull up following revision(s) (requested by joerg in ticket #633):
sys/arch/arm/include/mcontext.h: revision 1.17
Ensure _lwp_setcontext gets consistent language binding.
 1.18.10.3 21-Mar-2018  martin Pull up the following, requested by kamil in ticket #552:

external/gpl3/gcc{.old}/dist/libsanitizer/asan/asan_linux.cc 1.4
sys/arch/aarch64/include/mcontext.h 1.2
sys/arch/alpha/include/mcontext.h 1.9
sys/arch/amd64/include/mcontext.h 1.19
sys/arch/arm/include/mcontext.h 1.19
sys/arch/hppa/include/mcontext.h 1.9
sys/arch/i386/include/mcontext.h 1.14
sys/arch/ia64/include/mcontext.h 1.6
sys/arch/m68k/include/mcontext.h 1.10
sys/arch/mips/include/mcontext.h 1.22
sys/arch/or1k/include/mcontext.h 1.2
sys/arch/powerpc/include/mcontext.h 1.18
sys/arch/riscv/include/mcontext.h 1.5
sys/arch/sh3/include/mcontext.h 1.11
sys/arch/sparc/include/mcontext.h 1.14-1.17
sys/arch/sparc64/include/mcontext.h 1.10
sys/arch/vax/include/mcontext.h 1.9
tests/lib/libc/sys/Makefile 1.50
tests/lib/libc/sys/t_ucontext.c 1.2-1.5
sys/arch/hppa/include/mcontext.h 1.10
sys/arch/ia64/include/mcontext.h 1.7

- Introduce _UC_MACHINE_FP(). _UC_MACHINE_FP() is a helper
macro to extract from mcontext a frame pointer.
- Add new tests in lib/libc/sys/t_ucontext:
* ucontext_sp (testing _UC_MACHINE_SP)
* ucontext_fp (testing _UC_MACHINE_FP)
* ucontext_pc (testing _UC_MACHINE_PC)
* ucontext_intrv (testing _UC_MACHINE_INTRV)

Add a dummy implementation of _UC_MACHINE_INTRV() for ia64.

Implement _UC_MACHINE_INTRV() for hppa.

Make the t_ucontext.c test more portable.

We now have _UC_MACHINE_FP.
 1.18.10.2 26-Feb-2018  snj revert ticket 552, which broke the build
 1.18.10.1 25-Feb-2018  snj Pull up following revision(s) (requested by kamil in ticket #552):
sys/arch/aarch64/include/mcontext.h: 1.2
sys/arch/alpha/include/mcontext.h: 1.9
sys/arch/amd64/include/mcontext.h: 1.19
sys/arch/arm/include/mcontext.h: 1.19
sys/arch/hppa/include/mcontext.h: 1.9
sys/arch/i386/include/mcontext.h: 1.14
sys/arch/ia64/include/mcontext.h: 1.6
sys/arch/m68k/include/mcontext.h: 1.10
sys/arch/mips/include/mcontext.h: 1.22
sys/arch/or1k/include/mcontext.h: 1.2
sys/arch/powerpc/include/mcontext.h: 1.18
sys/arch/riscv/include/mcontext.h: 1.5
sys/arch/sh3/include/mcontext.h: 1.11
sys/arch/sparc/include/mcontext.h: 1.14-1.17
sys/arch/sparc64/include/mcontext.h: 1.10
sys/arch/vax/include/mcontext.h: 1.9
tests/lib/libc/sys/Makefile: 1.50
tests/lib/libc/sys/t_ucontext.c: 1.2
Introduce _UC_MACHINE_FP() as a macro
_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.
Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.
For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).
For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:
./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM LOC_REG (79)
Once ia64 will mature, this should be revisited.
A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.
For the remaining CPUs, reuse standard register as defined in appropriate ABI.
The direct users of this macro are LLVM and GCC with Sanitizers.
Proposed on tech-userlevel@.
Sponsored by <The NetBSD Foundation>
--
Improve _UC_MACHINE_FP() for SPARC/SPARC64
Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.
Algorithm:
uptr *stk_ptr;
# if defined (__arch64__)
stk_ptr = (uptr *) (*sp + 2047);
# else
stk_ptr = (uptr *) *sp;
# endif
*bp = stk_ptr[15];
Noted by <mrg>
--
Make _UC_MACHINE_FP() compile again and fix it so that it does not add
the offset twice.
--
fix _UC_MACHINE32_FP() -- use 32 bit pointer value so that [15] is
the right offset. do this by using __greg32_t, which is only in
the sparc64 version, and these are only useful there, so move them.
--
Add new tests in lib/libc/sys/t_ucontext
New tests:
- ucontext_sp
- ucontext_fp
- ucontext_pc
- ucontext_intrv
They test respectively:
- _UC_MACHINE_SP
- _UC_MACHINE_FP
- _UC_MACHINE_PC
- _UC_MACHINE_INTRV
These tests attempt to access and print the values from ucontext, without
interpreting the values.
This is a follow up of the _UC_MACHINE_FP() introduction.
These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.
Sponsored by <The NetBSD Foundation>
 1.19.2.2 20-Oct-2018  pgoyette Sync with head
 1.19.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.20.2.1 10-Jun-2019  christos Sync with HEAD
 1.24.2.1 02-Aug-2025  perseant Sync with HEAD
 1.29 12-Jul-2023  riastradh machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.
 1.28 11-Jul-2023  riastradh arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
 1.27 26-Dec-2021  skrll branches: 1.27.4;
port-arm/50563: pool allocator corruption due to __MUTEX_PRIVATE

This file has moved on somewhat since the PR was raised, but nevertheless
let's add the CTASSERT "just in case".
 1.26 25-Aug-2021  thorpej - In kern_mutex.c, if MUTEX_CAS() is not defined, define it in terms of
atomic_cas_ulong().
- For arm, ia64, m68k, mips, or1k, riscv, vax: don't define our own
MUTEX_CAS(), as they either use atomic_cas_ulong() or equivalent
(atomic_cas_uint() on m68k).
- For alpha and sparc64, don't define MUTEX_CAS() in terms of their own
_lock_cas(), which has its own memory barriers; the call sites in
kern_mutex.c already have the appropriate memory barrier calls. Thus,
alpha and sparc64 can use default definition.
- For sh3, don't define MUTEX_CAS() in terms of its own _lock_cas();
atomic_cas_ulong() is strong-aliased to _lock_cas(), therefore defining
our own MUTEX_CAS() is redundant.

Per thread:
https://mail-index.netbsd.org/tech-kern/2021/07/25/msg027562.html
 1.25 01-Dec-2020  skrll G/C MUTEX_PAUSE_{PAUSE,WAKE}
 1.24 01-Dec-2020  skrll Trailing whitespace
 1.23 05-Mar-2020  riastradh branches: 1.23.4;
Fix userland build by surrounding stuff with #ifdef _KERNEL.

(...Why does this header file get exposed to userland at all?)
 1.22 05-Mar-2020  riastradh Remove __MUTEX_PRIVATE conditional in definition of struct kmutex.

This doesn't buy us anything but the need to hack around it in
ctfmerge to avoid massive duplication of kernel types -- which only
worked for the x86 definition.

This changes only x86 and arm for now, pending compile-testing the
remaining architectures.
 1.21 29-Nov-2019  riastradh Nix now-unused definitions of MUTEX_GIVE/MUTEX_RECEIVE.
 1.20 25-Feb-2015  joerg branches: 1.20.18; 1.20.22;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.19 08-Nov-2014  skrll branches: 1.19.2;
Clarify/merge two comments
 1.18 12-Oct-2014  skrll Typo in comment.
 1.17 08-Aug-2014  skrll branches: 1.17.2;
Update a comment. Probably still needs tweaking further.
 1.16 12-Jun-2014  ozaki-r Fix ARMv7 checks

_ARM_ARCH_7 && !_ARM_ARCH_6 never be true.
 1.15 12-Jun-2014  ozaki-r Fix macro name; MUTEX_RECEIVE => MUTEX_GIVE
 1.14 28-Mar-2014  matt branches: 1.14.2;
Use dmb/dsb
 1.13 25-Sep-2012  matt branches: 1.13.2;
Back out 1.12 and include a comment as to why.
 1.12 31-Aug-2012  matt branches: 1.12.2;
Move the __cpu_simple_lock to the last byte so it's easier to read in dumps
 1.11 16-Aug-2012  matt Actually use the assembly version of the atomic function if compiling
for armv6 or armv7 cpus. Use atomic_cas_ptr instead of _lock_cas so
we pick up the assembly version when it's used.
 1.10 28-Apr-2008  martin branches: 1.10.18; 1.10.34; 1.10.42;
Remove clause 3 and 4 from TNF licenses
 1.9 29-Nov-2007  ad branches: 1.9.14; 1.9.16; 1.9.18;
- Change _lock_cas() to do compare-and-swap instead of compare-and-set.
- Add aliases for atomic_cas_ulong() and friends.
 1.8 21-Nov-2007  yamt make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
 1.7 09-Mar-2007  thorpej branches: 1.7.2; 1.7.8; 1.7.16; 1.7.18; 1.7.20; 1.7.22; 1.7.26; 1.7.28;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.6 09-Mar-2007  skrll Typo in comment.
 1.5 09-Mar-2007  thorpej Elaborate a bit more in the first paragraph.
 1.4 09-Mar-2007  thorpej Update the theory statement for the ARM mutex implementation.

There is still work to be done here.
 1.3 09-Mar-2007  thorpej Make ipl_t and ipl_cookie_t 8-bit values. kmutex is now down to 12 bytes
(from 20) on ARM.

Approved by Matt Thomas.
 1.2 09-Mar-2007  thorpej Make __cpu_simple_lock_t an unsigned char if _KERNEL, and operate on it
using SWPB.

Approved by Matt Thomas.
 1.1 18-Feb-2007  matt branches: 1.1.2; 1.1.6;
Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.1.6.3 12-Mar-2007  rmind Sync with HEAD.
 1.1.6.2 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.1 18-Feb-2007  yamt file mutex.h was added on branch yamt-idlelwp on 2007-02-27 16:49:36 +0000
 1.1.2.4 07-Dec-2007  yamt sync with head
 1.1.2.3 03-Sep-2007  yamt sync with head.
 1.1.2.2 26-Feb-2007  yamt sync with head.
 1.1.2.1 18-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:59 +0000
 1.7.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.26.1 21-Nov-2007  bouyer Sync with HEAD
 1.7.22.1 09-Jan-2008  matt sync with HEAD
 1.7.20.1 01-Jan-2008  chris Sync with HEAD.
 1.7.18.2 03-Dec-2007  joerg Sync with HEAD.
 1.7.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.7.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.7.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.7.2.1 03-Dec-2007  ad Sync with HEAD.
 1.9.18.1 16-May-2008  yamt sync with head.
 1.9.16.1 18-May-2008  yamt sync with head.
 1.9.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.42.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.10.34.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.10.34.1 30-Oct-2012  yamt sync with head
 1.10.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.2.1 18-May-2014  rmind sync with head
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.17.2.1 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.19.2.1 06-Apr-2015  skrll Sync with HEAD
 1.20.22.1 13-May-2020  martin Pull up following revision(s) (requested by chs in ticket #904):

sys/arch/x86/include/mutex.h: revision 1.8
sys/arch/x86/include/mutex.h: revision 1.9
sys/arch/arm/include/mutex.h: revision 1.22
sys/arch/arm/include/mutex.h: revision 1.23

Remove __MUTEX_PRIVATE conditional in definition of struct kmutex.

This doesn't buy us anything but the need to hack around it in
ctfmerge to avoid massive duplication of kernel types -- which only
worked for the x86 definition.

This changes only x86 and arm for now, pending compile-testing the
remaining architectures.

Fix userland build by surrounding stuff with #ifdef _KERNEL.
(...Why does this header file get exposed to userland at all?)
 1.20.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23.4.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.27.4.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.4 06-Nov-2021  thorpej COMPAT_NETBSD32 is all about running the 32-bit flavor of native
binaries on a 64-bit platform[*], as such:
- Make the logic about which "sendsig" flavor to call MI (as it is in the
native 64-bit environment) and follow the same rules as the native 32-bit
environment.
- Make COMPAT_NETBSD32 x COMPAT_16 work the same as it would in the
native 32-bit environment by providing a netbsd32_sendsig_sigcontext_16_hook,
rather than overriding the entire sendsig logic with a netbsd32_sendsig_hook.
- In netbsd32___sigaction_sigtramp(), make sure the compat_netbsd32_16
module is loaded if the trampoline version specifies a sigcontext style
handler, otherwise return EINVAL so that libc can try again with siginfo
style.

[*] ...except for arm32, which uses it to mean "run 32-bit OABI binaries
from the 32-bit EABI environment". Doing it this way was arguably a mistake,
but we are stuck with it for now, so support it by providing a machine-
dependent override for netbsd32_sendsig() that also disables the corresponding
logic in netbsd32___sigaction_sigtramp().

Fixes PR kern/56487.
 1.3 06-Oct-2021  skrll More trailing whitespace
 1.2 31-Oct-2017  martin Allow architectures to define a macro PROC_MACHINE_ARCH(P) and
PROC_MACHINE_ARCH32(P) to override the value for sysctl hw.machine_arch
(native and netbsd32 commpat resp.).

Use these for arm and mips instead of the (not working, noisy, in case
of arm) sysctl override and #ifdef __mips__ in architecture neutral
code.
 1.1 03-Aug-2012  matt branches: 1.1.2; 1.1.4; 1.1.6;
COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.1.6.2 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.6.1 03-Aug-2012  matt file netbsd32_machdep.h was added on branch matt-nb6-plus on 2012-11-28 22:40:29 +0000
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 03-Aug-2012  yamt file netbsd32_machdep.h was added on branch yamt-pagecache on 2012-10-30 17:19:04 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.3 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.2 30-May-2001  mrg branches: 1.2.8; 1.2.168; 1.2.178;
use _KERNEL_OPT
 1.1 23-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file ofisa_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:22 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.178.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.168.1 30-Oct-2012  yamt sync with head
 1.2.8.2 30-May-2001  mrg use _KERNEL_OPT
 1.2.8.1 30-May-2001  mrg file ofisa_machdep.h was added on branch nathanw_sa on 2001-05-30 12:28:41 +0000
 1.5 13-Sep-2014  matt vm_offset_t -> vaddr_t, vm_size_t -> vsize_t
nuke vm_offset_t and vm_size_t
 1.4 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.3 14-Mar-2009  dsl branches: 1.3.12; 1.3.22; 1.3.26;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 26-Oct-2006  bjh21 branches: 1.2.58; 1.2.66; 1.2.72;
Change the type of initarm() on OFW-based ARM systems to match other non-hpcarm
ports. This seems sensible since all of them call it from the same locore.S.
This makes NetBSD/shark GENERIC compile.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.44; 1.1.74; 1.1.76;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.76.1 10-Dec-2006  yamt sync with head.
 1.1.74.1 18-Nov-2006  ad Sync with head.
 1.1.44.1 30-Dec-2006  yamt sync with head.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file ofw.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.2.72.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.66.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.58.1 04-May-2009  yamt sync with head.
 1.3.26.1 18-May-2014  rmind sync with head
 1.3.22.2 03-Dec-2017  jdolecek update from HEAD
 1.3.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.12.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.24 19-Jul-2021  christos Remove definitions for CACHE_LINE_SIZE and COHERENCY_UNIT which are the same
as the default.
 1.23 16-Aug-2020  skrll branches: 1.23.6;
Define COHERENCY_UNIT and CACHE_LINE_SIZE to fix arm builds.

The recent change to cpu.h and struct cpu_info needs an early definition
for the ARM_INTR_IMPLs that want to inline the spl functions and get
{,set_}curcpl() from cpu.h
 1.22 07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.21 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.20 26-Aug-2016  mlelstv branches: 1.20.14; 1.20.16;
The 64MB was intended.
 1.19 26-Oct-2013  matt branches: 1.19.6;
Use CPP symbols to determine the right MACHINE_ARCH
 1.18 22-Apr-2013  matt branches: 1.18.4;
Add earm MACHINE_ARCH for __ARM_EABI__
 1.17 03-Aug-2012  matt branches: 1.17.2;
Adjust ALIGNBYTES32 depending on __ARM_EABI__
 1.16 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.15 24-Jan-2012  christos branches: 1.15.4;
Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
 1.14 20-Jan-2012  joerg Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.13 06-May-2010  joerg branches: 1.13.8; 1.13.12;
Limit mbuf clusters to 64MB. Forgotten part of the February commit.
 1.12 29-Aug-2008  matt branches: 1.12.12; 1.12.14; 1.12.16;
Remove non-__ELF__ snippets.
 1.11 28-Aug-2006  yamt branches: 1.11.58; 1.11.62; 1.11.64; 1.11.68;
- remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
ctod
dtoc
ctob
btoc
dbtob
btodb
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 14-Feb-2004  jdolecek branches: 1.9.16;
add compat hook in check for zerodev; use this hook to recognize
the old ARM /dev/zero minor mapping #ifdef COMPAT_16
fixes second part of PR kern/23581 by Richard Earnshaw
 1.8 11-Nov-2003  scw The previous commit had a #endif in the wrong place.
 1.7 09-Nov-2003  scw Pick the right value for {,_}MACHINE_ARCH according to endianness.
Spotted by mrg@.
 1.6 26-Feb-2002  simonb branches: 1.6.18;
Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.5 12-Feb-2002  thorpej * For platforms which are already ELF, remove the definition of
MACHINE_ARCH since <arm/param.h> already sets it correctly to "arm".
* For platforms which are not yet ELF, defined MACHINE_ARCH to "arm32"
if __ELF__ is not defined by the C preprocessor.
* In <arm/param.h>, clarify the rules about when MACHINE and
MACHINE_ARCH are defined, and to what. Also, for ELF platforms,
int the non-_KERNEL case, force both MACHINE and MACHINE_ARCH to "arm",
rather than allowing platform-specifc code to define either.
 1.4 07-Aug-2001  bjh21 branches: 1.4.6;
Add macros to hide the details of stack-pointer alignment.
 1.3 14-Jul-2001  matt Clarify when/where MACHINE & MACHINE_ARCH are defined. Add default
user-visible definitions.
 1.2 13-Jul-2001  matt Move user-visible MBUF constant here. Define MAXPHYS. Include DEV_BSIZE
 1.1 23-Jun-2001  bjh21 branches: 1.1.2;
Add a common <arm/param.h>, containing those few things that are obviously
common across all ARM systems.
 1.1.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.4.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.6.1 07-Aug-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:07:33 +0000
 1.6.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.18.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.68.1 19-Oct-2008  haad Sync with HEAD.
 1.11.64.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.11.62.2 11-Aug-2010  yamt sync with head.
 1.11.62.1 04-May-2009  yamt sync with head.
 1.11.58.1 28-Sep-2008  mjf Sync with HEAD.
 1.12.16.1 30-May-2010  rmind sync with head
 1.12.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.12.12.4 27-Mar-2014  matt #define ALIGNBYTES __ALIGNBYTES
 1.12.12.3 27-Mar-2014  matt Make ALIGNBYTES use __ALIGNBYTES
 1.12.12.2 15-Feb-2014  matt Fix typo STACK_ALIGNBYTES -> STACKALIGNBYTES
 1.12.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.13.12.1 18-Feb-2012  mrg merge to -current.
 1.13.8.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.13.8.2 30-Oct-2012  yamt sync with head
 1.13.8.1 17-Apr-2012  yamt sync with head
 1.15.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.17.2.3 03-Dec-2017  jdolecek update from HEAD
 1.17.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1 23-Jun-2013  tls resync from head
 1.18.4.1 18-May-2014  rmind sync with head
 1.19.6.1 05-Oct-2016  skrll Sync with HEAD
 1.20.16.1 10-Jun-2019  christos Sync with HEAD
 1.20.14.2 18-Jan-2019  pgoyette Synch with HEAD
 1.20.14.1 20-Oct-2018  pgoyette Sync with head
 1.23.6.1 01-Aug-2021  thorpej Sync with HEAD.
 1.29 29-Mar-2020  skrll Support PMAP_FAULTINFO on arm
 1.28 24-Jan-2018  skrll branches: 1.28.4;
Remove port-acorn26

OK core@
 1.27 11-Jan-2013  matt Don't include <machine/fp.h> since it no longer exists
 1.26 26-Dec-2012  matt Remove pcb_fpstate.
Add pcb_kernel_vfp.
 1.25 10-Dec-2012  matt Rename pcb_sp/PCB_SP to pcb_ksp/PCB_KSP so that ipsec.c will compile.
 1.24 16-Aug-2012  matt branches: 1.24.2;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.23 14-Aug-2012  matt Kill curpcb/ci_curpcb. Use device_t in cpu_info.
Add ci_softc (where ci_curpcb was so cpu_info doesn't change).
 1.22 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.21 08-Aug-2012  skrll Update comment.
 1.20 07-Apr-2011  matt branches: 1.20.4; 1.20.12;
Add a define for pcb_user_pid_rw
 1.19 27-Apr-2008  matt branches: 1.19.18; 1.19.22; 1.19.28;
Merge kernel changes in matt-armv6 to HEAD.
 1.18 15-Mar-2008  rearnsha branches: 1.18.2; 1.18.4;
VFP support.
 1.17 19-Jan-2008  chris branches: 1.17.2; 1.17.6;
With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.16 17-Oct-2007  garbled branches: 1.16.2; 1.16.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.14 04-Mar-2007  christos branches: 1.14.2; 1.14.10; 1.14.16; 1.14.18; 1.14.20; 1.14.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.13 27-Sep-2006  manu branches: 1.13.4;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.12 11-Dec-2005  christos branches: 1.12.20; 1.12.22;
merge ktrace-lwp.
 1.11 25-Oct-2003  scw branches: 1.11.16;
Enable alignment faults on arm32 for both kernel and userland.

If COMPAT_15 and EXEC_AOUT are defined, support per-process
alignment checking where AFLTs are always enabled when running
kernel code and userland ELF binaries, and dynamically disabled/
enabled when switching to/from a.out binaries. This is necessary
in order to execute older a.out binaries, where gcc made
deliberate use of misaligned loads under certain circumstances.
 1.10 13-Oct-2003  scw Document the need for pcb32_r8 to be quad-aligned, now that cpuswitch()
uses Xscale's "strd" instruction.
 1.9 21-May-2003  thorpej branches: 1.9.2;
Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.8 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.7 23-Feb-2003  thorpej Change pcb32_pagedir to a paddr_t (after all, it's used as a paddr_t
everywhere in the code).
 1.6 19-Oct-2002  bjh21 branches: 1.6.2;
Undo recent cpu_switch register usage changes in order to decrease nathanw_sa
merge pain.
 1.5 18-Oct-2002  bjh21 In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.4 12-Oct-2002  bjh21 Move curpcb into struct cpu_info in MULTIPROCESSOR kernels.
 1.3 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.2 09-Sep-2001  toshii branches: 1.2.2; 1.2.6;
Don't define pcb_* register macros.
pcb_sp macro conflicts with sys/netinet6/ipsec.c.
 1.1 03-Sep-2001  matt branches: 1.1.2;
Add a merged <pcb.h> for arm26/arm32.
 1.1.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 09-Sep-2001  nathanw file pcb.h was added on branch nathanw_sa on 2002-01-08 00:23:11 +0000
 1.2.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 09-Sep-2001  thorpej file pcb.h was added on branch kqueue on 2001-09-13 01:13:10 +0000
 1.6.2.2 19-Oct-2002  bjh21 Re-do the following revisions, this time on a branch where they won't
interfere with the nathanw_sa merge:

syssrc/sys/arch/arm/arm32/cpuswitch.S 1.26
syssrc/sys/arch/arm/arm32/genassym.cf 1.18
syssrc/sys/arch/arm/arm32/vm_machdep.c 1.21
syssrc/sys/arch/arm/include/pcb.h 1.5

Original commit message:

In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.6.2.1 19-Oct-2002  bjh21 file pcb.h was added on branch bjh21-hydra on 2002-10-19 11:59:37 +0000
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.5 17-Mar-2008  yamt sync with head.
 1.11.16.4 21-Jan-2008  yamt sync with head
 1.11.16.3 27-Oct-2007  yamt sync with head.
 1.11.16.2 03-Sep-2007  yamt sync with head.
 1.11.16.1 30-Dec-2006  yamt sync with head.
 1.12.22.1 22-Oct-2006  yamt sync with head
 1.12.20.1 18-Nov-2006  ad Sync with head.
 1.13.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.22.3 23-Mar-2008  matt sync with HEAD
 1.14.22.2 06-Nov-2007  matt sync with HEAD
 1.14.22.1 28-Aug-2007  matt Add space in pcb32 for the armv6 coprocessor registers which store the two
user thread/process ids (one is read-only, one is read-write by user).
 1.14.20.3 21-Mar-2008  chris Sync with head.
 1.14.20.2 20-Jan-2008  chris Sync to HEAD.
 1.14.20.1 01-Jan-2008  chris Sync with HEAD.
 1.14.18.1 02-Oct-2007  joerg Sync with HEAD.
 1.14.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.14.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.14.10.1 03-Oct-2007  garbled Sync with HEAD
 1.14.2.1 09-Oct-2007  ad Sync with head.
 1.16.8.1 20-Jan-2008  bouyer Sync with HEAD
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.17.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.17.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.2.1 24-Mar-2008  keiichi sync with head.
 1.18.4.1 16-May-2008  yamt sync with head.
 1.18.2.1 18-May-2008  yamt sync with head.
 1.19.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.22.1 21-Apr-2011  rmind sync with head
 1.19.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.20.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.20.4.3 23-Jan-2013  yamt sync with head
 1.20.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.20.4.1 30-Oct-2012  yamt sync with head
 1.24.2.1 25-Feb-2013  tls resync with head
 1.28.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.18 13-Feb-2020  jmcneill Add support for multiple GICv3 ITS domains.
 1.17 08-Dec-2018  jmcneill branches: 1.17.6;
Add support for decoding PCI ID mappings using IO remapping tables (IORT).
 1.16 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.15 02-Nov-2018  jmcneill Add support for multiple PCI segments.
 1.14 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.13 06-Sep-2018  jmcneill Define _PCI_HAVE_DMA64 for aarch64
 1.12 19-Apr-2017  jmcneill branches: 1.12.10; 1.12.12;
Provide a pci_intr_setattr implementation. For chipset tags that don't
implement pc_intr_setattr, simply return ENODEV.
 1.11 16-Apr-2017  jmcneill Add function ptr for pci_intr_setattr to struct arm32_pci_chipset
 1.10 29-Mar-2014  christos branches: 1.10.6; 1.10.10; 1.10.14;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.9 06-Sep-2012  matt branches: 1.9.2; 1.9.4;
Change pci_conf_hook to pass pc->conf_v
Add pci_conf_interrupt
 1.8 02-Sep-2012  matt Use device_t
 1.7 04-Apr-2011  dyoung branches: 1.7.4; 1.7.12;
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.6 24-Oct-2008  matt branches: 1.6.12; 1.6.16; 1.6.22;
Add pci_conf_hook entry. Add pc_cfg_cmd cell for pci_conf_write optimization.
 1.5 17-Mar-2008  kiyohara branches: 1.5.4; 1.5.10;
Enclose "#ifndef _ARM_PCI_MACHIDEP_H_".
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.52; 1.4.72; 1.4.76;
merge ktrace-lwp.
 1.3 29-Jul-2004  drochner branches: 1.3.12;
remove now unnecessary "pci_enumerate_bus" definitions
 1.2 15-May-2002  thorpej branches: 1.2.12;
Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.10;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.10.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file pci_machdep.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.2.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.12.1 03-Aug-2004  skrll Sync with HEAD
 1.3.12.1 24-Mar-2008  yamt sync with head.
 1.4.76.2 17-Jan-2009  mjf Sync with HEAD.
 1.4.76.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.72.1 24-Mar-2008  keiichi sync with head.
 1.4.52.1 23-Mar-2008  matt sync with HEAD
 1.4.50.1 21-Mar-2008  chris Sync with head.
 1.5.10.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.5.4.1 04-May-2009  yamt sync with head.
 1.6.22.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.16.1 21-Apr-2011  rmind sync with head
 1.6.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.7.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.4.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.7.4.1 30-Oct-2012  yamt sync with head
 1.9.4.1 18-May-2014  rmind sync with head
 1.9.2.2 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.10.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.10.6.1 28-Aug-2017  skrll Sync with HEAD
 1.12.12.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.12.1 10-Jun-2019  christos Sync with HEAD
 1.12.10.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12.10.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.12.10.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.17.6.1 29-Feb-2020  ad Sync with head.
 1.3 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12; 1.2.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 23-Feb-2001  reinoud branches: 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file pio.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.2.16.1 18-May-2014  rmind sync with head
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 26-Nov-2001  thorpej Remove dummy includes.
 1.1 29-Jul-2001  chris branches: 1.1.2; 1.1.8;
PR 13581
Add empty pmap.h and vmparam.h to make userland happier.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 29-Jul-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 29-Jul-2001  lukem file pmap.h was added on branch kqueue on 2001-08-03 04:11:01 +0000
 1.4 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.3 09-Aug-2002  thorpej branches: 1.3.2; 1.3.4; 1.3.6; 1.3.206; 1.3.208;
* PMC_TYPE_I80200 -> PMC_CLASS_I80200 to reflect the terminology
used in pmc(3).
* Some minor namespace cleanup.
 1.2 07-Aug-2002  thorpej * XSCALE_PMC_TYPE_I80200 -> PMC_TYPE_I80200
* XSCALE_PMC_TYPE_CCNT -> PMC_TYPE_I80200_CCNT
* XSCALE_PMC_TYPE_PMCx -> PMC_TYPE_I80200_PMCx

Per discussion with Allen Briggs.
 1.1 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.3.208.1 10-Jun-2019  christos Sync with HEAD
 1.3.206.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.6.1 09-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:32:39 +0000
 1.3.4.2 30-Aug-2002  gehenna catch up with -current.
 1.3.4.1 09-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-30 00:19:12 +0000
 1.3.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.3.2.1 09-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:17:53 +0000
 1.20 10-Feb-2024  andvar Fix various typos in comments, log messages and documentation.
 1.19 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.18 31-Oct-2017  martin Allow architectures to define a macro PROC_MACHINE_ARCH(P) and
PROC_MACHINE_ARCH32(P) to override the value for sysctl hw.machine_arch
(native and netbsd32 commpat resp.).

Use these for arm and mips instead of the (not working, noisy, in case
of arm) sysctl override and #ifdef __mips__ in architecture neutral
code.
 1.17 24-Feb-2014  christos consistency in include protection
 1.16 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.15 11-Sep-2013  matt Add md_march and PROC0_MD_INITIALIZERS
 1.14 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.13 25-Dec-2012  matt branches: 1.13.2;
Fix comment. Add MDLWP_VFPINTR
 1.12 16-Aug-2012  matt branches: 1.12.2;
small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.11 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.10 14-Jan-2011  rmind branches: 1.10.8; 1.10.16;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.9 21-Nov-2009  rmind branches: 1.9.4;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.8 29-Aug-2008  matt branches: 1.8.12;
use uint32_t.
 1.7 15-Mar-2008  rearnsha branches: 1.7.4; 1.7.6; 1.7.10;
VFP support.
 1.6 05-Mar-2003  agc branches: 1.6.18; 1.6.80; 1.6.82; 1.6.102; 1.6.106;
Forward declare struct lwp as well as struct trapframe.
 1.5 01-Mar-2003  thorpej Do the syscall_plain/syscall_fancy dance on ARM. Shaves a fair number
of cycles off the syscall overhead.

Since all COMPAT_LINUX platforms now support __HAVE_SYSCALL_INTERN,
garbage-collect the LINUX_SYSCALL_FUNCTION stuff.
 1.4 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.2 28-Feb-2001  bjh21 branches: 1.2.4; 1.2.6; 1.2.10; 1.2.18;
PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26). Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway). Someone should try running one.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.18.1 30-Aug-2002  gehenna catch up with -current.
 1.2.10.3 31-Dec-2002  thorpej Put PMC state into mdproc, not mdlwp; the PMC state should be per-proc.

Per discussion with Allen Briggs.
 1.2.10.2 13-Aug-2002  nathanw Catch up to -current.
 1.2.10.1 14-Nov-2001  thorpej Garbage-collect the __spare0 and __spare1 fields from mdproc; they're
not used (obivously), and the space doesn't really need to be reserved.

This leaves us with an empty mdproc.

Add an empty mdlwp.
 1.2.6.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 28-Feb-2001  bouyer file proc.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.6.106.2 28-Sep-2008  mjf Sync with HEAD.
 1.6.106.1 03-Apr-2008  mjf Sync with HEAD.
 1.6.102.1 24-Mar-2008  keiichi sync with head.
 1.6.82.1 23-Mar-2008  matt sync with HEAD
 1.6.80.1 21-Mar-2008  chris Sync with head.
 1.6.18.1 17-Mar-2008  yamt sync with head.
 1.7.10.1 19-Oct-2008  haad Sync with HEAD.
 1.7.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.7.4.2 11-Mar-2010  yamt sync with head
 1.7.4.1 04-May-2009  yamt sync with head.
 1.8.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.9.4.1 05-Mar-2011  rmind sync with head
 1.10.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.10.8.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.10.8.2 23-Jan-2013  yamt sync with head
 1.10.8.1 30-Oct-2012  yamt sync with head
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 25-Feb-2013  tls resync with head
 1.13.2.2 18-May-2014  rmind sync with head
 1.13.2.1 28-Aug-2013  rmind sync with head
 1.18 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.17 11-Jan-2015  joerg ARM has deprecated using both PC and LR in the register list of pop with
ARMv6T2, so split the instructions up.
 1.16 28-Nov-2014  skrll branches: 1.16.2;
Fix __mcount in the !(__ARM_EABI__) case by popping the right number of
registers on exit.
 1.15 13-Aug-2014  matt Don't save r4 since we don't use it.
 1.14 11-May-2014  joerg branches: 1.14.2;
Provide a non-EHABI version of the mcount glue.
 1.13 30-Nov-2013  joerg branches: 1.13.2;
Like asm.h r1.25, don't use (PLT) anymore.
 1.12 12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.11 18-Aug-2013  matt Don't use cfi ops in non EABI MCOUNT
 1.10 16-Aug-2013  matt __mcount is always arm code (even if compiled -mthumb).
Add .cfi for unwind tables
 1.9 15-Aug-2013  matt Add an EABI ARM version of MCOUNT that doesn't do ARM26 compat.
Add an EABI Thumb version of MCOUNT (doesn't do ARM26 compat either).
Add .size to all MCOUNT
 1.8 29-Aug-2008  matt branches: 1.8.28; 1.8.38; 1.8.44;
Remove non-__ELF__ snippets.
 1.7 24-Dec-2005  perry branches: 1.7.76; 1.7.80; 1.7.82; 1.7.86;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.6 14-Aug-2002  briggs branches: 1.6.24;
Inline SetCPSR calls where it seems prudent to do so. This avoids two
branches and allows the compiler to better utilize registers around
calls to disable/enable/restore_interrupts().
 1.5 24-Mar-2002  bjh21 branches: 1.5.2;
arm26->acorn26 transition.
 1.4 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.3 16-Jul-2001  matt branches: 1.3.6;
Need to emit PLT magic for PIC ELF files.
 1.2 04-May-2001  bjh21 branches: 1.2.2;
Make the common <arm/profile.h> work on arm26 and arm32, choosing whether
to munge R15 or not at runtime. Also make it work with both ELF and a.out.
 1.1 23-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file profile.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.6.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.6.1 16-Jul-2001  nathanw file profile.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.5.2.1 30-Aug-2002  gehenna catch up with -current.
 1.6.24.1 21-Jun-2006  yamt sync with head.
 1.7.86.1 19-Oct-2008  haad Sync with HEAD.
 1.7.82.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.7.80.1 04-May-2009  yamt sync with head.
 1.7.76.1 28-Sep-2008  mjf Sync with HEAD.
 1.8.44.2 18-May-2014  rmind sync with head
 1.8.44.1 28-Aug-2013  rmind sync with head
 1.8.38.2 03-Dec-2017  jdolecek update from HEAD
 1.8.38.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.28.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.13.2.1 10-Aug-2014  tls Rebase.
 1.14.2.2 02-Jun-2015  snj Pull up following revision(s) (requested by joerg in ticket #813):
sys/arch/arm/include/profile.h: revision 1.17 via patch
ARM has deprecated using both PC and LR in the register list of pop with
ARMv6T2, so split the instructions up.
 1.14.2.1 01-Dec-2014  martin Pull up following revision(s) (requested by skrll in ticket #273):
sys/arch/arm/include/profile.h: revision 1.16
Fix __mcount in the !(__ARM_EABI__) case by popping the right number of
registers on exit.
 1.16.2.1 06-Apr-2015  skrll Sync with HEAD
 1.2 26-Nov-2001  thorpej Remove Shark-specific header file.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.10;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file profileio.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.5 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.4 02-Nov-2001  rearnsha branches: 1.4.2;
Define L1_FPAGE for fine page entries in L1 page table.
 1.3 27-Oct-2001  rearnsha Export pte_cache_mode. Define PT_CACHEABLE in terms of it.
 1.2 25-Jun-2001  chris branches: 1.2.2; 1.2.6;
Improve the vac_me_harder function, it is now slightly faster, however pmap_enter_pv is also now slightly slower, so they appear to balance out.

Note that I've some ideas in the works on how to improve the pv handling, so the slow down is short term only.

Also added non-advertising licence and copyright to myself and richard.
 1.1 23-Feb-2001  reinoud branches: 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file pte.h was added on branch thorpej_scsipi on 2001-03-12 13:27:23 +0000
 1.2.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.1 02-Nov-2001  nathanw file pte.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.17 14-Dec-2020  rin Obsolete PT_STEP and friends, that have never been implemented.

PT_STEP was exposed to userland for NetBSD 1.6 to 9, and
PT_SETSTEP and PT_CLEARSTEP was for 8 to 9. Therefore, they cannot be
reused for other purposes.

PT_STEP was introduced to arm/ptrace.h rev 1.2:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/arm/include/ptrace.h#rev1.2

This was for workaround against GDB, which assumes PT_STEP is 9 (even
today!!), if it is undefined. But, this should have been dealt with
differently...
 1.16 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.15 18-Jun-2019  kamil branches: 1.15.10;
Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer

The macro is dummy for ia64 (the FP register is unknown and can change
freely) and sparc/sparc64 (not stored in struct reg).
 1.14 18-Jun-2019  skrll Use UAL syntax for udf. NFCI.
 1.13 17-Jun-2019  kamil Define PTRACE_ILLEGAL_ASM for arm (32-bit)

udf $0 is expected to raise SIGILL for all ARM 32-bit targets.
 1.12 27-Dec-2017  christos branches: 1.12.4;
PR/52867: Martin Husemann: arm sofware breakpoint asm is slightly off

ARM uses an undefined instruction to emulate a software breakpoint.
However, the ptrace.h instruction on the one hand, and gdb/the kernel
disagree on the exact value.

This causes PTRACE_BREAKPOINT_ASM to generate a SIGILL instead of a SIGTRAP.
 1.11 12-Apr-2017  kamil Add new macro PTRACE_BREAKPOINT_ASM in <sys/ptrace.h> MD part

This macro ships with a MD-specific assembly instruction triggering
a software breakpoint.

Missing instruction for powerpc targets.

This code is used in ATF tests (lib/libc/sys/t_ptrace_wait).

Original patch by Nick Hudson, thanks!
 1.10 08-Apr-2017  kamil Add new ptrace(2) API: PT_SETSTEP & PT_CLEARSTEP

These operations allow to mark thread as a single-stepping one.

This allows to i.a.:
- single step and emit a signal (PT_SETSTEP & PT_CONTINUE)
- single step and trace syscall entry and exit (PT_SETSTEP & PT_SYSCALL)

The former is useful for debuggers like GDB or LLDB. The latter can be used
to singlestep a usermode kernel. These examples don't limit use-cases of
this interface.

Define PT_*STEP only for platforms defining PT_STEP.

Add new ATF tests setstep[1234].

These ptrace(2) operations first appeared in FreeBSD.

Sponsored by <The NetBSD Foundation>
 1.9 25-Nov-2016  christos branches: 1.9.2;
avoid macro confusion
 1.8 25-Sep-2015  christos branches: 1.8.2;
For processors that have memory breakpoints, add macros for them to help
libproc
 1.7 15-Sep-2015  christos Provide access to pc/sp/syscall-return registers like we have for mcontext
 1.6 05-Dec-2012  matt branches: 1.6.14;
ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.5 25-Jan-2008  skrll branches: 1.5.44; 1.5.54;
Define PT_MACHDEP_STRINGS
 1.4 11-Dec-2005  christos branches: 1.4.46; 1.4.50; 1.4.52; 1.4.58;
merge ktrace-lwp.
 1.3 24-Mar-2004  ws branches: 1.3.16;
Fix Frank Lancaster's long standing broken license (after consulting with him).
 1.2 19-Oct-2001  bjh21 branches: 1.2.4; 1.2.22;
Make sure that PT_STEP is defined for userland, even though we don't
support it in the kernel yet. If we don't do this, GDB arbitrarily
assumes we wanted it to be 9, which is silly.

In the kernel, leave it undefined so that sys_process.c doesn't
generate code for it.
 1.1 11-Feb-2001  bjh21 branches: 1.1.4; 1.1.6;
Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it. This should
reduce code size a little.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 11-Feb-2001  bouyer file ptrace.h was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.2.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.22.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 19-Oct-2001  bjh21 Make sure that PT_STEP is defined for userland, even though we don't
support it in the kernel yet. If we don't do this, GDB arbitrarily
assumes we wanted it to be 9, which is silly.

In the kernel, leave it undefined so that sys_process.c doesn't
generate code for it.
 1.2.4.1 19-Oct-2001  bjh21 file ptrace.h was added on branch nathanw_sa on 2001-10-19 00:18:21 +0000
 1.3.16.1 04-Feb-2008  yamt sync with head.
 1.4.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.52.1 23-Mar-2008  matt sync with HEAD
 1.4.50.1 27-Jan-2008  chris Sync to HEAD.
 1.4.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.5.54.2 03-Dec-2017  jdolecek update from HEAD
 1.5.54.1 25-Feb-2013  tls resync with head
 1.5.44.1 16-Jan-2013  yamt sync with (a bit old) head
 1.6.14.4 28-Aug-2017  skrll Sync with HEAD
 1.6.14.3 05-Dec-2016  skrll Sync with HEAD
 1.6.14.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.14.1 22-Sep-2015  skrll Sync with HEAD
 1.8.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.8.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.9.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.12.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6 29-Jan-2014  matt Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.5 11-Jan-2013  matt branches: 1.5.2;
Don't include <machine/fp.h> since it no longer exists
 1.4 07-Dec-2012  matt Extend vfpreg to include all 32 64-bit FP registers.
For __ARM_EABI__, define __vfp_fstmx to have space for all 32 32-bit
FP registers (It's a newly supported ABI so we can "break" binary
compatibility.
 1.3 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.2 15-Mar-2008  rearnsha branches: 1.2.38; 1.2.48;
VFP support.
 1.1 11-Feb-2001  bjh21 branches: 1.1.2; 1.1.44; 1.1.106; 1.1.108; 1.1.128; 1.1.132;
Common <arm/reg.h> (and hence common struct reg) for ARM.
This is theoretically backward-incompatible on arm26, but GDB doesn't work there
yet anyway.
 1.1.132.1 03-Apr-2008  mjf Sync with HEAD.
 1.1.128.1 24-Mar-2008  keiichi sync with head.
 1.1.108.1 23-Mar-2008  matt sync with HEAD
 1.1.106.1 21-Mar-2008  chris Sync with head.
 1.1.44.1 17-Mar-2008  yamt sync with head.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 11-Feb-2001  bouyer file reg.h was added on branch thorpej_scsipi on 2001-02-11 19:08:51 +0000
 1.2.48.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.48.1 25-Feb-2013  tls resync with head
 1.2.38.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.2.38.2 23-Jan-2013  yamt sync with head
 1.2.38.1 16-Jan-2013  yamt sync with (a bit old) head
 1.5.2.1 18-May-2014  rmind sync with head
 1.10 29-Nov-2019  riastradh Largely eliminate the MD rwlock.h header file.

This was full of definitions that have been obsolete for over a
decade. The file still remains for __HAVE_RW_STUBS but that's all.
Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.
 1.9 25-Feb-2015  joerg branches: 1.9.18;
Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.8 12-Jun-2014  ozaki-r branches: 1.8.2; 1.8.4;
Fix ARMv7 checks

_ARM_ARCH_7 && !_ARM_ARCH_6 never be true.
 1.7 28-Mar-2014  matt branches: 1.7.2;
Use dmb/dsb
 1.6 29-Jan-2014  matt Don't use _lock_cas explicitly, use atomic_cas_ulong which could be one its
aliases.
 1.5 28-Apr-2008  martin branches: 1.5.34; 1.5.44; 1.5.50;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.14; 1.4.16; 1.4.18;
- Change _lock_cas() to do compare-and-swap instead of compare-and-set.
- Add aliases for atomic_cas_ulong() and friends.
 1.3 21-Nov-2007  yamt make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
 1.2 09-Mar-2007  thorpej branches: 1.2.2; 1.2.8; 1.2.16; 1.2.18; 1.2.20; 1.2.22; 1.2.26; 1.2.28;
Use _lock_cas() instead of the interrupt-blocking atomic_cas().
 1.1 18-Feb-2007  matt branches: 1.1.2; 1.1.6;
Add <arm/mutex.h> and <arm/rwlock.h>
Add atomic_cas to <arm/atomic.h> for use by <rwlock.h>
 1.1.6.3 12-Mar-2007  rmind Sync with HEAD.
 1.1.6.2 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.1 18-Feb-2007  yamt file rwlock.h was added on branch yamt-idlelwp on 2007-02-27 16:49:36 +0000
 1.1.2.4 07-Dec-2007  yamt sync with head
 1.1.2.3 03-Sep-2007  yamt sync with head.
 1.1.2.2 26-Feb-2007  yamt sync with head.
 1.1.2.1 18-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:05:59 +0000
 1.2.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.2.26.1 21-Nov-2007  bouyer Sync with HEAD
 1.2.22.1 09-Jan-2008  matt sync with HEAD
 1.2.20.1 01-Jan-2008  chris Sync with HEAD.
 1.2.18.2 03-Dec-2007  joerg Sync with HEAD.
 1.2.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.2.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.2.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.2.2.1 03-Dec-2007  ad Sync with HEAD.
 1.4.18.1 16-May-2008  yamt sync with head.
 1.4.16.1 18-May-2008  yamt sync with head.
 1.4.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.50.1 18-May-2014  rmind sync with head
 1.5.44.2 03-Dec-2017  jdolecek update from HEAD
 1.5.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.34.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.2.1 10-Aug-2014  tls Rebase.
 1.8.4.1 06-Apr-2015  skrll Sync with HEAD
 1.8.2.1 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.9.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 06-May-2024  skrll Improve the comment.
 1.5 11-Jan-2013  matt Remove FPA support and replace with VFP.
(happily jmp_buf is large enough to store the needed VFP16 registers)
 1.4 30-Jun-2011  wiz branches: 1.4.2; 1.4.12;
dependant -> dependent
 1.3 29-Aug-2008  matt Remove non-__ELF__ snippets.
 1.2 25-Aug-2001  bjh21 branches: 1.2.6; 1.2.128; 1.2.132; 1.2.134; 1.2.138;
Increase the size of a jmp_buf when using ELF, since this will be our last
chance to do so for a while. We don't use the extra space yet, but VFP
support is likely to need it.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file setjmp.h was added on branch thorpej_scsipi on 2001-01-10 19:02:08 +0000
 1.2.138.1 19-Oct-2008  haad Sync with HEAD.
 1.2.134.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.132.1 04-May-2009  yamt sync with head.
 1.2.128.1 28-Sep-2008  mjf Sync with HEAD.
 1.2.6.2 25-Aug-2001  bjh21 Increase the size of a jmp_buf when using ELF, since this will be our last
chance to do so for a while. We don't use the extra space yet, but VFP
support is likely to need it.
 1.2.6.1 25-Aug-2001  bjh21 file setjmp.h was added on branch nathanw_sa on 2001-08-25 14:46:00 +0000
 1.4.12.1 25-Feb-2013  tls resync with head
 1.4.2.1 23-Jan-2013  yamt sync with head
 1.20 30-Oct-2021  thorpej Fix the previous to only apply to the non-AArch64 case.
 1.19 30-Oct-2021  thorpej Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.
 1.18 27-Oct-2021  thorpej Make sigcontext13 visible only to _KERNEL. Make sigcontext visible only
to _LIBC and _KERNEL.
 1.17 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.16 06-Oct-2021  skrll More trailing whitespace
 1.15 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.14 07-Jan-2017  christos branches: 1.14.14;
include <sys/sigtypes.h> for sigset_t
 1.13 29-Jan-2014  matt branches: 1.13.6; 1.13.10;
Make multiple inclusion symbols always start with _ARM_ (not _ARM32_ or
_MACHINE_).
 1.12 30-Jun-2011  wiz branches: 1.12.2; 1.12.12; 1.12.16;
dependant -> dependent
 1.11 19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.10 11-Dec-2005  christos branches: 1.10.76; 1.10.80; 1.10.86; 1.10.88;
merge ktrace-lwp.
 1.9 30-Dec-2004  joff Always expose struct sigcontext instead of just #ifdef COMPAT_16.
 1.8 10-May-2004  drochner SIGTRAMP_VALID() should not pollute the user namespace
 1.7 26-Mar-2004  drochner nothing cares about __HAVE_SIGINFO anymore, so nuke it
 1.6 25-Nov-2003  christos bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa.
 1.5 18-Oct-2003  briggs Define SIGTRAMP_VALID(v).
 1.4 05-Oct-2003  matt Add SA_SIGINFO support for ARM (from Chris Gilbert).
 1.3 28-Apr-2003  bjh21 branches: 1.3.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.2 17-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 13-Jan-2001  bjh21 branches: 1.1.2; 1.1.10;
Move <machine/signal.h> into shared directory.
 1.1.10.1 16-Jan-2003  thorpej * Include <sys/sigtypes.h> rather than <sys/signal.h> in <sys/ucontext.h>.
* Define _UCONTEXT_TO_SIGCONTEXT() and _SIGCONTEXT_TO_UCONTEXT()
macros for converting a ucontext -> sigcontext and back again.
These macros in turn use machine-dependent macros _MCONTEXT_TO_SIGCONTEXT()
and _SIGCONTEXT_TO_MCONTEXT() provided by <machine/signal.h>.

The conversion process is not 100% accurate, but should be close enough.

Also note that the mcontext conversion may not be enough for all platforms
(m68k is a good example of this). These macros should be used only if
you really know what you're doing.
 1.1.2.2 13-Jan-2001  bjh21 Move <machine/signal.h> into shared directory.
 1.1.2.1 13-Jan-2001  bjh21 file signal.h was added on branch thorpej_scsipi on 2001-01-13 17:02:38 +0000
 1.3.2.4 17-Jan-2005  skrll Sync with HEAD.
 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.10.88.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.86.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.10.80.1 04-May-2009  yamt sync with head.
 1.10.76.1 17-Jan-2009  mjf Sync with HEAD.
 1.12.16.1 18-May-2014  rmind sync with head
 1.12.12.2 03-Dec-2017  jdolecek update from HEAD
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.6.1 05-Feb-2017  skrll Sync with HEAD
 1.14.14.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:02:46 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.3 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.2 22-Jul-2014  alnsn Add parentheses around macro arguments.
 1.1 17-Jun-2014  alnsn Add sljit support to arm.
 1.5 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.4 03-Dec-2007  ad branches: 1.4.14; 1.4.16; 1.4.18;
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.3 22-Feb-2007  matt branches: 1.3.4; 1.3.18; 1.3.20; 1.3.22; 1.3.24; 1.3.30;
Fix lossage from boolean_t -> bool and updated x86 bus_dma.
 1.2 18-Feb-2007  matt Add __HAVE_GENERIC_SOFT_INTERRUPTS support for shark. This was done by
extenting the current arm generic intrs to support softintrs. Add
IPL_SOFTCLOCK, IPL_SOFTNET, IPL_SOFTSERIAL.
 1.1 29-Jan-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.38; 1.1.76;
Move the generic ARM soft interrupt code into a generic place.
 1.1.76.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.38.2 07-Dec-2007  yamt sync with head
 1.1.38.1 26-Feb-2007  yamt sync with head.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 29-Jan-2002  nathanw file softintr.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 29-Jan-2002  jdolecek file softintr.h was added on branch kqueue on 2002-02-11 20:07:20 +0000
 1.3.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.3.24.2 28-Jan-2008  matt Since softints are mainly MI, this file isn't needed anymore.
 1.3.24.1 09-Jan-2008  matt sync with HEAD
 1.3.22.2 01-Jan-2008  chris Sync with HEAD.
 1.3.22.1 11-Aug-2007  chris Initial check-in of reworked arm interrupt routines.

Main things to note on this branch:
* spl routines are inlined, less complex, and small (kernel drops in size)
* interrupts are handled in priority order (for most things it doesn't
matter, but pending ipls are used to determine if there is any work to do)
* arm_irqhandler.c is derived from footbridge_irqhandler.c, which was based
on work by thorpej.
* The code tries to touch hardware as little as possible.
* spl masks are no longer tracked, as the system is based on pending ipls

The shared code uses global ipl lists to track which interrupt handlers
are attached to which ipl (arm_iplq[]).

Interrupt sources register with the common code to indicate:
* how many irq lines they have
* a function to set the hardware mask.
* call arm_intr_claim and arm_intr_disestablish to setup handlers

When an interrupt occurs the ipl is flagged as pending, in ipls_pending.
If it can be handled at the current_ipl_level the code does so.
If it can't be handled it's left until the current_ipl_level drops.

As the ipl level changes down a quick test is made of the new ipl level
against the ipls_pending value. If an ipl is pending arm_intr_splx_lifter
is called to handle the pending ipls.

It should be noted that all interrupts are left enabled at the hardware
level, interrupts are only masked when they occur. They are only
re-enabled after it's interrupt handler is called. Hardware masks are not
changed at any other time.

Soft interrupts are treated the same as hardware interrupts, they
register as a provider, and do not get treated specially. All the soft
interrupt handlers are placed onto the relevant global ipl queue, the same
as hard interrupts handlers.

At the moment only footbridge within a cats has been updated to use the new
handling.

Todo:
* change the handling of interrupts, so that the hardware doesn't register
a routine to fetch the hardware status. Instead is makes a call which
provides the mask. This removes the primary flag when registering an
interrupt provider. It also makes more sense with multiple interrupt
sources.
* Arm v5 has the clz asm, which could be used instead of the carefully
hand rolled arm_intr_fls function.
* switch cats isa support to use this framework.
* switch iomd and acorn32 to use this framework.
* switch shark to use this framework.
* port any other arm platforms that are interested
* examine overlaps between this code and ppcoea-renovation branch.
* add support for different trigger types (Edge, level, pulse, etc)

(note that iomd and shark currently touch hardware on every spl change,
hence why they're targets to port)
 1.3.20.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.3.18.1 26-Dec-2007  rjs Sync with HEAD.
 1.3.4.1 03-Dec-2007  ad Sync with HEAD.
 1.4.18.1 16-May-2008  yamt sync with head.
 1.4.16.1 17-Jun-2008  yamt fix merge botches
 1.4.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.11 01-Jul-2011  mrg add GCC 4.5 support
 1.10 21-Jun-2008  gmcgarry Add stdargs support for pcc.
 1.9 11-Dec-2005  christos branches: 1.9.76; 1.9.80; 1.9.82; 1.9.84;
merge ktrace-lwp.
 1.8 17-Feb-2005  he In the __lint__ version of __builtin_va_arg(), apply the cast the
user specified. Fixes build problem.
 1.7 07-Aug-2003  agc branches: 1.7.8; 1.7.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.6 28-Apr-2003  bjh21 branches: 1.6.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.5 08-Nov-2002  thorpej Fix goof-ups in last (compiler used to test previously used a different
file).
 1.4 08-Nov-2002  thorpej Adjust stdargs/varargs for GCC 3.x.
 1.3 01-Jan-2002  thorpej branches: 1.3.10; 1.3.12;
Remove the call to abort(). We don't pull in a prototype for it,
and there's no sane way to do so.
 1.2 20-Dec-2001  thorpej Use the correct version of va_arg() for _STANDALONE.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.6; 1.1.10;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.10.2 11-Nov-2002  nathanw Catch up to -current
 1.1.10.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file stdarg.h was added on branch thorpej_scsipi on 2001-01-10 19:02:08 +0000
 1.3.12.1 09-Nov-2002  bjh21 Catch up with -current.
 1.3.10.2 11-Dec-2002  he Pull up revision 1.5 (requested by thorpej in ticket #974):
Fix error in previous.
 1.3.10.1 11-Dec-2002  he Pull up revision 1.4 (requested by thorpej in ticket #973):
Adjust stdargs/varargs for GCC 3.x.
 1.6.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.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.84.1 27-Jun-2008  simonb Sync with head.
 1.9.82.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.80.1 04-May-2009  yamt sync with head.
 1.9.76.1 29-Jun-2008  mjf Sync with HEAD.
 1.1 13-Jan-2002  bjh21 branches: 1.1.2; 1.1.4;
Add an <arm/swi.h>, containing symbolic names for SWI ranges.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 13-Jan-2002  nathanw file swi.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 13-Jan-2002  jdolecek file swi.h was added on branch kqueue on 2002-02-11 20:07:21 +0000
 1.15 06-Oct-2021  skrll More trailing whitespace
 1.14 13-Jan-2017  christos this was fine before...
 1.13 13-Jan-2017  maya replace old style declaration
 1.12 09-Mar-2015  joerg branches: 1.12.2;
Provide size_t.
 1.11 16-Jan-2014  matt branches: 1.11.6;
Use uintptr_t & size_t instead of u_int and int for arm_sync_icache.
 1.10 01-Feb-2013  matt branches: 1.10.2;
include stdbool.h if !_KERNEL
 1.9 31-Jan-2013  matt add a fpu_used sysarch
 1.8 12-Aug-2012  matt branches: 1.8.2;
Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.7 14-Mar-2009  dsl branches: 1.7.12; 1.7.20;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.6 11-Dec-2005  christos branches: 1.6.80; 1.6.88; 1.6.94; 1.6.98;
merge ktrace-lwp.
 1.5 11-Sep-2003  kleink __{BEGIN,END}_DECLS-wrap prototypes.
 1.4 30-Mar-2002  thorpej branches: 1.4.12;
Rename the ARM sysarch calls from arm32* -> arm*
 1.3 29-Jul-2001  chris branches: 1.3.2; 1.3.8;
Fix for PR 13580.
Make sysarch include sys/stdint.h so it picks up the a definition of uintptr_t.
 1.2 23-Jul-2001  matt Make sync_icache_args use more standard types.
 1.1 14-Jul-2001  matt Make <sysarch.h> valid for all arm platforms. Adjust/remove port-specific
includes as required.
 1.3.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.3.8.1 29-Jul-2001  nathanw file sysarch.h was added on branch nathanw_sa on 2002-04-17 00:02:30 +0000
 1.3.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.2 03-Aug-2001  lukem update to -current
 1.3.2.1 29-Jul-2001  lukem file sysarch.h was added on branch kqueue on 2001-08-03 04:11:01 +0000
 1.4.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.12.1 03-Aug-2004  skrll Sync with HEAD
 1.6.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.6.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.80.1 04-May-2009  yamt sync with head.
 1.7.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.7.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.12.1 30-Oct-2012  yamt sync with head
 1.8.2.3 03-Dec-2017  jdolecek update from HEAD
 1.8.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 25-Feb-2013  tls resync with head
 1.10.2.1 18-May-2014  rmind sync with head
 1.11.6.1 06-Apr-2015  skrll Sync with HEAD
 1.12.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10 01-Dec-2020  rin Fix confusions related to encoding of instructions.

For __ARMEB__ in BE8 mode, instructions are encoded in little-endian.
Therefore, we need to swap bytes against these in native byte order.

In other cases, i.e., __ARMEL__ and __ARMEB__ in BE32 mode, instructions
are in native byte order, and we don't need to swap them.
 1.9 15-Mar-2014  ozaki-r branches: 1.9.42;
Add breakpoint definitions for DTrace
 1.8 19-Jan-2008  chris branches: 1.8.44; 1.8.54; 1.8.60;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.7 11-Dec-2005  christos branches: 1.7.46; 1.7.50; 1.7.52; 1.7.58; 1.7.66;
merge ktrace-lwp.
 1.6 21-Aug-2004  rearnsha branches: 1.6.12;
Add a breakpoint instruction for Thumb.
 1.5 21-May-2003  briggs branches: 1.5.2;
Use the GDB5 breakpoint value for the kernel breakpoint assembly statement
since this value will be properly recognized by gdb_trapper().
Pointed out by bsh. Thanks!
 1.4 28-Apr-2003  briggs Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
 1.3 18-Oct-2001  bjh21 branches: 1.3.4;
Recognize GDB's default breakpoint instruction (as of GDB 5.0), in addition to
the instruction we used with GDB 4.x. The new instruction has the advantage
of fitting the pattern that ARM recommend using for instructions that need to
stay undefined.
 1.2 18-Jan-2001  bjh21 branches: 1.2.2; 1.2.6;
A bit of extra discussion based on the latest ARM ARM.
 1.1 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 18-Jan-2001  bjh21 A bit of extra discussion based on the latest ARM ARM.
 1.2.2.1 18-Jan-2001  bjh21 file trap.h was added on branch thorpej_scsipi on 2001-01-18 20:42:04 +0000
 1.3.4.2 18-Oct-2001  bjh21 Recognize GDB's default breakpoint instruction (as of GDB 5.0), in addition to
the instruction we used with GDB 4.x. The new instruction has the advantage
of fitting the pattern that ARM recommend using for instructions that need to
stay undefined.
 1.3.4.1 18-Oct-2001  bjh21 file trap.h was added on branch nathanw_sa on 2001-10-18 21:26:24 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 25-Aug-2004  skrll Sync with HEAD.
 1.6.12.1 21-Jan-2008  yamt sync with head
 1.7.66.1 20-Jan-2008  bouyer Sync with HEAD
 1.7.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.52.1 23-Mar-2008  matt sync with HEAD
 1.7.50.1 20-Jan-2008  chris Sync to HEAD.
 1.7.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.8.60.1 18-May-2014  rmind sync with head
 1.8.54.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.44.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.9.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.40 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.39 17-Jan-2020  skrll Sort __HAVE_* defines
 1.38 06-Apr-2019  thorpej branches: 1.38.6;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.37 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.36 10-Oct-2018  skrll Trailing whitespace
 1.35 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.34 27-Jan-2017  christos branches: 1.34.12; 1.34.14;
remove __HAVE_COMPAT_NETBSD32
 1.33 26-Jan-2017  christos provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently.
 1.32 23-Jan-2016  christos branches: 1.32.2; 1.32.4;
expose the kernel types for standalone code.
 1.31 23-Jan-2016  christos Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
 1.30 27-Aug-2015  pooka Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like. To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2. Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
 1.29 13-Sep-2014  matt branches: 1.29.2;
vm_offset_t -> vaddr_t, vm_size_t -> vsize_t
nuke vm_offset_t and vm_size_t
 1.28 05-Aug-2014  skrll Don't set __NO_STRICT_ALIGNMENT as armv[67] ldm/stm have alignment
restrictions.

PR/49020: Writing to tap device may cause panic on RPI

Discussed with matt@
 1.27 18-Apr-2014  matt ARMv6+ platforms no longer have strict alignment requirements.
 1.26 22-Feb-2014  matt branches: 1.26.2;
Define __HAVE_ATOMIC64_OPS if EABI && ARMv6 or later.
 1.25 02-Jul-2013  matt Add a tlb_asid_t.
 1.24 07-May-2013  matt branches: 1.24.2;
Move #define __HAVE_OLD_DISKLABEL to <arm/types.h>
 1.23 12-Aug-2012  matt branches: 1.23.2;
Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.22 03-Aug-2012  matt COMPAT_NETBSD32 support for ARM. Which is strange since ARM is already
32-bits. But the newer ARM ABI AAPCS changes the alignment of 64-bit
fields so structures need to copied in and out to deal with the alignment
change. This is a kludge but makes debugging of AAPCS support much easier.
 1.21 18-Nov-2011  joerg branches: 1.21.8;
Hook up TLS support on ARM. Tested by martin@, kernel support from matt@
 1.20 17-Jul-2011  dyoung branches: 1.20.2;
On ARM-ish ports having PCI support, use new-style <sys/bus.h>. Do not
install <machine/bus.h>. Remove various <machine/bus.h> sources.
 1.19 07-Apr-2011  matt Add __lwp_getprivate_fast
 1.18 22-Dec-2010  matt branches: 1.18.2;
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
 1.17 11-Dec-2009  matt branches: 1.17.4;
Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge). These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
 1.16 20-Jan-2008  joerg branches: 1.16.10; 1.16.28;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.15 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.14 09-Mar-2007  thorpej branches: 1.14.20; 1.14.28; 1.14.34;
Make __cpu_simple_lock_t an unsigned char if _KERNEL, and operate on it
using SWPB.

Approved by Matt Thomas.
 1.13 24-Dec-2005  perry branches: 1.13.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 18-Jan-2004  martin branches: 1.11.16;
Do not export __HAVE_RAS to userland. Applications are supposed to try
rasctl() and detect failure with EOPNOTSUPP.
 1.10 26-Sep-2003  nathanw Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
 1.9 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.8 28-Apr-2003  bjh21 branches: 1.8.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.7 01-Mar-2003  thorpej Do the syscall_plain/syscall_fancy dance on ARM. Shaves a fair number
of cycles off the syscall overhead.

Since all COMPAT_LINUX platforms now support __HAVE_SYSCALL_INTERN,
garbage-collect the LINUX_SYSCALL_FUNCTION stuff.
 1.6 07-Oct-2002  thorpej Add support for restartable atomic sequences on 26-bit ARM. Compile
tested only.

Now that all ARM systems have RAS, move __HAVE_RAS from arm/arm32/types.h
to arm/types.h.
 1.5 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.4 28-Feb-2002  simonb branches: 1.4.8;
Use "#define<tab>".
 1.3 28-Apr-2001  kleink branches: 1.3.2; 1.3.8;
* Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
intmax_t, pointer-type and size_t arguments.
 1.2 23-Feb-2001  bjh21 branches: 1.2.2; 1.2.4;
__HAVE_NWSCONS and __HAVE_DEVICE_REGISTER are MACHINE-dependent.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 23-Feb-2001  bouyer file types.h was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.3 13-Aug-2002  nathanw Catch up to -current.
 1.3.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.8.1 28-Apr-2001  nathanw file types.h was added on branch nathanw_sa on 2002-04-01 07:39:10 +0000
 1.3.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.8.1 30-Aug-2002  gehenna catch up with -current.
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.2 03-Sep-2007  yamt sync with head.
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.34.2 23-Jan-2008  bouyer Sync with HEAD.
 1.14.34.1 20-Jan-2008  bouyer Sync with HEAD
 1.14.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.20.1 27-Jan-2008  chris Sync to HEAD.
 1.16.28.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.16.10.1 11-Mar-2010  yamt sync with head
 1.17.4.2 21-Apr-2011  rmind sync with head
 1.17.4.1 05-Mar-2011  rmind sync with head
 1.18.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.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.20.2.2 30-Oct-2012  yamt sync with head
 1.20.2.1 17-Apr-2012  yamt sync with head
 1.21.8.2 28-Nov-2012  matt Make __swp for the kernel return unsigned char and restore __cpu_simple_lock_t
(match what -HEAD has).
 1.21.8.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.23.2.3 03-Dec-2017  jdolecek update from HEAD
 1.23.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 23-Jun-2013  tls resync from head
 1.24.2.2 18-May-2014  rmind sync with head
 1.24.2.1 28-Aug-2013  rmind sync with head
 1.26.2.1 10-Aug-2014  tls Rebase.
 1.29.2.3 05-Feb-2017  skrll Sync with HEAD
 1.29.2.2 19-Mar-2016  skrll Sync with HEAD
 1.29.2.1 22-Sep-2015  skrll Sync with HEAD
 1.32.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.32.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.34.14.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.34.14.1 10-Jun-2019  christos Sync with HEAD
 1.34.12.2 20-Oct-2018  pgoyette Sync with head
 1.34.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.38.6.2 25-Jan-2020  ad Sync with head.
 1.38.6.1 17-Jan-2020  ad Sync with head.
 1.16 05-Dec-2021  msaitoh s/existance/existence/ in comment.
 1.15 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.14 27-Aug-2021  skrll KNF a comment
 1.13 17-Mar-2019  skrll Trailing whitespace
 1.12 14-Mar-2009  dsl branches: 1.12.64;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.11 15-Mar-2008  rearnsha branches: 1.11.4; 1.11.12; 1.11.18;
VFP support.
 1.10 11-Dec-2005  christos branches: 1.10.50; 1.10.52; 1.10.72; 1.10.76;
merge ktrace-lwp.
 1.9 21-Aug-2004  rearnsha branches: 1.9.12;
Convert the coprocessor defines into an enum to avoid excessive
preprocessor hackery. If supporting Thumb add an 18th undefined
handler for undefined instruction traps taken in Thumb state. Kill
MAX_COPROCS and use NUM_UNKNOWN_HANDLERS instead.

Add support for breakpoints set in Thumb code and hand them off to
GDB as required.
 1.8 07-Aug-2004  rearnsha Bah! Fix tyop CORE_UNKOWN_HANDLER -> CORE_UNKNOWN_HANDLER
 1.7 07-Aug-2004  rearnsha Add SYSTEM_COPROC (cp15).
 1.6 07-Aug-2004  rearnsha FP_COPROC* ->FPA_COPROC*
 1.5 07-Aug-2004  rearnsha Don't overload the unknown instruction handling for the core onto CP0.
Instead, add a seventeenth 'co-processor' specifically for the core.
Add support for ARMv5 unknown instructions in the 'NV' space.
 1.4 20-Dec-2001  thorpej branches: 1.4.18;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.3 16-Nov-2001  bjh21 Add prototypes for undefinedinstruction() and resethandler().
 1.2 11-Mar-2001  bjh21 branches: 1.2.2; 1.2.4; 1.2.10;
Change undefined instruction handler to use a linked list for each
co-processor. This is necessary so we can have several handlers for
CP0 (used as a catch-all for non-CP instructions).

Handlers are now removed using remove_coproc_handler(), rather than by calling
install_coproc_handler() with a NULL handler.

Because install_coproc_handler() can now allocate memory, there's a version
for use at boot time that doesn't.
 1.1 23-Feb-2001  reinoud branches: 1.1.2;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.10.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.10.1 11-Mar-2001  nathanw file undefined.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.2.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 11-Mar-2001  bouyer file undefined.h was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.4.18.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.18.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.18.2 25-Aug-2004  skrll Sync with HEAD.
 1.4.18.1 12-Aug-2004  skrll Sync with HEAD.
 1.9.12.1 17-Mar-2008  yamt sync with head.
 1.10.76.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.72.1 24-Mar-2008  keiichi sync with head.
 1.10.52.1 23-Mar-2008  matt sync with HEAD
 1.10.50.1 21-Mar-2008  chris Sync with head.
 1.11.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.4.1 04-May-2009  yamt sync with head.
 1.12.64.1 10-Jun-2019  christos Sync with HEAD
 1.6 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 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.3 08-Nov-2002  thorpej branches: 1.3.6;
Fix pasto. (Man, it's not my day today, is it...)
 1.2 08-Nov-2002  thorpej Adjust stdargs/varargs for GCC 3.x.
 1.1 10-Jan-2001  bjh21 branches: 1.1.2; 1.1.10; 1.1.20; 1.1.22;
Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.22.1 09-Nov-2002  bjh21 Catch up with -current.
 1.1.20.2 14-Dec-2002  he Pull up revision 1.3 (requested by he in ticket #1034):
Fix pasto which caused compile problem.
 1.1.20.1 11-Dec-2002  he Pull up revision 1.2 (requested by thorpej in ticket #973):
Adjust stdargs/varargs for GCC 3.x.
 1.1.10.1 11-Nov-2002  nathanw Catch up to -current
 1.1.2.2 10-Jan-2001  bjh21 Header files which don't differ between arm32 and arm26 and can thus be
shared.
 1.1.2.1 10-Jan-2001  bjh21 file varargs.h was added on branch thorpej_scsipi on 2001-01-10 19:02:09 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17 07-Sep-2019  tnn Cortex A12 is marketed as A17 but has a distinct part number

observed on Rockchip RK3288
 1.16 26-May-2017  jmcneill branches: 1.16.10;
Recognize Cortex-A57 FPU, GIC, and Generic Timer.
 1.15 03-Mar-2016  skrll Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
 1.14 09-Feb-2015  slp Add VFP IDs for QEMU's emulated Cortex-A15.
 1.13 18-Mar-2014  matt branches: 1.13.4; 1.13.6;
Enable VFP on MV88SV58XX
 1.12 24-Feb-2014  christos consistency in include protection
 1.11 23-Jan-2014  skrll Fix typo in #define name
 1.10 02-Aug-2013  matt Add VFP_FPSCR_{QC,AHP} bits
 1.9 20-Jun-2013  matt branches: 1.9.2;
Add support for the Cortex-A15 Neon/VFP unit
 1.8 12-Feb-2013  matt More fully document FPEXC register
 1.7 12-Feb-2013  matt Fix some FPEXC bit definitions
 1.6 22-Sep-2012  matt Only use CPACR register for ARM11 and CORTEX cores.
Add VFP ids for other CORTEX CPUs.
 1.5 22-Sep-2012  matt Before testing for VFP, make sure CP10 is enabled. (And CP11 for Neon too).
 1.4 16-Aug-2012  matt branches: 1.4.2;
Already uses _C someplace, use _CSUM instead
 1.3 15-Aug-2012  matt Add macros for all of the E and C flags in the FPSCR.
 1.2 11-Aug-2012  matt Full expand FPEXC and FPSCR definitions
 1.1 15-Mar-2008  rearnsha branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.48; 1.1.56;
VFP support.
 1.1.56.1 21-Nov-2012  matt Add aeabi.h, cpuconf.h, and vfpreg.h
 1.1.48.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.1.48.1 30-Oct-2012  yamt sync with head
 1.1.10.2 03-Apr-2008  mjf Sync with HEAD.
 1.1.10.1 15-Mar-2008  mjf file vfpreg.h was added on branch mjf-devfs2 on 2008-04-03 12:42:12 +0000
 1.1.8.2 24-Mar-2008  keiichi sync with head.
 1.1.8.1 15-Mar-2008  keiichi file vfpreg.h was added on branch keiichi-mipv6 on 2008-03-24 07:14:54 +0000
 1.1.6.2 23-Mar-2008  matt sync with HEAD
 1.1.6.1 15-Mar-2008  matt file vfpreg.h was added on branch matt-armv6 on 2008-03-23 02:03:55 +0000
 1.1.4.2 21-Mar-2008  chris Sync with head.
 1.1.4.1 15-Mar-2008  chris file vfpreg.h was added on branch chris-arm-intr-rework on 2008-03-21 13:34:41 +0000
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 15-Mar-2008  yamt file vfpreg.h was added on branch yamt-lazymbuf on 2008-03-17 09:14:15 +0000
 1.4.2.5 03-Dec-2017  jdolecek update from HEAD
 1.4.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.3 23-Jun-2013  tls resync from head
 1.4.2.2 25-Feb-2013  tls resync with head
 1.4.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.2 18-May-2014  rmind sync with head
 1.9.2.1 28-Aug-2013  rmind sync with head
 1.13.6.3 28-Aug-2017  skrll Sync with HEAD
 1.13.6.2 19-Mar-2016  skrll Sync with HEAD
 1.13.6.1 06-Apr-2015  skrll Sync with HEAD
 1.13.4.1 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.16.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.1 15-Mar-2008  rearnsha branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.48; 1.1.56;
VFP support.
 1.1.56.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.1.48.1 30-Oct-2012  yamt sync with head
 1.1.10.2 03-Apr-2008  mjf Sync with HEAD.
 1.1.10.1 15-Mar-2008  mjf file vfpvar.h was added on branch mjf-devfs2 on 2008-04-03 12:42:12 +0000
 1.1.8.2 24-Mar-2008  keiichi sync with head.
 1.1.8.1 15-Mar-2008  keiichi file vfpvar.h was added on branch keiichi-mipv6 on 2008-03-24 07:14:54 +0000
 1.1.6.2 23-Mar-2008  matt sync with HEAD
 1.1.6.1 15-Mar-2008  matt file vfpvar.h was added on branch matt-armv6 on 2008-03-23 02:03:55 +0000
 1.1.4.2 21-Mar-2008  chris Sync with head.
 1.1.4.1 15-Mar-2008  chris file vfpvar.h was added on branch chris-arm-intr-rework on 2008-03-21 13:34:41 +0000
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 15-Mar-2008  yamt file vfpvar.h was added on branch yamt-lazymbuf on 2008-03-17 09:14:15 +0000
 1.3 01-May-2013  matt branches: 1.3.4;
Add a default arm32 vmparam.h
 1.2 26-Nov-2001  thorpej branches: 1.2.102;
Remove dummy includes.
 1.1 29-Jul-2001  chris branches: 1.1.2; 1.1.8;
PR 13581
Add empty pmap.h and vmparam.h to make userland happier.
 1.1.8.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.1 29-Jul-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 29-Jul-2001  lukem file vmparam.h was added on branch kqueue on 2001-08-03 04:11:01 +0000
 1.2.102.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.2 23-Jun-2013  tls resync from head
 1.3.4.1 01-May-2013  tls file vmparam.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.4 24-Jan-2013  matt Use __W{CHAR,INT}_{MIN,MAX}__ if they are defined as well as
__W{CHAR,INT}_UNSIGNED__ to determine W{CHAR,INT}_{MIN,MAX} values.
 1.3 28-Apr-2008  martin branches: 1.3.34; 1.3.44;
Remove clause 3 and 4 from TNF licenses
 1.2 11-Dec-2005  christos branches: 1.2.76; 1.2.78; 1.2.80;
merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:32:37 +0000
 1.2.80.1 16-May-2008  yamt sync with head.
 1.2.78.1 18-May-2008  yamt sync with head.
 1.2.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.44.1 25-Feb-2013  tls resync with head
 1.3.34.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.10 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.9 26-Nov-2002  lukem branches: 1.9.158;
Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.8 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.7 22-Nov-2001  thorpej Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.6 03-Sep-2001  matt branches: 1.6.6;
Add a merged <pcb.h> for arm26/arm32.
 1.5 14-Jul-2001  matt Make <sysarch.h> valid for all arm platforms. Adjust/remove port-specific
includes as required.
 1.4 18-Jun-2001  bjh21 branches: 1.4.2;
Move <arm/arm32/bus.h> to <arm/bus.h>, since it looks like it's going to be
necessary on arm26 as well.
 1.3 10-Mar-2001  rearnsha branches: 1.3.2;
Add param.h to INCS.
 1.2 26-Feb-2001  reinoud branches: 1.2.2;
Putting the param.h back into the arm32 resp. hpcarm include directories
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 10-Mar-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.4.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.6.6.3 11-Dec-2002  thorpej Sync with HEAD.
 1.6.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.6.6.1 03-Sep-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.9.158.1 03-Dec-2017  jdolecek update from HEAD
 1.1 10-Nov-2007  matt branches: 1.1.2;
file arm1136_pmc.h was initially added on branch matt-nb4-arm.
 1.1.2.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.4 18-Jun-2001  bjh21 branches: 1.4.8;
Move <arm/arm32/bus.h> to <arm/bus.h>, since it looks like it's going to be
necessary on arm26 as well.
 1.3 07-Mar-2001  thorpej branches: 1.3.2;
Add the BUS_DMA_STREAMING flag.
 1.2 04-Mar-2001  matt branches: 1.2.2;
s/vm_offset_t/vaddr_t/g
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.3.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.2.1 07-Mar-2001  bouyer file bus.h was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.4.8.2 18-Jun-2001  bjh21 Move <arm/arm32/bus.h> to <arm/bus.h>, since it looks like it's going to be
necessary on arm26 as well.
 1.4.8.1 18-Jun-2001  bjh21 file bus.h was added on branch nathanw_sa on 2001-06-18 21:37:34 +0000
 1.10 03-Jul-2020  jmcneill Move db_reset_cmd prototype to db_machdep.h (forgot to commit this file)
 1.9 28-Mar-2014  matt Make ddb_registers per-cpu. All switching of CPUs (xxx doesn't work yet).
 1.8 01-Mar-2014  matt Add db_show_tlb_cmd prototype
 1.7 05-Jan-2013  christos branches: 1.7.2;
remove show panic cmd
 1.6 21-Sep-2012  matt Add a 'mach fault' command to print DFAR/DFSR/IFAR/IFSR/TTBR
 1.5 14-Mar-2009  dsl branches: 1.5.12; 1.5.20; 1.5.22;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.4 22-Feb-2007  matt branches: 1.4.48; 1.4.56; 1.4.62; 1.4.66;
Fix lossage from boolean_t -> bool and updated x86 bus_dma.
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 02-Jun-2005  uwe branches: 1.2.2;
Catch up with constification.
 1.1 05-Jan-2002  chris branches: 1.1.2; 1.1.4; 1.1.22;
Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.1.22.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.4.1 05-Jan-2002  nathanw file db_machdep.h was added on branch nathanw_sa on 2002-01-11 23:38:04 +0000
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 05-Jan-2002  thorpej file db_machdep.h was added on branch kqueue on 2002-01-10 19:37:55 +0000
 1.2.2.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.66.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.62.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.56.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.48.1 04-May-2009  yamt sync with head.
 1.5.22.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.22.2 25-Feb-2013  tls resync with head
 1.5.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.5.12.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.5.12.2 23-Jan-2013  yamt sync with head
 1.5.12.1 30-Oct-2012  yamt sync with head
 1.7.2.1 18-May-2014  rmind sync with head
 1.48 14-Aug-2020  skrll Mirror the changes to aarch64 and

- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
by MI code. It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
can see spurious ASTs (which doesn't cause a problem, it just means some
time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
delivered via IPI if posted from a remote CPU so that they are resolved
quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set. This
is needed whenever an LWP that is resuming on the CPU could hold an
adaptive mutex. The barrier needs to drain the CPU's store buffer, so
that the update to ci_curlwp becomes globally visible before the LWP can
resume and call mutex_exit().
 1.47 28-Oct-2018  skrll Consistency - NFC
 1.46 28-Oct-2018  skrll Remove magic number
 1.45 07-Jul-2017  skrll branches: 1.45.4; 1.45.6;
Fixup the non-KDTRACE_HOOKS case of PUSHDTRACEGAP - we need to copy the
stack pointer to r2.
 1.44 07-Jul-2017  chs split PUSHFRAMEINSVC into two pieces so that we can insert some additional
instructions in the middle in undefinedinstruction_bounce, namely to add
some additional space on the stack before the trapframe for undefineds from
SVC mode. this extra space allows dtrace to emulate a "push" instruction.
the initial version was from me and some improvements were from nick.
 1.43 22-Jun-2017  skrll Trailing whitespace
 1.42 17-Apr-2015  matt Put the clearing of ci_astpending back in frame.h while interrupts are
disabled.
 1.41 08-Apr-2015  matt Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
 1.40 08-Apr-2015  matt CI_ASTPENDING is now a bitfield and low bit is for user ASTs.
 1.39 26-Feb-2014  matt branches: 1.39.6;
Remove KERNEL_LOCK/KERNEL_UNLOCK
 1.38 20-Dec-2013  matt When restoring SPRSR, use spsr_fsxc not spsr_all so bits[23-8] are restored.
This should fix use of simd instructions that rely on the GE bits.
 1.37 02-Dec-2013  joerg Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.36 18-Aug-2013  matt Use blx ip if _ARM_ARCH_5
prepare to get of switchframe
 1.35 21-Oct-2012  matt branches: 1.35.2;
Change to use symbolic constants from assym.h and fix a typo in a comment.
 1.34 21-Oct-2012  matt Implement a "fast" path for IRQ handling out of the idle loop. Since we
are in SVC32 already we only need to save a few registers. Processing is
also simplified since we know we can't return to user-mode.
 1.33 29-Aug-2012  matt branches: 1.33.2;
Use ARMV6+ cpsi{d,f} instructions whenever possible. Use r7 to hold previous
mode and avoid recomputing it. Add support for obtaining kernel_lock on
exception entry and exit.
 1.32 25-Aug-2012  matt Fix typo.
 1.31 16-Aug-2012  matt small rototill.
pcb_flags is dead. PCB_NOALIGNFLT is now in stored l_md.md_flags as
MDLWP_NOALIGNFLT. This avoids a few loads of the PCB in exception handling.
pcb_tf has been moved to l_md.md_tf. Again this avoids a lot of pcb
references just to access or set this. It also means that pcb doesn't
need to accessed by MI code.
Move pcb_onfault to after the pcb union.
Add pcb_sp macro to make code prettier.
Add lwp_settrapframe(l, tf) to set the l_md.md_tf field.
Use lwp_trapframe to access it (was process_frame but that name was changed
in a previous commit).
Kill off curpcb in acorn26.
Kill the checks for curlwp being NULL.
Move TRAP_USERMODE from arm32/fault.c to frame.h and a __PROG26 version.
Replace tests for usermode with that macro.
 1.30 02-Aug-2012  skrll Remove irqframe and replace with identical trapframe.
 1.29 01-Aug-2012  matt Move fill to between spsr and r0 so that the registers will be dword aligned.
Adjust PUSH/PULL macros accordingly.
 1.28 01-Aug-2012  matt Shrink PUSHFRAMEINSVC by 4 more instructions.
 1.27 31-Jul-2012  matt Add code to make sure the trapframe is aligned to a doubleword boundary.
 1.26 31-Jul-2012  matt Only do the SA110 user register save workaround on kernel using SA110s.
 1.25 31-Jul-2012  matt Make trapframe/irqframe an even number of words (make adjustments for
the filler word).
Improve the comments in PUSH/PULL macros.
Use the armv6+ CPS instruction if we can.
 1.24 31-Jul-2012  matt whitespace cleanup
 1.23 18-Jan-2009  bjh21 branches: 1.23.14; 1.23.22;
Now that GET_CURPCB and GET_CURCPU are generally available, use them
unconditionally rather than rolling our own (often badly) all over the
place.
 1.22 17-Jan-2009  bjh21 Clear out the vestigial support for the Simtec Hydra board. Now that we're
getting support for proper SMP ARMs, keeping non-functional support for
a seriously crippled not-really-SMP system is likely to cause more problems
than it's worth, even if it was fun for a while.
 1.21 19-Nov-2008  matt Fix __HAVE_FAST_SOFTINTS (boolean dyslexia strikes again).
Add some KASSERTS to make sure assumptions are valid.
 1.20 26-Oct-2008  matt branches: 1.20.2; 1.20.8;
Fix DO_PENDING_SOFTINTS (remove pasto, remove a branch, use movs)
pasto spotted by mjf
 1.19 07-Aug-2008  matt Only call dosoftints() is ci_intr_depth == 0
 1.18 07-Aug-2008  matt Do fast softint processing in DO_AST_AND_RESTORE_ALIGNMENT_FAULTS.
Redo the softint mask so ci_softints >> ci_cpl != 0 becomes an easy
test for work to be done.
 1.17 27-Apr-2008  matt branches: 1.17.2; 1.17.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.16 12-Jan-2008  skrll branches: 1.16.6; 1.16.8; 1.16.10;
Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
 1.15 09-Mar-2007  thorpej branches: 1.15.8; 1.15.16; 1.15.20; 1.15.22; 1.15.28; 1.15.34;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.14 27-Sep-2006  manu branches: 1.14.4;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.13 11-Dec-2005  christos branches: 1.13.20; 1.13.22;
merge ktrace-lwp.
 1.12 11-Aug-2005  cube Change all archs that did:

#define clockframe somethingelse

to:

struct clockframe {
struct somethingelse cf_se;
};

and change access macros accordingly.

That means that, at least for that very issue, things will not go
ka-boomy if you don't have the actual definition of struct clockframe
before including systm.h.
 1.11 27-Apr-2004  scw branches: 1.11.12;
Always disable interrupts at the start of DO_AST_AND_RESTORE_ALIGNMENT_FAULTS.
This addresses #2 of port-arm/23581 by Richard Earnshaw.

Many thanks to Richard for spotting the cause of this problem.
 1.10 15-Dec-2003  scw branches: 1.10.2;
The last cpsr_all change was misguided. Just use cpsr_c wherever possible.
 1.9 01-Dec-2003  scw - For consistency, use cpsr_all instead of cpsr.
- Make sure IRQs are enabled before handling ASTs.
 1.8 14-Nov-2003  scw Slight re-org of the alignment/ast exit macro to better mimic the
original behaviour WRT cpsr/I32_bit handling.
 1.7 30-Oct-2003  scw Move the alignment fault enable/disable code into macroes to avoid
needless duplication.

Additionally, merge AST handling into the same code.

exception.S and the generic irq_dispatch.S routines have been updated
to use the macroes.

XXX: I have patches for the non-generic IRQ dispatch routines, but they
need testing by someone with hardware.
 1.6 23-Oct-2003  scw Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loop
instead.

With this change, we no longer need to save the current interrupt level
in the switchframe. This is no great loss since both cpu_switch and
cpu_switchto are always called at splsched, so the process' spl is
effectively saved somewhere in the callstack.

This fixes an evbarm problem reported by Allen Briggs:

lwp gets into sa_switch -> mi_switch with newl != NULL
when it's the last element on the runqueue, so it
hits the second bit of:
if (newl == NULL) {
retval = cpu_switch(l, NULL);
} else {
remrunqueue(newl);
cpu_switchto(l, newl);
retval = 0;
}

mi_switch calls remrunqueue() and cpu_switchto()

cpu_switchto unlocks the sched lock
cpu_switchto drops CPU priority
softclock is received
schedcpu is called from softclock
schedcpu hits the first if () {} block here:
if (l->l_priority >= PUSER) {
if (l->l_stat == LSRUN &&
(l->l_flag & L_INMEM) &&
(l->l_priority / PPQ) != (l->l_usrpri / PPQ)) {
remrunqueue(l);
l->l_priority = l->l_usrpri;
setrunqueue(l);
} else
l->l_priority = l->l_usrpri;
}

Since mi_switch has already run remrunqueue, the LWP has been
removed, but it's not been put back on any queue, so the
remrunqueue panics.
 1.5 19-Oct-2002  bjh21 branches: 1.5.2; 1.5.8;
Undo recent cpu_switch register usage changes in order to decrease nathanw_sa
merge pain.
 1.4 18-Oct-2002  bjh21 In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.3 14-Aug-2002  thorpej Use cpsr_c rather then cpsr_all where appropriate.
 1.2 31-Aug-2001  simonb branches: 1.2.6; 1.2.14;
Use comments around the token after a #endif.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.6;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file frame.h was added on branch thorpej_scsipi on 2001-03-12 13:27:24 +0000
 1.2.14.1 30-Aug-2002  gehenna catch up with -current.
 1.2.6.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.6.1 31-Aug-2001  thorpej file frame.h was added on branch nathanw_sa on 2002-08-19 21:39:17 +0000
 1.5.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.5.2.2 19-Oct-2002  bjh21 Re-do the following revisions, this time on a branch where they won't
interfere with the nathanw_sa merge:

syssrc/sys/arch/arm/arm32/cpuswitch.S 1.26
syssrc/sys/arch/arm/arm32/genassym.cf 1.18
syssrc/sys/arch/arm/arm32/vm_machdep.c 1.21
syssrc/sys/arch/arm/include/pcb.h 1.5

Original commit message:

In cpu_switch(), stack more registers at the start of the function,
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.

This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
 1.5.2.1 19-Oct-2002  bjh21 file frame.h was added on branch bjh21-hydra on 2002-10-19 11:59:37 +0000
 1.10.2.1 29-Apr-2004  jmc Pullup rev 1.11 (requested by scw in ticket #209)

Always disable interrupts at the start of
DO_AST_AND_RESTORE_ALIGNMENT_FAULTS. PR#23581
 1.11.12.4 21-Jan-2008  yamt sync with head
 1.11.12.3 03-Sep-2007  yamt sync with head.
 1.11.12.2 30-Dec-2006  yamt sync with head.
 1.11.12.1 21-Jun-2006  yamt sync with head.
 1.13.22.1 22-Oct-2006  yamt sync with head
 1.13.20.1 18-Nov-2006  ad Sync with head.
 1.14.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.34.1 19-Jan-2008  bouyer Sync with HEAD
 1.15.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.15.22.3 23-Mar-2008  matt sync with HEAD
 1.15.22.2 30-Aug-2007  matt Move GET_CURCPU before the branch in ENABLE_ALIGNMENT_FAULTS.
 1.15.22.1 28-Aug-2007  matt Rototill to deal with curpcb/astpending/etc moves to cpu_info.
Make ENABLE_ALIGNMENTS_FAULT leave cpu_info in r4.
DO_AST_AND_RESTORE_ALIGNMENT_FAULTS takes advantage of r4 being cpu_info.
 1.15.20.1 20-Jan-2008  chris Sync to HEAD.
 1.15.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.15.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.16.10.2 04-May-2009  yamt sync with head.
 1.16.10.1 16-May-2008  yamt sync with head.
 1.16.8.1 18-May-2008  yamt sync with head.
 1.16.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.16.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.16.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.17.6.1 19-Oct-2008  haad Sync with HEAD.
 1.17.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.8.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.20.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.23.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.23.14.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.23.14.1 30-Oct-2012  yamt sync with head
 1.33.2.3 03-Dec-2017  jdolecek update from HEAD
 1.33.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.35.2.2 18-May-2014  rmind sync with head
 1.35.2.1 28-Aug-2013  rmind sync with head
 1.39.6.2 28-Aug-2017  skrll Sync with HEAD
 1.39.6.1 06-Jun-2015  skrll Sync with HEAD
 1.45.6.1 10-Jun-2019  christos Sync with HEAD
 1.45.4.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.4 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.3 23-Nov-2001  thorpej branches: 1.3.170;
Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.2 30-May-2001  bjh21 branches: 1.2.2; 1.2.8;
Move the declarations of blockio.S functions from katelib.h to a new, exciting
<arm/blockio.h>. katelib.h includes it for compatibility.
 1.1 23-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file katelib.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.8.1 30-May-2001  nathanw file katelib.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.170.1 03-Dec-2017  jdolecek update from HEAD
 1.36 02-Apr-2022  skrll Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.35 28-Aug-2020  skrll Some KASAN fixes and tweaks

- don't access BSS variables when __md_early
- centralise the INIT_ARM_STACK_{SHIFT,SIZE} defines and create a new
INIT_ARM_TOTAL_STACK
- Only create L1PT entries in kasan_md_shadow_map_page if
arm32_kernel_vm_init hasn't created the L2PTs (and their L1PT entries)
- Add some comments to explain what's going on
 1.34 04-Jul-2020  skrll Protect with #ifdef _KERNEL
 1.33 05-Mar-2020  riastradh Revert "Include opt_diagnostic.h for DIAGNOSTIC."

This did not do what I thought it did. opt_diagnostic.h is only for
the unused _DIAGNOSTIC, which seems like an abortive attempt to
incrementally convert DIAGNOSTIC to an opt_*.h option rather than a
command-line option.
 1.32 05-Mar-2020  riastradh Include opt_diagnostic.h for DIAGNOSTIC.

...at least, in header files, which may not have already included
libkern.h.
 1.31 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.30 18-Dec-2019  riastradh branches: 1.30.2;
New function cpu_startup_hook on arm.

Called at end of cpu_startup. Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup. Defined as a weak alias to a
function that does nothing, so optional.

ok jmcneill
 1.29 16-Jul-2019  skrll branches: 1.29.2;
Consistently use vaddr_t as initarm and friends return type.

Makes no difference to binaries except for aarch64 where it's required
 1.28 03-Jan-2019  skrll Start CPUs more like aarch64 by using a cpu_mpidr array (if populated)
to map MPIDRs to an index for each CPU.

Towards big.LITTLE support.
 1.27 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.26 05-Aug-2018  skrll Refactor code to split aarch{32,64} kernel page tables and VM setup. This
will help re-build the kernel page tables on aarch64 with correct section
mappings.
 1.25 05-Aug-2018  skrll Expose kern_vtopdiff
 1.24 03-Aug-2018  skrll Provide and use kern_vtopdiff in KERN_{VTOPHYS,PHYSTOV}. A step towards
generic arm.
 1.23 01-Aug-2018  skrll s/_ARM32_BOOT_MACHDEP_H_/_ARM32_MACHDEP_H_/ in multiple inclusion
protection.
 1.22 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.21 20-Feb-2017  skrll branches: 1.21.12; 1.21.14;
Whitespace in comment
 1.20 20-Feb-2017  skrll Trailing whitespace
 1.19 11-Nov-2015  jmcneill branches: 1.19.2; 1.19.4;
add support for optional RB_POWERDOWN handler
 1.18 28-Mar-2014  matt branches: 1.18.6;
Change arm_cpu_mbox to volatile
 1.17 20-Oct-2012  matt branches: 1.17.2;
Increase l2pts to accomodate large memory disks.
 1.16 01-Sep-2012  martin branches: 1.16.2;
Backout previous, Matt fixed it differently
 1.15 01-Sep-2012  martin Move struct pv_addr next to struct bootmem_info into machdep.h and have
pmap.h include that.
Seems to be the least intrusive build fix; Matt: feel free to revamp.
 1.14 31-Aug-2012  matt Make cpu_reset, most of initarm and the kvm init code common.
Add MP hooks for cpu_need_resced
Add idlestck which is allocated in arm32_kvminit
 1.13 29-Aug-2012  matt Don't use locations in .data to store exception temporaries, use decidicated
space in cpu_info instead. This also moves undefined_handler_address into
cpu_info as well.
Use the new armreg* inlines for getting TPIDRPRW register.
Add MULTIPROCESSOR version of CPU_INFO_FOREACH
 1.12 29-Aug-2012  matt Since the PMC cycle counter is started in cpufunc no reason to do so here.
Use curcpu()->ci_data.cpu_cc_freq and new armreg* inlines.
 1.11 16-Aug-2012  matt Move the standard definitions of the {UND,IRQ,FIQ,ABT}_STACK_SIZE to
<arm32/machdep.h>
Move the extern for cpu_reset_address to the same file.
Add cpu_reset_address_paddr.
Kill cpu_reset_v4_MMU_disable.
if cpu_reset_address is NULL, then the MMU will be disabled.
 1.10 29-Jul-2012  matt Fix more -fno-common fallout.
Move more variables to common locations.
 1.9 14-Mar-2009  dsl branches: 1.9.12; 1.9.20;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.8 04-Mar-2007  christos branches: 1.8.46; 1.8.54; 1.8.60; 1.8.64;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 21-Feb-2002  thorpej branches: 1.7.34; 1.7.72;
map_chunk() -> pmap_map_chunk(), and move it to pmap.c
 1.6 20-Feb-2002  thorpej map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c
 1.5 20-Feb-2002  thorpej Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
 1.4 20-Feb-2002  thorpej Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
 1.3 20-Jan-2002  thorpej Some prototype cleanup.
 1.2 07-Jan-2002  chris branches: 1.2.2; 1.2.4;
Finish up the changes to get LOOSE_PROTOTYPES working for cats.
Note that this leaves a few inconsistencies (no more than we already had though) eg initarm is now prototyped in arm32/machdep.h, however only cats currently makes use of that header.
 1.1 05-Jan-2002  chris Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.2.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.2 11-Jan-2002  nathanw More catchup.
 1.2.4.1 07-Jan-2002  nathanw file machdep.h was added on branch nathanw_sa on 2002-01-11 23:38:04 +0000
 1.2.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 07-Jan-2002  thorpej file machdep.h was added on branch kqueue on 2002-01-10 19:37:55 +0000
 1.7.72.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.34.1 03-Sep-2007  yamt sync with head.
 1.8.64.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.60.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.54.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.46.1 04-May-2009  yamt sync with head.
 1.9.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.9.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.12.1 30-Oct-2012  yamt sync with head
 1.16.2.3 03-Dec-2017  jdolecek update from HEAD
 1.16.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.2.1 18-May-2014  rmind sync with head
 1.18.6.2 28-Aug-2017  skrll Sync with HEAD
 1.18.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.19.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.19.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.21.14.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.14.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.14.1 10-Jun-2019  christos Sync with HEAD
 1.21.12.4 18-Jan-2019  pgoyette Synch with HEAD
 1.21.12.3 20-Oct-2018  pgoyette Sync with head
 1.21.12.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.21.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.29.2.1 12-Feb-2020  martin Pull up following revision(s) (requested by riastradh in ticket #705):

sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.35
sys/stand/efiboot/efifdt.c: revision 1.20
sys/stand/efiboot/efifdt.h: revision 1.7
sys/arch/aarch64/include/machdep.h: revision 1.9
sys/stand/efiboot/efiboot.h: revision 1.11
sys/arch/arm/arm32/arm32_machdep.c: revision 1.129
sys/arch/arm/include/arm32/machdep.h: revision 1.30
sys/stand/efiboot/exec.c: revision 1.12
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.65
sys/stand/efiboot/version: revision 1.14
sys/stand/efiboot/boot.c: revision 1.19

New function cpu_startup_hook on arm.

Called at end of cpu_startup. Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup. Defined as a weak alias to a
function that does nothing, so optional.
ok jmcneill

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.
Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill
 1.30.2.1 29-Feb-2020  ad Sync with head.
 1.34 30-May-2021  rin Include opt_param.h for MSGBUFSIZE ifdef _KERNEL_OPT.
 1.33 10-Jul-2020  skrll branches: 1.33.6; 1.33.8;
Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.32 08-Jul-2020  skrll Define USPACE in terms of UPAGES (not the other way around) now that
NBPG is fixed at 4K
 1.31 08-Jul-2020  skrll Whitespace
 1.30 13-Feb-2020  skrll Bump the amount of KMEM allowed to 1/3rd of KVM. _ARCH_ARM_6 has a split
of 2:2 and others have a split of 3:1.

Tested by martin@ Thanks
 1.29 01-Feb-2020  skrll G/C
 1.28 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.27 19-Jun-2019  skrll branches: 1.27.2; 1.27.4;
KNF and add a comment
 1.26 04-Feb-2019  skrll Trailing whitespace
 1.25 09-Jun-2017  chs branches: 1.25.6;
if __HIDE_DELAY is defined, do not define delay() or DELAY().
needed by dtrace and ZFS.
 1.24 02-Apr-2015  matt Don't include <machine/cpu.h>
 1.23 05-Apr-2014  skrll branches: 1.23.6;
On second thoughts don't do the RPI hack for everyone.
 1.22 05-Apr-2014  skrll Drop down to 4KB pages on armv6 for now.
 1.21 30-Mar-2014  matt Make the ARM pmap use ASIDs, split TTBRs, and MP safe. This only happens for
ARMv6 or later CPUs. This means that on context switch that the TLBs and
caches no longer to cleaned/flushed. Also, eXecute Never (XN) protection has
been added so non-exec pages can not be run. Change the page size for ARMv6+
to be 8KB while allows a L1PT to be a normal page. This means that the L1PT
is not special. Use the XN support to only sync pages that are executed from.
 1.20 29-May-2013  rkujawa branches: 1.20.2;
Explicitely cast to unsigned. Avoid bugs caused by misintepreting the result as
signed.

riastradh@ suggested to change these macros into static inline functions.
But I'm still not convinced...

Obtained from Marvell, Semihalf.
 1.19 20-Mar-2013  skrll Bump MSGBUFSIZE on arm ports to 16KB.

OK matt@
 1.18 07-Dec-2012  matt FPCONTEXTSIZE is dead.
 1.17 04-Feb-2012  para branches: 1.17.6;
improve sizing of kmem_arena now that more allocations are made from it
don't enforce limits if not required

ok: riz@
 1.16 14-Jan-2011  rmind branches: 1.16.8; 1.16.12;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.15 08-Feb-2010  joerg branches: 1.15.2;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.14 14-Mar-2009  dsl branches: 1.14.2;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.13 19-Jan-2008  chris branches: 1.13.10; 1.13.18; 1.13.24;
With the removal of IPKDB on arm, the undefined stack is only used to
bounce into SVC32 mode, there is no per-process data stored on it.

We can therefore use the undefined stack setup by the platform machdep.c
as a system wide undefined stack.

This removes the need for a per-process undefined stack, and the processor
mode switching overhead it causes in cpu_switchto.

The space freed in the USPACE is used to increase the per process kernel
stack size.
 1.12 11-Dec-2005  christos branches: 1.12.46; 1.12.50; 1.12.52; 1.12.58; 1.12.66;
merge ktrace-lwp.
 1.11 29-Dec-2004  joff branches: 1.11.10;
Bump UPAGES back down to 8KB now that real issue was found with ep93xx intr handling
 1.10 23-Dec-2004  joff bump default U-area size from 8KB to 64KB, 8KB is too little to even successfully boot a tsarm SBC
 1.9 24-Mar-2002  thorpej branches: 1.9.12;
* arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.8 26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.7 22-Feb-2002  briggs Bumb NMBCLUSTER defaults to 2048 for GATEWAY and 1024 otherwise. These
match current powerpc defaults and are more reasonable for the current era.
 1.6 11-Aug-2001  chris branches: 1.6.6;
Add arm_trunc_page, similair to trunc_page but using a hardcoded PGOFSET.
 1.5 07-Aug-2001  bjh21 Use <arm/param.h> to get shared definitions.
 1.4 30-May-2001  mrg branches: 1.4.2;
use _KERNEL_OPT
 1.3 04-Mar-2001  matt branches: 1.3.2; 1.3.4;
Only define MACHINE & MACHINE_ARCH in port-dependent param.h.
Everything else (since it's common) is from <arm/arm32/param.h>
 1.2 24-Feb-2001  toshii Make hpcarm kernel compile again.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.3.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.3.4.1 04-Mar-2001  bouyer file param.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.6.6.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.6.6.2 28-Feb-2002  nathanw Catch up to -current.
 1.6.6.1 11-Aug-2001  nathanw file param.h was added on branch nathanw_sa on 2002-02-28 04:07:34 +0000
 1.9.12.1 17-Jan-2005  skrll Sync with HEAD.
 1.11.10.1 21-Jan-2008  yamt sync with head
 1.12.66.1 20-Jan-2008  bouyer Sync with HEAD
 1.12.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.52.1 23-Mar-2008  matt sync with HEAD
 1.12.50.1 20-Jan-2008  chris Sync to HEAD.
 1.12.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.13.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.10.2 11-Mar-2010  yamt sync with head
 1.13.10.1 04-May-2009  yamt sync with head.
 1.14.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.15.2.1 05-Mar-2011  rmind sync with head
 1.16.12.1 18-Feb-2012  mrg merge to -current.
 1.16.8.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.8.2 16-Jan-2013  yamt sync with (a bit old) head
 1.16.8.1 17-Apr-2012  yamt sync with head
 1.17.6.4 03-Dec-2017  jdolecek update from HEAD
 1.17.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.6.2 23-Jun-2013  tls resync from head
 1.17.6.1 25-Feb-2013  tls resync with head
 1.20.2.1 18-May-2014  rmind sync with head
 1.23.6.2 28-Aug-2017  skrll Sync with HEAD
 1.23.6.1 06-Apr-2015  skrll Sync with HEAD
 1.25.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.25.6.1 10-Jun-2019  christos Sync with HEAD
 1.27.4.2 29-Feb-2020  ad Sync with head.
 1.27.4.1 25-Jan-2020  ad Sync with head.
 1.27.2.1 07-Jun-2020  martin Pull up following revision(s) (requested by skrll in ticket #951):

sys/arch/arm/include/arm32/param.h: revision 1.30

Bump the amount of KMEM allowed to 1/3rd of KVM. _ARCH_ARM_6 has a split
of 2:2 and others have a split of 3:1.

Tested by martin@ Thanks
 1.33.8.1 31-May-2021  cjep sync with head
 1.33.6.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.4 03-Sep-2001  matt branches: 1.4.6;
Add a merged <pcb.h> for arm26/arm32.
 1.3 27-Aug-2001  chris Remove unused entries from the pcb. This is with a long term view of merging the arm26 and arm32 pcb's.
 1.2 28-Feb-2001  bjh21 branches: 1.2.4; 1.2.6;
PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26). Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway). Someone should try running one.
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.2.6.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 28-Feb-2001  bouyer file pcb.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.4.6.2 03-Sep-2001  matt Add a merged <pcb.h> for arm26/arm32.
 1.4.6.1 03-Sep-2001  matt file pcb.h was added on branch nathanw_sa on 2001-09-03 19:20:29 +0000
 1.178 09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.177 12-Oct-2023  skrll Fix non-DIAGNOSTIC builds
 1.176 02-Aug-2023  skrll No need to define cpu_{,set}_tlb_info here - just use the
sys/uvm/pmap/pmap_tlb.h versions.
 1.175 24-Apr-2023  martin Fix DEVMAP_FLAGS, patch from Nick.
 1.174 20-Apr-2023  skrll Provide a shared pmap_devmap implementation and convert all pmap_devmap
arrays to use DEVMAP_ENTRY{,_END}
 1.173 02-Apr-2022  skrll branches: 1.173.4;
Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
 1.172 15-Jan-2022  skrll Remove unnecessary brackets
 1.171 16-Oct-2021  skrll pm_remove_all is a shared field so move it out the #ifdefs
 1.170 04-May-2021  skrll Provide pte_{value,valid_p}
 1.169 30-Oct-2020  skrll branches: 1.169.6;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.168 03-Jul-2020  skrll Consistency...#define<tab>
 1.167 18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.166 29-Mar-2020  skrll branches: 1.166.2;
Don't define pt_entry_t if _LOCORE

Reported by Patrick Welche
 1.165 29-Mar-2020  skrll Provide a pt_entry_t and PRIxPTE
 1.164 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.163 24-Feb-2020  ad Adjust for UVM locking changes
 1.162 23-Feb-2020  skrll G/C l1pte_pgindex
 1.161 05-Feb-2020  skrll Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.

armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO

bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.

XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.160 20-Jan-2020  skrll s/_ARM_ARCH_6/ARM_MMU_EXTENDED/ in the #ifdef for the recent 4k pages
change
 1.159 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.158 12-Jan-2020  christos fix -Wsign-compare because module tests trigger it.
 1.157 10-Dec-2019  ad branches: 1.157.2;
pg->phys_addr -> VM_PAGE_TO_PHYS(pg)
 1.156 18-Oct-2018  skrll branches: 1.156.4;
Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.155 01-Apr-2018  ryo branches: 1.155.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.154 24-Jan-2018  skrll branches: 1.154.2;
Remove port-acorn26

OK core@
 1.153 22-Oct-2017  skrll Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
 1.152 29-Aug-2017  skrll Revert the *_PROT_RO_* define changes and do all the work in the *_PROT()
macros for RO kernel pages.

cats boots again - no idea how it slipped through my testing previously
 1.151 11-Jul-2017  skrll Fix up L{1_S,2_L,2_S}_PROT for recent changes to the
L{1_S,2_L,2_S}_PROT_RO* values.
 1.150 06-Jul-2017  skrll KNF two comments
 1.149 06-Jul-2017  skrll Re-define the L*_PROT_RO for MMUs that don't really support RO mapping
and adjust l2pte_set_{writeable,readony} to the new values.

This allows RO mappings for MMUs that actually support them.
 1.148 06-Jul-2017  skrll Trailing whitespace
 1.147 25-May-2017  skrll Use the define name PMAP_HWPAGEWALKER and not PMAP_TLB_HWPAGEWALKER
 1.146 25-May-2017  skrll Spell ARM_MMU_EXTENDED correctly
 1.145 23-Feb-2017  skrll Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.

Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.

PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
 1.144 14-Jul-2016  skrll branches: 1.144.2; 1.144.4;
Spell PMAP_TLB_NEED_SHOOTDOWN correctly
 1.143 11-Nov-2015  skrll Support pmap_pv_track and friends
 1.142 09-Sep-2015  skrll Make L2_S_CACHE_MASK_armv6n consistent with other *_CACHE_MASK_armv6n
 1.141 01-Jun-2015  matt pmap_directbase is a failed experiment, nuke it.
 1.140 30-May-2015  matt Support directmapped systems with >1GB that start memory at 0x80000000.
 1.139 12-May-2015  skrll Add some KASSERTs to catch similar bugs to the cnptes/nptes one
 1.138 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.137 08-Nov-2014  skrll branches: 1.137.2;
Whitespace
 1.136 29-Oct-2014  skrll Sprinkle #include "opt_multiprocessor.h"
 1.135 31-Jul-2014  skrll branches: 1.135.2;
Trailing whitespace
 1.134 27-Jul-2014  skrll More fixes as a step towards ARM_MMU_EXTENDED on RPI.

- don't set CPU_CONTROL_SYST_ENABLE in arm11x6_setup for ARM_MMU_EXTENDED

- Use the new MMU defines for V6N

- pull in arm/cpuconf.h in vmparam s that VM_MAXUSER_ADDRESS gets set
correctly.
 1.133 15-Jun-2014  ozaki-r Fix macro name; PMAP_TLB_NEED_SHOOTDOWN => PMAP_NEED_TLB_SHOOTDOWN
 1.132 16-Apr-2014  matt Make to flush the secondary cache when syncing PTEs when the Sheeva L2 cache
is used.
 1.131 11-Apr-2014  matt Add a kernel for the CUBIETRUCK (CUBIEBOARD3). Allow direct mapping of all
memory (but for now allow the memory mapped above KERNEL_BASE to used for
poolpages).
 1.130 04-Apr-2014  matt branches: 1.130.2;
For ARM_MMU_V6C enable supersections
 1.129 31-Mar-2014  skrll Deal with large page mappings in l2pte_set.

Now the RPI can get passed setting the new TTB.

ok matt@
 1.128 31-Mar-2014  matt For ARM_MMU_EXTENDED, a KERNEL_BASE >= 0x80000000 is ok but a
VM_USER_MAXADDRESS can not be more than 0x80000000 - PAGE_SIZE.
 1.127 31-Mar-2014  matt Add a missing 0 to an #error
 1.126 30-Mar-2014  matt Make the ARM pmap use ASIDs, split TTBRs, and MP safe. This only happens for
ARMv6 or later CPUs. This means that on context switch that the TLBs and
caches no longer to cleaned/flushed. Also, eXecute Never (XN) protection has
been added so non-exec pages can not be run. Change the page size for ARMv6+
to be 8KB while allows a L1PT to be a normal page. This means that the L1PT
is not special. Use the XN support to only sync pages that are executed from.
 1.125 26-Feb-2014  matt Remove duplicate PMAP_PTE
 1.124 26-Feb-2014  matt Replace 1000 with PAGE_SIZE
 1.123 26-Feb-2014  matt Add PMAP_PTE flag. (map page so it can be used as a PDE or PTE page)
 1.122 18-Aug-2013  matt struct pcb; for a function prototype.
 1.121 03-Jul-2013  matt Add l2pte_set and l2pte_reset inlines to set/reset a pte. These will be
used to support > 4KB pages sizes.
Don't use >> L1_S_SHIFT, use L1_IDX() instead.
 1.120 12-Jun-2013  matt branches: 1.120.2;
Add a ARM_HAS_VBAR option which forces the use of the VBAR register. This
allows much code to deal with vector_page mappings to be eliminated. On a
BEAGLEBONE kernel, this saves 8KB of text and instructions that never have
to be executed. (The PJ4B has VBAR but doesn't implement the security
extensions it is part of so a method was needed to allow it use VBAR with
relying on the default test for the security extensions.)
 1.119 12-Dec-2012  matt Protect more definitions with #ifndef _LOCORE
 1.118 12-Dec-2012  matt Enable direct-mapped poolpages if __HAVE_MM_MD_DIRECT_MAPPED_PHYS is defined.
 1.117 10-Dec-2012  matt Add b{zero,copy}_page{,_vfp} and physical_end
 1.116 10-Dec-2012  matt Add pmap_{copy,zero}_page_vfp
 1.115 12-Nov-2012  skrll C99 types
 1.114 17-Oct-2012  matt Add PMAP_MAP_POOLPAGE / PMAP_UNMAP_POOLPAGE if PMAP_NEED_ALLOC_POOLPAGE is
defined.
 1.113 17-Oct-2012  matt Add a PMAP_NEEDS_ALLOC_POOLPAGE / PMAP_ALLOC_POOLPAGE hook so systems can
allocate pool pages from a specific VM freelist.
 1.112 22-Sep-2012  matt Don't use an asm in pmap_activate to update the TTBR, use cpu_setttb instead
but add a second argument to it to indicate whether the TLB/caches need to be
flushed. Default cortex to pmap_needs_fixup = 1. But check the MMFR3 field
to see if the fixed can be skipped.
Use a cf_flag bit 0 to indicate whether the A9 L2 cache should disable (bit 0 = 1)
or enabeld (bit = 0).

With these changes, the A9 MMU can use traverse caches to do MMU tablewalks
Also, make sure all memory has the shareable bit for the A9.
 1.111 11-Sep-2012  matt branches: 1.111.2;
Fix the CACHE_MASKs for armv6 to include TEX and S bits.
Fix a comment in pte.h
 1.110 07-Sep-2012  matt Switch cortex_a9 back to need_ptesync = 1
Add code to disable the L2 cache on cortex-a9 (for now).
Add evcnt for all the fault types.
Move cache info in a structure and have one for the pcache and one for scache.
Probe L1/L2 caches properly for ARMv7
 1.109 06-Sep-2012  matt Alas, Cortex-A8 can't TLB walk out of their caches so they need to sync each PTE.
 1.108 06-Sep-2012  matt Enable "shareable" access to the page table for armv7. PTE_SYNC only does
a DSB now on an armv7 cpu and no longer needs to flush the cache line to ram.
 1.107 02-Sep-2012  matt Make bus_dma understand supersections.
 1.106 01-Sep-2012  martin Backout previous, Matt fixed it differently
 1.105 01-Sep-2012  martin Move struct pv_addr next to struct bootmem_info into machdep.h and have
pmap.h include that.
Seems to be the least intrusive build fix; Matt: feel free to revamp.
 1.104 30-Aug-2012  matt Add a l1pte_supersection_p macro.
 1.103 20-Aug-2012  matt Add support for mapping SuperSection on armv6 and armv7. These always
a domain of 0 so move the kernel from domain 15 to domain 0.
 1.102 29-Jul-2012  matt Fix more -fno-common fallout.
Move more variables to common locations.
 1.101 28-Jan-2012  matt branches: 1.101.4;
Nuke the simplelock from vm_page_md
 1.100 12-Jun-2011  rmind branches: 1.100.2; 1.100.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.99 10-Mar-2011  bsh branches: 1.99.2;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.98 28-Feb-2011  macallan implement arm32_pmap_flags() to allow mappings with write buffering enabled,
mostly for video memory
Tested on shark
 1.97 14-Nov-2010  uebayasi branches: 1.97.2; 1.97.4;
Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap. vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
 1.96 02-Nov-2010  uebayasi Fix build of evbarm.
 1.95 16-Jun-2010  jmcneill PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.94 27-Dec-2009  uebayasi branches: 1.94.2; 1.94.4;
Add write-through cache work-around for ARM11 as well as ARM9/ARM10. Analyzed
& tested on i.MX35 with help from Tsubai Masanari.
 1.93 22-Oct-2009  rmind Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore. Apart from that,
no functional differences are intended.
 1.92 19-Aug-2009  thorpej Use PMAP_ENABLE_PMAP_KMPAGE to enable PMAP_KMPAGE. We still want the bit
defined in the MI space, not in an MD header.
 1.91 19-Aug-2009  thorpej Rationalize the definition of PMAP_KMPAGE.
 1.90 30-Dec-2008  matt Reclaim PVF_KNC in VIPT to be PVF_MULTCLR (page has multiple colors).
Track when a page is mapping in multiple colors and deal with the ramifications.
When a page's MOD attribute is cleared, clean it from the cache.
Fix a logic inversion.

With these changes, the TI SDP2420 H4 board can successfully natively build a
TISDP2420 kernel.
 1.89 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.88 13-Aug-2008  matt branches: 1.88.2; 1.88.10;
Fix a few more corner cases. Always KMPAGE or pages with unmanaged writeable
kernel mappings as modified. Only ever set DIRTY bit is DMOD is true and
NC is false. Don't modify unmanaged mappings in pmap_clearbit.
 1.87 21-Jul-2008  matt Add PMAP_KMPAGE defintion (forgotten commit). Also add PVF_DIRTY which will
be used by an update pmap.c shortly (to note what pages may have dirty
cache lines).
 1.86 16-Jul-2008  matt Revamp bookkeeping for pages entered by pmap_kenter_pa. Keep track of them
on pvlists so that the cacheability can be properly tracked.
 1.85 27-Apr-2008  matt branches: 1.85.2; 1.85.4; 1.85.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.84 01-Jan-2008  chris branches: 1.84.6; 1.84.8; 1.84.10;
Add support for kcore headers to arm32 kernel core dumps.

The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
 1.83 17-Oct-2007  garbled branches: 1.83.2; 1.83.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.82 15-Sep-2007  scw ARM cpu_switchto() has been partially broken since yamt-idlelwp was merged
as its cache/tlb management smarts relied too heavily on pre-merge context-
switch behaviour. See PR kern/36548 for one manifestation of the breakage.

To address this:
- Ditch the shadow pmap variables in the PCB (pagedir, l1vec, dacr, cstate)
as it was too easy for them to get out of sync with the pmap.
- Re-write (and fix) the convoluted cpuswitch.S cache/tlb ASM code in C.
It's only slightly less efficient, but is much more readable/maintainable.
- Document cpufuncs.cf_context_switch() as being C-callable.
- pmap_activate() becomes a no-op if the lwp's vmspace is already active.
(Good performance win, since pmap_activate() is now invoked on every
context-switch, even though ARM's cpu_switchto() already does all the
grunt work)

XXX: Some CPU-specific armXX_context_switch() implementations (arm67,
arm7tdmi, arm8) always flush the I+D caches. This should not be necessary.
Someone with access to hardware (acorn32?) needs to deal with this.
 1.81 22-Feb-2007  thorpej branches: 1.81.4; 1.81.12; 1.81.18; 1.81.20; 1.81.22; 1.81.24;
TRUE -> true, FALSE -> false
 1.80 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.79 24-Dec-2005  perry branches: 1.79.26; 1.79.30;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.78 10-Dec-2005  scw Implement pmap_collect() for arm32.
 1.77 13-Oct-2003  scw branches: 1.77.16;
On Xscale, define PMAP_UAREA() and use it to tweak uarea mappings so
they use the mini D$.

This results in a small performance boost on xscale platforms, since
flushing the main cache on a context switch won't affect the kernel
stack/pcb.
 1.76 06-Sep-2003  rearnsha Add support for ARM10 class processors.
 1.75 18-Jun-2003  bsh branches: 1.75.2;
protect with #ifndef _LOCORE so that assembler codes can share
definitions in this file such as PMAP_DOMAIN_KERNEL.
 1.74 15-Jun-2003  thorpej Add another devmap routine that allows bootstrap code to register
a devmap reflecting mappings that are created by really early
bootstrap code before pmap_devmap_bootstrap() is called.
 1.73 15-Jun-2003  thorpej Replace the ad-hoc "section mapping table" for static device mappings
with a more generic "devmap" structure that can also handle mappings
made with large and small pages. Add new pmap routines to enter these
mappings during bootstrap (and "remember" the devmap), and routines to
look up the static mappings once the kernel is running.
 1.72 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.71 03-May-2003  thorpej Reduce differences between ARM32_NEW_VM_LAYOUT and not; always pass
the start and end of the kernel managed virtual address space to
pmap_bootstrap() in the new pmap.
 1.70 28-Apr-2003  scw Fix the bug reported by Richard Earnshaw in port-arm32/21349.

Make sure to check the access permissions before doing
ref/mod/domain fixups. This is particularly important
on machines with ARM_VECTORS_LOW.
 1.69 22-Apr-2003  thorpej Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1. While the SA-1's MMU is basically
compatible with the generic, the SA-1 cache does not have a write-through
mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
compile time. We evaluate it like so:
- If SA-1-style MMU is the only type configured -> 1
- If SA-1-style MMU is not configured -> 0
- Otherwise, defer to a run-time variable.
If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
code can include the necessary run-time support. PMAP_INCLUDE_PTE_SYNC
largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
has a write-back cache. If so, init the PT cache mode to C=1,B=0 to get
write-through mode. Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8(). Old pmap, same as generic. New pmap,
sets page table cacheability to 0 (ARM8 has a write-back cache, but
flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
since we use write-through mode all the time on ARM9 right now. (What
this really tells me is that the test for write-through cache is less
than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1(). Old pmap, same as generic. New pmap,
does generic initialization, then resets page table cache mode to
C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
 1.68 18-Apr-2003  thorpej Gah, fix *another* typo.
 1.67 18-Apr-2003  thorpej Oops, fix typo.
 1.66 18-Apr-2003  thorpej Define two new macros to test if a mapping is mappable with an L1 Section
mapping or an L2 Large Page mapping.
 1.65 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.64 09-Apr-2003  thorpej Add the ability for pool caches to cache the physical address of
objects. Clients of the pool_cache API must consistently use
the "paddr" variants or not, otherwise behavior is undefined.

Enable this on Alpha, ARM, MIPS, and x86. Other platforms must
define POOL_VTOPHYS() in the appropriate manner in order to enable
the feature.

Part 1 of a series of simple patches contributed by Wasabi Systems
to improve network performance.
 1.63 23-Mar-2003  chris Garbage collect pmap_map, the last (and only?) use has been removed.
 1.62 12-Nov-2002  chris Fix PTE_FLUSH_RANGE macro, it should have had a cnt parameter.
 1.61 22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.60 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.59 24-Aug-2002  thorpej Define macros describing the 4M super-sections that our pmap
actually uses (since we allocate PT pages in 4K chunks, rather
than 1K chunks).
 1.58 24-Aug-2002  thorpej Enable caching on kernel and user page tables. This saves having
to do uncached memory access during VM operations (which can be
quite expensive on some CPUs).

We currently write-back PTEs as soon as they're modified; there is
some room for optimization (to write them back in larger chunks).
For PTEs in the APTE space (i.e. PTEs for pmaps that describe another
process's address space), PTEs must also be evicted from the cache
complete (PTEs in PTE space will be evicted durint a context switch).
 1.57 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.56 09-Aug-2002  thorpej Add a PVF_EXEC -- we don't use it yet, though.
 1.55 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.54 31-Jul-2002  thorpej Move the calls to uvm_page_physload() out of pmap_bootstrap() and
into platform-specific initialization code, giving platform-specific
code control over which free list a given chunk of memory gets put
onto.

Changes are essentially mechanical. Test compiled for all ARM
platforms, test booted on Intel IQ80321 and Shark.

Discussed some time ago on port-arm.
 1.53 12-Apr-2002  thorpej branches: 1.53.2;
Default all XScale core processors to the read/write-allocate write-back
cache mode. Add a new XSCALE_CACHE_WRITE_THROUGH option for people who
are paranoid about the cache-related errata (you *do* have to line up
the planets correctly to trip them, but having the option is useful).
 1.52 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.51 10-Apr-2002  thorpej Add separate pmap_{zero,copy}_page() functions for generic ARM
vs. XScale. Use the mini-data cache for the destination on XScale,
thus saving tossing out 4K of possible-useful data from the main
data cache each time.

This significantly improves every test in lmbench.
 1.50 09-Apr-2002  thorpej * Move the code that cleans the XScale mini-data cache into its
own function.
* Add a new function which sets up the mini-data cache clean area
properly.
 1.49 09-Apr-2002  thorpej * Split pte_cache_mode into pte_l1_s_cache_mode, pte_l2_l_cache_mode,
and pte_l2_s_cache_mode. The cache-meaningful bits are different
for these descriptor types on some processor models.
* Add pte_*_cache_mask, corresponding to each above, which has a mask
of the cache-meangful bits, and define those for generic and XScale
MMU classes. Note, the L2_S_CACHE_MASK_xscale definition requires
use of the Extended Small Page L2 descriptor (the "X" bit overlaps
with AP bits otherwise).
 1.48 09-Apr-2002  thorpej Use the "Extended Small Page" L2 descriptor type on XScale (note
this means that there are no 1K sub-pages on XScale, but we don't
use them anyway).
 1.47 09-Apr-2002  thorpej Remove the implementation-defined bits from L1_S_PROTO_xscale and
L1_C_PROTO_xscale; while they are supposed to be set to 1 on generic
ARM MMUs (according to the SA-110 and ARM920T manuals), they are listed
as "should be zero" in the i80200 manual.
 1.46 09-Apr-2002  thorpej Define 2 classes of ARM MMUs:
1. Generic (compatible with ARM6)
1. XScale (can be used as generic, but also has certainly nifty extensions).

Define abstract PTE bit defintions for each MMU class. If only one MMU
class is configured into the kernel (based on CPU_* options), then we
get the constants for that MMU class. Otherwise we indirect through
varaibles set up via set_cpufuncs().

XXX The XScale bits are currently the same as the generic bits. Baby steps.
 1.45 09-Apr-2002  thorpej Use abstract names for the protection and PTE type bits in
L1 and L2 descriptors. This will allow us to support different
PTE layouts that enable the use of extensions on different
processor models.
 1.44 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.43 04-Apr-2002  thorpej Rename flags that are really part of the pv_entry/mdpage into
pmap.h and give them more descriptive names and better comments:
* PT_M -> PVF_MOD (page is modified)
* PT_H -> PVF_REF (page is referenced)
* PT_W -> PVF_WIRED (mapping is wired)
* PT_Wr -> PVF_WRITE (mapping is writable)
* PT_NC -> PVF_NC (mapping is non-cacheable; multiple mappings)
 1.42 03-Apr-2002  thorpej Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.41 25-Mar-2002  thorpej * Some cleanup.
* Delete the call to pmap_copy() in pmap.h
 1.40 25-Mar-2002  thorpej Move some private pmap data structures into pmap.c
 1.39 25-Mar-2002  thorpej Tidy a few things up.
 1.38 25-Mar-2002  thorpej Correct the comment describing the layout of the VM space. In
particular, don't describe a recursive PTE mapping, since the ARM
port doesn't (and can't) use one.
 1.37 24-Mar-2002  thorpej Remove exported pmap_pte() prototype.
 1.36 24-Mar-2002  thorpej Clean up PTE access macros a bit.
 1.35 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.34 23-Mar-2002  thorpej Garbage-collect the "pagehook" stuff.
 1.33 23-Mar-2002  thorpej * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.32 23-Mar-2002  thorpej Remove redundant #ifdef _KERNEL
 1.31 05-Mar-2002  thorpej * Make pmap_is_{modified,referenced}() macros in pmap.h that just
test the attributes in the vm_page_md directly.
* Clean up pmap_clear_{modified,referenced}().
* Delete now-unused pmap_testbit().
 1.30 05-Mar-2002  thorpej Switch back to using vm_page_md (thanks chuq for finding the bug
in the code that made it unstable before!)
 1.29 03-Mar-2002  chris Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.28 21-Feb-2002  thorpej Keep track of which kernel PTs are available during bootstrap,
and let pmap_map_chunk() lookup the correct one to use for the
current VA. Eliminate the "l2table" argument to pmap_map_chunk().

Add a second L2 table for mapping kernel text/data/bss on the
IQ80310 (fixes booting kernels with ramdisks).
 1.27 21-Feb-2002  thorpej map_chunk() -> pmap_map_chunk(), and move it to pmap.c
 1.26 20-Feb-2002  thorpej map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c
 1.25 20-Feb-2002  thorpej Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
 1.24 20-Feb-2002  thorpej Rename map_section() to pmap_map_section(), move it to pmap.c, and give it
an extra argument (prot - specifies protection of the mapping).
 1.23 06-Feb-2002  thorpej Back out all the vm_page_md changes. They are causing some
mysterious problems (a similar change to the i386 pmap causes
mysterious problems there, as well), and the issue needs to
be investigated more.
 1.22 06-Feb-2002  thorpej Efficiency tweaks, some made possible by vm_page_md.
 1.21 05-Feb-2002  thorpej Use vm_page_md rather than pmap_physseg. Saves lots of cycles in
common operations.
 1.20 19-Jan-2002  chs add a new flag PMAP_CACHE_VIVT for the pmap to inform the MI code that
that the cache is virtually-indexed and virtually-tagged (such as on the ARM),
and use this flag in the UBC code to be more friendly to those caches.
 1.19 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.18 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.17 19-Nov-2001  thorpej Implement pmap_update(). Currently it just calls cpu_cpwait(),
which ensures that TLB/cache operations have completed.
 1.16 03-Nov-2001  rearnsha branches: 1.16.2;
Define boolean predicates pmap_pde_page, pmap_pde_section & pmap_pde_fpage,
which return true if their pde argument is a coarse page, section or
fine page respectively.
 1.15 13-Sep-2001  chris branches: 1.15.2;
Sprinkle some static and inline into a couple of functions. Remove dead entries from pmap.h.
 1.14 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.13 11-Aug-2001  chris branches: 1.13.2;
Checking a whole host of pmap changes:
Improved locking (not that we actually use it on a uniprocessor, but one day :)
Removed unneeded splvm's
tweaked pmap_clean_page code to only flush the cache if the page is mapped in the current pmap (based on diff from richard E)
Adopted pv entry allocation mechanism from i386.
Laid framework for returning ptp's when we've finished with them rather than holding onto them till the process exits.
ptp's are now allocated with a uvm object for the pmap, means that we can walk a list to free them off in pmap_release, until they get freed off by pmap_remove.

Also implemented a page zeroing function when the processor is idling. Note that hpcarm may wish to disable this.

I believe this code to be stable, if anyone has any problems please shout up.
 1.12 29-Jul-2001  chris Rework the pmap_release code to not have to walk the ptpt, it now uses a uvm_object to track the allocated vm_pages, this means it can free off the entries in the uvm_object.

Testing shows that it's about 5% faster on the make configure step for gmake.
 1.11 28-Jul-2001  chris A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.10 22-Jun-2001  chris branches: 1.10.2;
GC a couple of unused entries in the pmap struct
 1.9 26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.8 26-May-2001  chs replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.
 1.7 22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.6 22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.5 21-Apr-2001  thorpej Update the comment for pmap_update().
 1.4 04-Mar-2001  matt branches: 1.4.2; 1.4.4;
more vm_offset_t/vm_size_t -> {p,v}{addr,size}_t changes
move pmap_* declarations to pmap.h. fix conflicts this
exposed (e.g different definitions for pmap_bootstrap).
 1.3 04-Mar-2001  matt Convert some vm_size_t to vsize_t/psize_t. Change vaddr_t to paddr_t
where appropriate.
 1.2 04-Mar-2001  matt s/vm_offset_t/vaddr_t/g
 1.1 23-Feb-2001  reinoud Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.4.4.3 23-Apr-2001  bouyer Sync with HEAD.
 1.4.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.4.4.1 04-Mar-2001  bouyer file pmap.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.4.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.2.9 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.2.8 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.10.2.7 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.6 16-Mar-2002  jdolecek Catch up with -current.
 1.10.2.5 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.2.4 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.3 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.10.2.1 03-Aug-2001  lukem update to -current
 1.13.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.15.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.16.2.9 11-Dec-2002  thorpej Sync with HEAD.
 1.16.2.8 18-Oct-2002  nathanw Catch up to -current.
 1.16.2.7 27-Aug-2002  thorpej Sync with -current.
 1.16.2.6 13-Aug-2002  nathanw Catch up to -current.
 1.16.2.5 17-Apr-2002  nathanw Catch up to -current.
 1.16.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.16.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.16.2.1 03-Nov-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.53.2.1 30-Aug-2002  gehenna catch up with -current.
 1.75.2.4 11-Dec-2005  christos Sync with head.
 1.75.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.75.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.75.2.1 03-Aug-2004  skrll Sync with HEAD
 1.77.16.4 21-Jan-2008  yamt sync with head
 1.77.16.3 27-Oct-2007  yamt sync with head.
 1.77.16.2 26-Feb-2007  yamt sync with head.
 1.77.16.1 21-Jun-2006  yamt sync with head.
 1.79.30.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.79.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.81.24.5 09-Jan-2008  matt sync with HEAD
 1.81.24.4 09-Nov-2007  matt Add pmap_icache_sync_range and change arm32_sync_icache to use it.
This will only invalidate va that have valid PTEs. This avoids cleaning
unneeded cache lines.
 1.81.24.3 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.81.24.2 06-Nov-2007  matt sync with HEAD
 1.81.24.1 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.81.22.1 01-Jan-2008  chris Sync with HEAD.
 1.81.20.1 02-Oct-2007  joerg Sync with HEAD.
 1.81.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.81.18.1 01-Nov-2007  rjs Sync with HEAD.
 1.81.12.1 03-Oct-2007  garbled Sync with HEAD
 1.81.4.1 09-Oct-2007  ad Sync with head.
 1.83.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.83.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.84.10.6 11-Aug-2010  yamt sync with head.
 1.84.10.5 11-Mar-2010  yamt sync with head
 1.84.10.4 16-Sep-2009  yamt sync with head
 1.84.10.3 19-Aug-2009  yamt sync with head.
 1.84.10.2 04-May-2009  yamt sync with head.
 1.84.10.1 16-May-2008  yamt sync with head.
 1.84.8.1 18-May-2008  yamt sync with head.
 1.84.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.84.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.84.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.85.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.85.6.1 19-Oct-2008  haad Sync with HEAD.
 1.85.4.2 28-Jul-2008  simonb Sync with head.
 1.85.4.1 18-Jul-2008  simonb Sync with head.
 1.85.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.88.10.2 24-Mar-2014  matt Define PMAP_KMPAGE
 1.88.10.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.88.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.94.4.4 21-Apr-2011  rmind sync with head
 1.94.4.3 05-Mar-2011  rmind sync with head
 1.94.4.2 03-Jul-2010  rmind sync with head
 1.94.4.1 16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.94.2.4 15-Nov-2010  uebayasi Sync with HEAD.
 1.94.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.94.2.2 25-Feb-2010  uebayasi A few more VM_PAGE_TO_MD().
 1.94.2.1 10-Feb-2010  uebayasi Missing bits of pmap_is_page_colored_p() conversion.
 1.97.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.97.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.99.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.100.6.1 18-Feb-2012  mrg merge to -current.
 1.100.2.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.100.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.100.2.2 30-Oct-2012  yamt sync with head
 1.100.2.1 17-Apr-2012  yamt sync with head
 1.101.4.2 07-Feb-2013  matt pullup pmap changes from HEAD
 1.101.4.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.111.2.5 03-Dec-2017  jdolecek update from HEAD
 1.111.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.111.2.3 23-Jun-2013  tls resync from head
 1.111.2.2 25-Feb-2013  tls resync with head
 1.111.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.120.2.2 18-May-2014  rmind sync with head
 1.120.2.1 28-Aug-2013  rmind sync with head
 1.130.2.1 10-Aug-2014  tls Rebase.
 1.135.2.3 11-Mar-2017  snj Pull up following revision(s) (requested by skrll in ticket #1366):
sys/arch/arm/include/arm32/pmap.h: 1.145
sys/arch/arm/arm32/pmap.c: 1.343, 1.344
sys/arch/evbarm/gumstix/gumstix_machdep.c: 1.58 via patch
Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and
fix the options for xscale boards which require the code in
pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC.
Fix the typo (pte -> opte) in this code block and consistently use opte
elsewhere.
PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init
--
fix unused.
--
Set xscale_cache_clean_addr appropriately and re-arrange default KVA
layout to allow direct map for all boards.
OVERO/DUOVERO/PEPPER aren't tested.
PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size
 1.135.2.2 27-May-2015  msaitoh branches: 1.135.2.2.4;
Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.135.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.135.2.2.4.1 13-Mar-2017  skrll Sync with netbsd-7-1-RELEASE
 1.137.2.6 28-Aug-2017  skrll Sync with HEAD
 1.137.2.5 05-Oct-2016  skrll Sync with HEAD
 1.137.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.137.2.3 22-Sep-2015  skrll Sync with HEAD
 1.137.2.2 06-Jun-2015  skrll Sync with HEAD
 1.137.2.1 06-Apr-2015  skrll Sync with HEAD
 1.144.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.144.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.154.2.2 20-Oct-2018  pgoyette Sync with head
 1.154.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.155.2.3 21-Apr-2020  martin Sync with HEAD
 1.155.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.155.2.1 10-Jun-2019  christos Sync with HEAD
 1.156.4.1 27-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #742):

sys/arch/arm/arm32/pmap.c: revision 1.388
sys/arch/arm/arm32/armv7_generic_space.c: revision 1.11
sys/arch/arm/arm/cpufunc.c: revision 1.176
sys/arch/arm/conf/Makefile.arm: revision 1.54 (via patch)
sys/arch/arm/include/arm32/pmap.h: revision 1.161

Fix the armv[67] memory attributes for uncached memory. Previously it was
mapped as strongly-ordered which meant that unaligned accesses would fault.
armv7_generic_bs_map now maps pages with PMAP_DEV which is treated as SO
bus_dma continues to use PMAP_NOCACHE as appropriate, but this now get
mapped to the correct memory attribute bits for armv[67]

DEVMAP_ENTRY usees a new flag PTE_DEV.

The workaround for the unaligned access faults is now removed.
XXX Other armv[67] boards bus_space implementations should be checked.
XXX There is scope to reduce the difference to aarch64
 1.157.2.3 29-Feb-2020  ad Sync with head.
 1.157.2.2 25-Jan-2020  ad Sync with head.
 1.157.2.1 17-Jan-2020  ad Sync with head.
 1.166.2.1 20-Apr-2020  bouyer Sync with HEAD
 1.169.6.1 13-May-2021  thorpej Sync with HEAD.
 1.173.4.1 14-Oct-2023  martin Pull up following revision(s) (requested by skrll in ticket #411):

sys/arch/evbarm/nslu2/nslu2_machdep.c: revision 1.41
sys/arch/evbarm/gumstix/gumstix_machdep.c: revision 1.75
sys/arch/evbarm/iq80321/iq80321_machdep.c: revision 1.66
sys/arch/iyonix/iyonix/iyonix_machdep.c: revision 1.34
sys/arch/zaurus/zaurus/machdep.c: revision 1.52
sys/arch/evbarm/g42xxeb/g42xxeb_machdep.c: revision 1.41
sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c: revision 1.33
sys/arch/evbarm/iq80310/iq80310_machdep.c: revision 1.96
sys/arch/evbarm/adi_brh/brh_machdep.c: revision 1.53
sys/arch/arm/include/arm32/pmap.h: revision 1.177
sys/arch/evbarm/viper/viper_machdep.c: revision 1.34
sys/arch/evbarm/iyonix/iyonix_machdep.c: revision 1.5
sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c: revision 1.30
sys/arch/evbarm/hdl_g/hdlg_machdep.c: revision 1.35
sys/arch/arm/arm32/pmap.c: revision 1.440
sys/arch/evbarm/lubbock/lubbock_machdep.c: revision 1.45
sys/arch/evbarm/ixdp425/ixdp425_machdep.c: revision 1.47

Fix non-DIAGNOSTIC builds
 1.21 23-Jan-2016  christos Rename the cpu_id() define to cpu_idnum() so that it does not conflict with
dtrace and friends.
 1.20 04-Feb-2014  matt branches: 1.20.6;
_setsoftintr is long dead. reap any leftovers from arm.
 1.19 27-Jul-2012  matt branches: 1.19.2; 1.19.4;
Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
 1.18 29-Jan-2009  nonaka branches: 1.18.14; 1.18.22;
fix splx() function prototype.
 1.17 11-Jun-2008  rafal branches: 1.17.4; 1.17.12;
Let the shark boot again. Fixes port-shark/38929. While I'm here fix the
splsoft... macros to always raise the IPL (oops!).
 1.16 27-Apr-2008  matt branches: 1.16.2; 1.16.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.15 06-Jan-2008  matt branches: 1.15.6; 1.15.8; 1.15.10;
Cleanup softint lossage.
 1.14 03-Dec-2007  ad branches: 1.14.6;
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.13 17-Oct-2007  garbled branches: 1.13.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.12 08-Aug-2007  tsutsui branches: 1.12.2; 1.12.4;
Remove obsolete spllowersoftclock(9).
 1.11 01-Jul-2007  toshii branches: 1.11.4; 1.11.6; 1.11.8;
Quick and dirty fix for hpcarm build failure, using hpcarm specific
softintr code for now.
 1.10 09-Mar-2007  thorpej branches: 1.10.2; 1.10.4; 1.10.10;
Make ipl_t and ipl_cookie_t 8-bit values. kmutex is now down to 12 bytes
(from 20) on ARM.

Approved by Matt Thomas.
 1.9 18-Feb-2007  matt Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
 1.8 18-Feb-2007  matt Add __HAVE_GENERIC_SOFT_INTERRUPTS support for shark. This was done by
extenting the current arm generic intrs to support softintrs. Add
IPL_SOFTCLOCK, IPL_SOFTNET, IPL_SOFTSERIAL.
 1.7 21-Dec-2006  yamt branches: 1.7.2;
merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.6 16-Jun-2003  thorpej branches: 1.6.18; 1.6.48; 1.6.50;
Rename IPL_IMP -> IPL_VM.
 1.5 27-Oct-2001  rearnsha branches: 1.5.2;
Add new spl level -- _SPL_STATCLOCK.
 1.4 21-Apr-2001  bjh21 branches: 1.4.2; 1.4.6;
Multiple-inclusion protection.
 1.3 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.2 31-Mar-2001  toshii Increase spl_masks[] size by one and set the extra element to 0.
irq_entry accesses here.
 1.1 23-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.4.4 23-Apr-2001  bouyer Sync with HEAD.
 1.1.4.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file psl.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.1.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.4.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.2 27-Oct-2001  rearnsha Add new spl level -- _SPL_STATCLOCK.
 1.5.2.1 27-Oct-2001  rearnsha file psl.h was added on branch nathanw_sa on 2001-10-27 16:37:25 +0000
 1.6.50.3 21-Sep-2006  yamt implement splraiseipl for hpcarm, shark, and acorn32.
 1.6.50.2 21-Sep-2006  yamt revert the previous which was committed unintentionally.
 1.6.50.1 21-Sep-2006  yamt *** empty log message ***
 1.6.48.1 12-Jan-2007  ad Sync with head.
 1.6.18.5 21-Jan-2008  yamt sync with head
 1.6.18.4 07-Dec-2007  yamt sync with head
 1.6.18.3 03-Sep-2007  yamt sync with head.
 1.6.18.2 26-Feb-2007  yamt sync with head.
 1.6.18.1 30-Dec-2006  yamt sync with head.
 1.7.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.7.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.10.10.1 03-Oct-2007  garbled Sync with HEAD
 1.10.4.1 11-Jul-2007  mjf Sync with head.
 1.10.2.3 03-Dec-2007  ad Sync with HEAD.
 1.10.2.2 20-Aug-2007  ad Sync with HEAD.
 1.10.2.1 15-Jul-2007  ad Sync with head.
 1.11.8.2 09-Dec-2007  jmcneill Sync with HEAD.
 1.11.8.1 09-Aug-2007  jmcneill Sync with HEAD.
 1.11.6.4 28-Feb-2008  rjs Sync with HEAD.
 1.11.6.3 26-Dec-2007  rjs Sync with HEAD.
 1.11.6.2 01-Nov-2007  rjs Sync with HEAD.
 1.11.6.1 31-Jul-2007  rjs Don't include softintr.h. Remove _P() usage.
 1.11.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.12.4.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.12.4.1 09-Jan-2008  matt sync with HEAD
 1.12.2.2 20-Jan-2008  chris Sync to HEAD.
 1.12.2.1 01-Jan-2008  chris Sync with HEAD.
 1.13.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.13.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.14.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.15.10.2 04-May-2009  yamt sync with head.
 1.15.10.1 16-May-2008  yamt sync with head.
 1.15.8.2 17-Jun-2008  yamt sync with head.
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.4.1 18-Jun-2008  simonb Sync with head.
 1.16.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.17.4.1 03-Mar-2009  skrll Sync with HEAD.
 1.18.22.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.18.14.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.18.14.1 30-Oct-2012  yamt sync with head
 1.19.4.1 18-May-2014  rmind sync with head
 1.19.2.2 03-Dec-2017  jdolecek update from HEAD
 1.19.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.6.1 19-Mar-2016  skrll Sync with HEAD
 1.23 04-May-2020  joerg Prevent double definition of pt_entry_t from machine/param.h
 1.22 02-Feb-2020  skrll G/C L1_TABLE_SIZE_REAL
 1.21 18-Jan-2020  skrll Use 4K pages on ARM_MMU_EXTENDED platforms (all armv[67] except RPI) by
creating a new pool l1ttpl for the userland L1 translation table which
needs to be 8KB and 8KB aligned.

Limit the pool to maxproc and add hooks to allow the sysctl changing of
maxproc to adjust the pool.

This comes at a 5% performance penalty for build.sh -j8 kernel on a
Tegra TK1.
 1.20 19-Jun-2019  skrll branches: 1.20.4;
Whitespace
 1.19 29-Oct-2014  skrll branches: 1.19.20;
Update a comment to reflect ARM ARMv7
 1.18 08-Aug-2014  skrll Comment whitespace.
 1.17 08-Aug-2014  skrll Spell user with an e.
 1.16 31-Jul-2014  skrll Trailing whitespace
 1.15 26-Feb-2014  matt branches: 1.15.2;
Add XN bit L2 large pages.
 1.14 22-Feb-2014  matt Add L1_TABLE_SIZE_REAL
 1.13 11-Sep-2012  matt branches: 1.13.2; 1.13.4;
Fix the CACHE_MASKs for armv6 to include TEX and S bits.
Fix a comment in pte.h
 1.12 20-Aug-2012  matt Add support for mapping SuperSection on armv6 and armv7. These always
a domain of 0 so move the kernel from domain 15 to domain 0.
 1.11 16-Aug-2012  matt Add L2_S_SEGSIZE which is the number of bytes that a L2 page table will map.
 1.10 10-Mar-2011  bsh branches: 1.10.4; 1.10.10; 1.10.12;
Preliminary ARM11 MPCore support.

I have confirmed this commit doesn't affect existing evbarm kernels by
comparing binaries.
 1.9 16-Jun-2010  jmcneill branches: 1.9.2;
PR port-arm/43299: Support added for igepv2/cortexa8/omap3530

Apply patch from PR, with build fixes. ok skrll, matt
 1.8 27-Apr-2008  matt branches: 1.8.18; 1.8.20; 1.8.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.7 21-May-2003  thorpej branches: 1.7.82; 1.7.106; 1.7.108; 1.7.110;
Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.6 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.5 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.4 04-Apr-2002  thorpej Rename flags that are really part of the pv_entry/mdpage into
pmap.h and give them more descriptive names and better comments:
* PT_M -> PVF_MOD (page is modified)
* PT_H -> PVF_REF (page is referenced)
* PT_W -> PVF_WIRED (mapping is wired)
* PT_Wr -> PVF_WRITE (mapping is writable)
* PT_NC -> PVF_NC (mapping is non-cacheable; multiple mappings)
 1.3 03-Apr-2002  reinoud In analogy to L2_LPAGE_SIZE add L2_SPAGE_SIZE ....
 1.2 02-Mar-2002  chris Update the types, pt_entry and pd_entry should be unsigned, and fixed at 32 bits.
 1.1 23-Nov-2001  thorpej branches: 1.1.2; 1.1.4;
- Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.1.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 23-Nov-2001  thorpej file pte.h was added on branch kqueue on 2002-01-10 19:37:56 +0000
 1.1.2.4 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 23-Nov-2001  nathanw file pte.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.7.110.2 11-Aug-2010  yamt sync with head.
 1.7.110.1 16-May-2008  yamt sync with head.
 1.7.108.1 18-May-2008  yamt sync with head.
 1.7.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.82.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.7.82.1 28-Aug-2007  matt Add ArmV6 pte/pde extensions.
 1.8.22.2 21-Apr-2011  rmind sync with head
 1.8.22.1 03-Jul-2010  rmind sync with head
 1.8.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.9.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.10.10.1 08-Feb-2013  riz sys/arch/arm/include/arm32/pte.h 1.11
sys/arch/evbarm/marvell/marvell_machdep.c 1.19 via patch

Switch to ARM_VECTORS_HIGH for Sheeva CPU.
[msaitoh, ticket #785]
 1.10.4.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.10.4.1 30-Oct-2012  yamt sync with head
 1.13.4.1 18-May-2014  rmind sync with head
 1.13.2.2 03-Dec-2017  jdolecek update from HEAD
 1.13.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.2.1 10-Aug-2014  tls Rebase.
 1.19.20.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.20.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20.4.2 29-Feb-2020  ad Sync with head.
 1.20.4.1 25-Jan-2020  ad Sync with head.
 1.2 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.136; 1.1.144; 1.1.150;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.150.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.144.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.136.1 04-May-2009  yamt sync with head.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file rtc.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.2 14-Jul-2001  matt branches: 1.2.6;
Make <sysarch.h> valid for all arm platforms. Adjust/remove port-specific
includes as required.
 1.1 23-Feb-2001  reinoud branches: 1.1.4; 1.1.6;
Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file sysarch.h was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.2.6.2 14-Jul-2001  matt Make <sysarch.h> valid for all arm platforms. Adjust/remove port-specific
includes as required.
 1.2.6.1 14-Jul-2001  matt file sysarch.h was added on branch nathanw_sa on 2001-07-14 00:23:11 +0000
 1.13 11-Feb-2020  skrll G/C
 1.12 24-Jan-2018  skrll branches: 1.12.4; 1.12.10;
Remove port-acorn26

OK core@
 1.11 07-May-2013  matt Move #define __HAVE_OLD_DISKLABEL to <arm/types.h>
 1.10 07-May-2013  matt Make all ports use a common disklabel.h with MAXPARTITIONS set to 16.
Only RAW_PART varies between ports.
 1.9 07-Jul-2010  chs implement cpu_lwp_setprivate() on several platforms.
 1.8 21-May-2003  thorpej branches: 1.8.110; 1.8.130; 1.8.132;
Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.7 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.6 15-Oct-2002  bjh21 Switch to using the MI C versions of setrunqueue() and remrunqueue().
GCC produces almost exactly the same instructions as the hand-assembled
versions, albeit in a different order. It even found one place where it
could shave one off. Its insistence on creating a stack frame might slow
things down marginally, but not, I think, enough to matter.
 1.5 07-Oct-2002  thorpej Add support for restartable atomic sequences on 26-bit ARM. Compile
tested only.

Now that all ARM systems have RAS, move __HAVE_RAS from arm/arm32/types.h
to arm/types.h.
 1.4 22-Sep-2002  simonb Only need to define __HAVE_MD_RUNQUEUE once here...
 1.3 22-Sep-2002  gmcgarry Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives.
 1.2 31-Aug-2002  thorpej Add machine-dependent bits of RAS for arm32.
 1.1 22-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.12;
Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>. Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate. Change all references to PROG26
and PROG32 to __PROG26 and __PROG32. Eliminate the opt_progmode.h
header file.
 1.1.12.1 31-Aug-2002  gehenna catch up with -current.
 1.1.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 22-Nov-2001  thorpej file types.h was added on branch kqueue on 2002-01-10 19:37:56 +0000
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 22-Nov-2001  nathanw file types.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.8.132.1 05-Mar-2011  rmind sync with head
 1.8.130.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.110.1 11-Aug-2010  yamt sync with head.
 1.12.10.1 29-Feb-2020  ad Sync with head.
 1.12.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 15-Feb-2014  matt branches: 1.1.2;
file vmpagemd.h was initially added on branch matt-nb5-mips64.
 1.1.2.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.58 07-Sep-2024  andvar spelling and grammar fixes, mainly in comments.
 1.57 16-Apr-2023  skrll branches: 1.57.6;
Rename VM_KERNEL_IO_ADDRESS to VM_KERNEL_IO_BASE to match RISC-V

It's less letters, matches other similar variables and will help with
sharing code between the two architectures.

NFCI.
 1.56 08-Oct-2020  he Bump MAXDSIZ from 1536 to 1836.
1836 is 2048-128(MAXTSIZ)-64(MAXSSIZ).
Gives us a fighting chance to build rust natively.
OK'ed by skrll@
 1.55 29-Aug-2020  skrll Cover the full kernel address range in KASAN
 1.54 11-Jul-2020  skrll Fix ARM builds
 1.53 10-Jul-2020  skrll Remove stray #else / #endif block in KASAN support commit
 1.52 10-Jul-2020  skrll Oops... deal with a last minute #define name change. KASAN support now
builds.
 1.51 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.50 10-Jul-2020  skrll Do previous differently for now
 1.49 08-Jul-2020  skrll Provide some KVA layout #defines in arm32/vmparam.h and simplify
fdt/platform.h as a nice side effect
 1.48 08-Jul-2020  skrll Remove an unnecessary #ifdef
 1.47 13-Jan-2020  christos Revert previous; we don't want arm to have variable page size. Instead
nick@ is fixing the cache pages issue to use a separate pool.
 1.46 11-Jan-2020  christos Define the min and max page size supported for the benefit of jemalloc
 1.45 19-Jun-2019  skrll branches: 1.45.2; 1.45.4;
Update a comment
 1.44 30-Mar-2019  christos Need to include <sys/cdefs.h> so that the _ARM_CPU* macros get defined
so that we always select the correct page size (8K for armv6+).
 1.43 27-Mar-2019  christos - expose vmparams to userland on arm, like other archs do.
- remove unneeded includes
 1.42 27-Oct-2018  skrll Trailing whitespace
 1.41 13-Feb-2017  skrll branches: 1.41.12; 1.41.14;
G/C VM_MAX_KERNEL_BUF
 1.40 18-Oct-2015  jmcneill branches: 1.40.2; 1.40.4;
pull in arm/arm32/param.h
 1.39 20-Jun-2015  skrll __USE_TOPDOWN_VM

Fixes PR/49974: mmap(2) of large anonymous regions is broken

"go for it" from matt@
 1.38 02-Jun-2015  matt Back off MAXDSIZ to 1.5GB to avoid some virtual memory exhausted messages.
 1.37 28-May-2015  matt ARM systems are no longer small, increase MAXTSIZ/MAXDSIZ/MAXSSIZ.
 1.36 24-Feb-2015  joerg Restore PAGER_MAP_DEFAULT_SIZE for ARMv4, they typically have only 256MB
KVA.
 1.35 27-Jul-2014  skrll branches: 1.35.4;
More fixes as a step towards ARM_MMU_EXTENDED on RPI.

- don't set CPU_CONTROL_SYST_ENABLE in arm11x6_setup for ARM_MMU_EXTENDED

- Use the new MMU defines for V6N

- pull in arm/cpuconf.h in vmparam s that VM_MAXUSER_ADDRESS gets set
correctly.
 1.34 31-Mar-2014  matt branches: 1.34.2;
For ARM_MMU_EXTENDED, a KERNEL_BASE >= 0x80000000 is ok but a
VM_USER_MAXADDRESS can not be more than 0x80000000 - PAGE_SIZE.
 1.33 26-Feb-2014  martin Revert previous - will fix userland with new sysctls for VM_MIN_ADDRESS/
VM_MAXADDESS.
 1.32 26-Feb-2014  martin Include param.h here - userland expects VM_* defines to work with just
this include, but PAGE_SIZE relies on PGSHIFT now, which is not defined
here.

Matt: please rearrange/cleanup differently if you prefer (but test build
src/tests/lib/libc/sys/t_mlock for example.)
 1.31 26-Feb-2014  matt Use PAGE_SIZE instead of 1000
 1.30 21-Feb-2014  skrll Remove unnecessary include of sys/simplelock.h
 1.29 27-Feb-2013  matt branches: 1.29.6;
Define PAGESHIFT using PGSHIFT
 1.28 25-Feb-2013  matt Bump max text/data/stack sizes to more reasonable values.
 1.27 16-Aug-2012  matt branches: 1.27.2;
Tweak max addresses a bit so that [r1, #off] can't overflow them.
 1.26 16-Feb-2012  christos expose stuff that crash needs to kmemuser
 1.25 14-Nov-2010  uebayasi branches: 1.25.8; 1.25.12; 1.25.16;
Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap. vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
 1.24 06-Mar-2009  joerg branches: 1.24.2; 1.24.4;
Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
 1.23 06-Aug-2008  matt branches: 1.23.2; 1.23.8; 1.23.12;
Change pv_entries to use SLIST.

For VIPT caches, keep track of when pages are dirty so that their content
can be flushed back to main memory. This is done when the page is
read-only mapped by more than 1 color. Pages become when either their
modified bit gets set or an unmanaged writeable page is mapped. When
a page in unmapped or changed to read-only, run pmap_vac_me_harder in
case the page can be mapped read-only.

Thanks are given to Imre Deak for giving me the idea to assert for PVF_DIRTY.
 1.22 27-Apr-2008  matt branches: 1.22.2; 1.22.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.21 04-Jan-2008  ad branches: 1.21.6; 1.21.8; 1.21.10;
Header cleanup.
 1.20 06-Jan-2007  christos branches: 1.20.20; 1.20.24; 1.20.26; 1.20.32; 1.20.38;
From Scott Alan in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html

This one is really simple. I wanted to use KERNEL_BASE in an assembly source,
but arch/arm/include/arm32/vmparam.h wasn't protected by #ifndef
__ASSEMBLER__. The patch adds the protection.
 1.19 22-May-2003  thorpej branches: 1.19.18; 1.19.48; 1.19.54;
Use virtual_avail and virtual_end to compute the size of the available
kernel VM space for VM_MAX_KERNEL_BUF, and move the definition into
generic ARM code.
 1.18 21-May-2003  thorpej Remove #ifdefs supporting the old pmap, switching fully to the new.
 1.17 04-May-2003  thorpej VM_{MIN,MAX}* are now the same for ARM32_PMAP_NEW with both new and
old VM layout, so merge the two cases.
 1.16 03-May-2003  thorpej Don't expose KERNEL_TEXT_BASE outside of board-specific code. This gives
individual board start-up code more flexibility about where the kernel
starts in the kernel address space.
 1.15 02-May-2003  thorpej Don't need to reserve a page of space before KERNEL_BASE in the
ARM32_NEW_VM_LAYOUT case.
 1.14 02-May-2003  thorpej Eliminate PTE_BASE and the PT-PT completely in the ARM32_PMAP_NEW case.
Also in the ARM32_PMAP_NEW case, reclaim the USPACE-bytes of wasted space
at the top of the user address that hasn't been needed for a very very
long time.
 1.13 18-Apr-2003  scw Add the generic arm32 bits of the new pmap, contributed by Wasabi Systems.

Some features of the new pmap are:

- It allows L1 descriptor tables to be shared efficiently between
multiple processes. A typical "maxusers 32" kernel, where NPROC is set
to 532, requires 35 L1s. A "maxusers 2" kernel runs quite happily
with just 4 L1s. This completely solves the problem of running out
of contiguous physical memory for allocating new L1s at runtime on a
busy system.

- Much improved cache/TLB management "smarts". This change ripples
out to encompass the low-level context switch code, which is also
much smarter about when to flush the cache/TLB, and when not to.

- Faster allocation of L2 page tables and associated metadata thanks,
in part, to the pool_cache enhancements recently contributed to
NetBSD by Wasabi Systems.

- Faster VM space teardown due to accurate referenced tracking of L2
page tables.

- Better/faster cache-alias tracking.

The new pmap is enabled by adding options ARM32_PMAP_NEW to the kernel
config file, and making the necessary changes to the port-specific
initarm() function. Several ports have already been converted and will
be committed shortly.
 1.12 02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.11 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.10 09-Aug-2002  thorpej Add some code, conditional on PMAP_ALIAS_DEBUG, that can be used to
hunt for virtual aliases between managed (pmap_enter) and non-managed
(pmap_kenter_pa) mappings.
 1.9 23-Mar-2002  thorpej branches: 1.9.2; 1.9.4;
KERNEL_SPACE_START -> KERNEL_BASE
 1.8 23-Mar-2002  thorpej * Rename PROCESS_PAGE_TBLS_BASE -> PTE_BASE
* Rename ALT_PAGE_TBLS_BASE -> APTE_BASE
* Garbage-collect PAGE_TABLE_SPACE_START
 1.7 05-Mar-2002  thorpej Switch back to using vm_page_md (thanks chuq for finding the bug
in the code that made it unstable before!)
 1.6 03-Mar-2002  chris Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
 1.5 06-Feb-2002  thorpej Back out all the vm_page_md changes. They are causing some
mysterious problems (a similar change to the i386 pmap causes
mysterious problems there, as well), and the issue needs to
be investigated more.
 1.4 05-Feb-2002  thorpej Use vm_page_md rather than pmap_physseg. Saves lots of cycles in
common operations.
 1.3 23-Nov-2001  thorpej branches: 1.3.2;
Move even more constants into the shared 32-bit vmparam.h header.
Cleanup elsewhere will have to be done before we can sanitize this
header any further.
 1.2 23-Nov-2001  thorpej - Move more contents of various <machine/vmparam.h> files into
<arm/arm32/vmparam.h> (mostly the stuff that's tied to the pmap
implementation).
- Since the MMU definitions in pte.h are specific to ARM processors
that support 32-bit mode, move pte.h to <arm/arm32/pte.h>.
- Make the Netwinder startup file build again (use PT_B|PT_C, rather
than PT_CACHEABLE, since the latter expands to a variable these days).
 1.1 11-Nov-2001  thorpej branches: 1.1.2; 1.1.4;
Even though the ARM architecture defines large, standard, and small
pages, we use the standard (4K) page size as PAGE_SIZE. Make the
PAGE_SIZE related variables compile-time constants that reflect this.

Results in a bit over 2K worth of .text savings, and visibly better
code in the places that use PAGE_SIZE, etc.
 1.1.4.6 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.5 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 11-Nov-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:23:12 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 11-Nov-2001  thorpej file vmparam.h was added on branch thorpej-mips-cache on 2001-11-12 21:16:33 +0000
 1.3.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.3.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 23-Nov-2001  thorpej file vmparam.h was added on branch kqueue on 2002-01-10 19:37:57 +0000
 1.9.4.1 07-Dec-2002  he Pull up revision 1.10 (requested by thorpej in ticket #714):
Add code, conditional on PMAP_ALIAS_DEBUG, which can be
used to hunt for virtual aliases between managed (pmap_enter)
and unmanaged (pmap_kenter_pa) mappings.
 1.9.2.1 30-Aug-2002  gehenna catch up with -current.
 1.19.54.1 21-Feb-2007  snj branches: 1.19.54.1.4;
Pull up following revision(s) (requested by matt in ticket #457):
sys/arch/arm/include/arm32/vmparam.h: revision 1.20
From Scott Allan in http://mail-index.netbsd.org/port-arm/2006/07/26/0000.html
This one is really simple. I wanted to use KERNEL_BASE in an
assembly source, but arch/arm/include/arm32/vmparam.h wasn't
protected by #ifndef __ASSEMBLER__. The patch adds the protection.
 1.19.54.1.4.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.19.48.1 12-Jan-2007  ad Sync with head.
 1.19.18.2 21-Jan-2008  yamt sync with head
 1.19.18.1 26-Feb-2007  yamt sync with head.
 1.20.38.1 08-Jan-2008  bouyer Sync with HEAD
 1.20.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.26.2 09-Jan-2008  matt sync with HEAD
 1.20.26.1 12-Oct-2007  matt Import TI OMAP 2430 and ARM11/ARMv6 support. Now on ARMv6, the cache is
no longer purged on context switches.
 1.20.24.1 20-Jan-2008  chris Sync to HEAD.
 1.20.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.21.10.2 04-May-2009  yamt sync with head.
 1.21.10.1 16-May-2008  yamt sync with head.
 1.21.8.1 18-May-2008  yamt sync with head.
 1.21.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.21.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.6.1 19-Oct-2008  haad Sync with HEAD.
 1.22.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.23.12.2 24-Mar-2014  matt Deal with those arms who only need one type of freelist.
 1.23.12.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.23.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.2.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.4.1 05-Mar-2011  rmind sync with head
 1.24.2.3 15-Nov-2010  uebayasi Sync with HEAD.
 1.24.2.2 23-Feb-2010  uebayasi Pass struct vm_page_md * to VM_MDPAGE_INIT(), not struct vm_page *.
 1.24.2.1 09-Feb-2010  uebayasi Kill vm_page::phys_addr.
 1.25.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.25.12.1 18-Feb-2012  mrg merge to -current.
 1.25.8.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.25.8.2 30-Oct-2012  yamt sync with head
 1.25.8.1 17-Apr-2012  yamt sync with head
 1.27.2.3 03-Dec-2017  jdolecek update from HEAD
 1.27.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.2.1 23-Jun-2013  tls resync from head
 1.29.6.1 18-May-2014  rmind sync with head
 1.34.2.1 10-Aug-2014  tls Rebase.
 1.35.4.5 28-Aug-2017  skrll Sync with HEAD
 1.35.4.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.35.4.3 22-Sep-2015  skrll Sync with HEAD
 1.35.4.2 06-Jun-2015  skrll Sync with HEAD
 1.35.4.1 06-Apr-2015  skrll Sync with HEAD
 1.40.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.40.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.41.14.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.41.14.1 10-Jun-2019  christos Sync with HEAD
 1.41.12.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.45.4.1 17-Jan-2020  ad Sync with head.
 1.45.2.1 08-Oct-2020  martin Pull up following revision(s) (requested by he in ticket #1105):

sys/arch/arm/include/arm32/vmparam.h: revision 1.56

Bump MAXDSIZ from 1536 to 1836.
1836 is 2048-128(MAXTSIZ)-64(MAXSSIZ).

Gives us a fighting chance to build rust natively.

OK'ed by skrll@
 1.57.6.1 02-Aug-2025  perseant Sync with HEAD
 1.1 01-May-2013  matt branches: 1.1.4; 1.1.12;
Pickup fenv.h from a common location since it's only used from userland
and the kernel will never include it.
 1.1.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.12.1 01-May-2013  yamt file fenv.h was added on branch yamt-pagecache on 2014-05-22 11:39:33 +0000
 1.1.4.2 23-Jun-2013  tls resync from head
 1.1.4.1 01-May-2013  tls file fenv.h was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.3 17-Aug-2006  bjh21 There's no need to expose arm/iomd/vidc.h to userland any more, since
<machine/vconsole.h> has gone now.
 1.2 26-Nov-2002  lukem branches: 1.2.22; 1.2.36; 1.2.40;
Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.1 17-Dec-2001  bjh21 branches: 1.1.2; 1.1.4;
Ensure that vidc.h gets installed somewhere -- Xarm32vidc needs it to compile.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 17-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 19:37:57 +0000
 1.1.2.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 17-Dec-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:23:13 +0000
 1.2.40.1 03-Sep-2006  yamt sync with head.
 1.2.36.1 09-Sep-2006  rpaulo sync with head
 1.2.22.1 30-Dec-2006  yamt sync with head.
 1.23 25-Jan-2004  bjh21 Remove the "beep" driver. Its function is largely subsumed by a
combination of audio(4), wskbd(4) and audiobell(). Proposed a week
ago on port-acorn32 with no reaction whatever.
 1.22 17-Jan-2004  bjh21 Adjust vt(4) (WHICH MUST DIE) to the new way of handling bells on
NetBSD/acorn32.
 1.21 17-Jan-2004  bjh21 Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.20 17-Jan-2004  bjh21 More light KNF.
 1.19 17-Jan-2004  bjh21 Light KNF.
 1.18 03-May-2003  wiz branches: 1.18.2;
DMA, not dma nor Dma.
 1.17 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.16 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.15 02-Oct-2002  thorpej branches: 1.15.2;
Add trailing ; to CFATTACH_DECL
 1.14 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.13 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.11 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.10 16-Jun-2002  bjh21 Un-__P, ANSIfy and light KNF.
 1.9 16-Jun-2002  bjh21 sc_iobase wasn't used, except to initialiase it at attach time. Kill it.
Hence remove all uses of "aux".
 1.8 10-Apr-2002  thorpej branches: 1.8.2;
vm_offset_t -> vaddr_t,paddr_t
 1.7 04-Apr-2002  thorpej Don't need to mask w/ PG_FRAME.
 1.6 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.5 18-Feb-2002  bjh21 Include <arch/arm/iomd/beepvar.h> for beep_generate() prototype.
Include <machine/conf.h> for cdevsw function prototypes.
Correct argument types of beepioctl().
Add in-core RCSID.
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.9 11-Nov-2002  nathanw Catch up to -current
 1.2.4.8 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.7 17-Sep-2002  nathanw Catch up to -current.
 1.2.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file beep.c was added on branch nathanw_sa on 2002-01-08 00:23:13 +0000
 1.4.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file beep.c was added on branch kqueue on 2002-01-10 19:37:58 +0000
 1.8.2.2 14-Jul-2002  gehenna catch up with -current.
 1.8.2.1 17-May-2002  gehenna Add device switch.
 1.15.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.18.2.2 03-Aug-2004  skrll Sync with HEAD
 1.18.2.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.2 25-Jan-2004  bjh21 Remove the "beep" driver. Its function is largely subsumed by a
combination of audio(4), wskbd(4) and audiobell(). Proposed a week
ago on port-acorn32 with no reaction whatever.
 1.1 18-Feb-2002  bjh21 branches: 1.1.2; 1.1.8; 1.1.22;
Add beepvar.h, to hold a prototype for beep_generate().
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 18-Feb-2002  jdolecek file beepvar.h was added on branch kqueue on 2002-03-16 15:56:10 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 18-Feb-2002  nathanw file beepvar.h was added on branch nathanw_sa on 2002-02-28 04:07:35 +0000
 1.20 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.19 29-Feb-2008  chris branches: 1.19.92; 1.19.94;
Misc updates to hopefully improve vidcvideo console usability:
* add virtual consoles by using wsdisplay_vcons
* make use of generic scrollback support for consoles
* enable colour support for vidcvideo consoles
* use the default NetBSD font, rather than picking a sony one
* make kernel output green, so it's obvious.

This was tested at 800x600 in 8bpp on an A7000+ and 2MB VRAM RiscPC.

To actually benefit from these changes wscons=YES needs to be added to
your rc.conf
 1.18 19-Aug-2006  bjh21 branches: 1.18.32; 1.18.34; 1.18.54; 1.18.58;
Arrange things so that if MONITOR isn't defined in the kernel configration,
we use the standard mode list from videomode.c rather than one generated
by makemodes.awk. This is less useful than it might be since without a useful
frame rate from the bootloader we're likely to end up choosing a screen mode
that's either flickery or too fast for the monitor (or DRAM bandwidth).
 1.17 14-Aug-2006  bjh21 Nothing in the tree uses NVIDCAUDIO or NVIDC, so stop generating them.
 1.16 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.8;
merge ktrace-lwp.
 1.14 10-Jan-2005  kent branches: 1.14.10;
merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.13 13-Mar-2004  bjh21 branches: 1.13.4;
Rename arch/acorn32/dev/wskbdmap_mfii.c to arch/acorn32/dev/wskbdmap_mfii_rpc.c
to avoid config(8) confusion with dev/pckbport/wskbdmap_mfii.c.
 1.12 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.11 13-Mar-2004  bjh21 Remove pointless comments
 1.10 13-Mar-2004  bjh21 Add support for using the MI pckbd and pms drivers with the IOMD keyboard
and mouse ports, with a new driver, iomdkbc(4).
 1.9 25-Jan-2004  bjh21 Remove another mention of "beep".
 1.8 25-Jan-2004  bjh21 Remove mentions of "beep" driver.
 1.7 17-Jan-2004  bjh21 Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.6 03-Jan-2004  chris Add conf framework support for riscstation. Add a rsbus as this allows
acccesses with addresses shifted by the amount specified in the cookie.

Also make the inclusion of the wscons file the resposibility of whoever
includes files.iomd. (found while attempting to checking riscstation
support into evbarm)
 1.5 01-Jan-2004  bjh21 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days. Let the CVS history be its only memorial.
 1.4 31-Dec-2003  bjh21 vidcaudio(4) now needs mulaw and aurateconv.
 1.3 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.2 16-Jun-2002  bjh21 branches: 1.2.2; 1.2.4; 1.2.6; 1.2.14;
None of the children of vidc now use their aux pointer, so there's no need
to set it, and vidcprint isn't needed to print it. G/C all that code, and
most of the rest of vidcsearch too.
This also means that the locators on vidc's children are unused, so G/C them
as well.
 1.1 16-Jun-2002  bjh21 Pull out config(8) input for arch/arm/iomd code into files.iomd, since that's
clearly where it belongs. Normalise the whitespace in the moved text.
 1.2.14.4 17-Jan-2005  skrll Sync with HEAD.
 1.2.14.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.14.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.14.1 03-Aug-2004  skrll Sync with HEAD
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 16-Jun-2002  jdolecek file files.iomd was added on branch kqueue on 2002-09-06 08:32:42 +0000
 1.2.4.2 14-Jul-2002  gehenna catch up with -current.
 1.2.4.1 16-Jun-2002  gehenna file files.iomd was added on branch gehenna-devsw on 2002-07-14 17:45:55 +0000
 1.2.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.1 16-Jun-2002  nathanw file files.iomd was added on branch nathanw_sa on 2002-06-20 03:38:10 +0000
 1.13.4.1 03-Jan-2005  kent adopt the filter pipeline framework
 1.14.10.2 17-Mar-2008  yamt sync with head.
 1.14.10.1 30-Dec-2006  yamt sync with head.
 1.15.8.1 03-Sep-2006  yamt sync with head.
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.18.58.1 03-Apr-2008  mjf Sync with HEAD.
 1.18.54.1 24-Mar-2008  keiichi sync with head.
 1.18.34.1 23-Mar-2008  matt sync with HEAD
 1.18.32.2 21-Mar-2008  chris Sync with head.
 1.18.32.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.19.94.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.19.92.1 10-Jun-2019  christos Sync with HEAD
 1.9 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 01-Jan-2003  thorpej branches: 1.7.2;
Use aprint_normal() for cfprint routines.
 1.6 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.5 27-Sep-2002  thorpej branches: 1.5.2;
Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 18-Feb-2002  bjh21 branches: 1.3.8;
Pull in <machine/conf.h> to get prototypes for cdevsw functions, and correct
the signature of iicioctl() appropriately.
 1.2 23-Nov-2001  thorpej branches: 1.2.2;
Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.7 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.6 11-Nov-2002  nathanw Catch up to -current
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iic.c was added on branch nathanw_sa on 2002-01-08 00:23:13 +0000
 1.2.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 23-Nov-2001  thorpej file iic.c was added on branch kqueue on 2002-01-10 19:37:59 +0000
 1.3.8.1 17-May-2002  gehenna Add device switch.
 1.5.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.7.2.2 03-Aug-2004  skrll Sync with HEAD
 1.7.2.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.2 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iic.h was added on branch kqueue on 2002-01-10 19:37:59 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file iic.h was added on branch nathanw_sa on 2001-10-05 22:27:41 +0000
 1.7 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.8;
Add trailing ; to CFATTACH_DECL
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iic_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:13 +0000
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file iic_iomd.c was added on branch kqueue on 2002-01-10 19:37:59 +0000
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2 05-Aug-2006  bjh21 This file seems to be unused, left behind by the last I^2C overhaul.
Remove it.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.40; 1.1.54; 1.1.58;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.58.1 11-Aug-2006  yamt sync with head
 1.1.54.1 09-Sep-2006  rpaulo sync with head
 1.1.40.1 30-Dec-2006  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iicvar.h was added on branch kqueue on 2002-01-10 19:38:00 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file iicvar.h was added on branch nathanw_sa on 2001-10-05 22:27:41 +0000
 1.24 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.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.21 10-Oct-2012  skrll branches: 1.21.52;
Use device_xname.

From chuq.
 1.20 14-May-2012  skrll branches: 1.20.2;
Whitespace in previous.
 1.19 14-May-2012  skrll device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.18 10-May-2012  skrll u_int*_t -> uint*_t
 1.17 01-Jul-2011  dyoung branches: 1.17.2; 1.17.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.16 30-Jun-2011  wiz dependant -> dependent
 1.15 05-Aug-2006  bjh21 ANSIfy, un-__P, and generally KNF.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8;
merge ktrace-lwp.
 1.13 08-Feb-2004  bjh21 branches: 1.13.16;
Attach rpckbd(4) and kbd(4) in the same place, so that only one of them can
attach at a time, and so that either of them can prevent the forthcoming
iomdkbd(4) attaching to the keyboard slot.
 1.12 06-Dec-2003  bjh21 Undo last change: The "iomd" driver has its own bus_space tag, so it didn't
rely on the brokenness of the mainbus one.
 1.11 06-Dec-2003  bjh21 Fix the ARM mainbus version of bus_space_subregion() to correctly shift the
base offset before using it. This makes it work the same as every other
implementation, and makes wdc at pioc on acorn32 work again. Fix the only
caller I found which depended on the old behaviour.
 1.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 13-Oct-2002  bjh21 branches: 1.9.8;
Rework (#ifdef'ed out) code to print I/O timings so as to give more
information (I was curious).
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4 19-Jun-2002  bjh21 More wsqms cleanups:
sc_flags was never read. G/C it.
wsqms_attach() took two arguments that pointed to the same structure. G/C one
of them
Since wsqms controls the same device as qms, have it match the same attach
args.
 1.3 19-Apr-2002  wiz branches: 1.3.2;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.2.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file iomd.c was added on branch kqueue on 2002-01-10 19:38:01 +0000
 1.3.2.1 16-Jul-2002  gehenna catch up with -current.
 1.9.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.8.1 03-Aug-2004  skrll Sync with HEAD
 1.13.16.1 30-Dec-2006  yamt sync with head.
 1.14.8.1 11-Aug-2006  yamt sync with head
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.17.6.1 02-Jun-2012  mrg sync to latest -current.
 1.17.2.2 30-Oct-2012  yamt sync with head
 1.17.2.1 23-May-2012  yamt sync with head.
 1.20.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.52.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.30 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.29 18-May-2012  skrll Replace a __cpu_simple_lock_t with a kmutex_t.
 1.28 15-May-2012  skrll Typos in a comment.
 1.27 14-May-2012  skrll device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.26 18-Feb-2012  rmind Replace few simple_lock(9) cases.
 1.25 17-Jan-2009  mjf branches: 1.25.14; 1.25.18;
Fix printf format for suseconds_t
 1.24 08-Jan-2008  matt branches: 1.24.10; 1.24.18;
As of this commit, all arm32 kernel now build.
 1.23 05-Jan-2008  ad Fix includes.
 1.22 22-Feb-2007  thorpej branches: 1.22.18; 1.22.22; 1.22.24; 1.22.30; 1.22.36;
TRUE -> true, FALSE -> false
 1.21 03-Sep-2006  bjh21 branches: 1.21.8;
Switch acorn32 to MI inittodr() etc.
 1.20 05-Aug-2006  bjh21 ANSIfy, un-__P, light KNF.
 1.19 03-Aug-2006  bjh21 Support for timecounters on acorn32, supplied by Mike Pumford. Only
compile-tested by me, but he promises it works.
 1.18 25-Jun-2006  christos GCC4 fixes from Mike Pumford
 1.17 11-Dec-2005  christos branches: 1.17.4; 1.17.8; 1.17.16;
merge ktrace-lwp.
 1.16 19-Aug-2005  skrll Fix RCSID.
 1.15 04-Jun-2005  he branches: 1.15.2;
Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.14 04-Jun-2005  chris Fixes for -Wshadow and -Wcast-qual
 1.13 26-Feb-2005  simonb Watch out for those unexpected tains.
 1.12 06-Oct-2003  thorpej branches: 1.12.8; 1.12.10;
New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.11 14-Jul-2003  lukem use __KERNEL_RCSID(0, instead of RCSID( in the kernel
 1.10 02-Oct-2002  thorpej branches: 1.10.8;
Add trailing ; to CFATTACH_DECL
 1.9 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 02-May-2002  mycroft Fix off-by-one error in delay().
 1.5 18-Feb-2002  bjh21 Add prototypes for clockhandler() and statclockhandler(), and adjust their
argument types to match other interrupt handlers.
Also minor KNF (add in-core RCSID).
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file iomd_clock.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.4.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file iomd_clock.c was added on branch kqueue on 2002-01-10 19:38:01 +0000
 1.10.8.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.8.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.8.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.15.2.4 21-Jan-2008  yamt sync with head
 1.15.2.3 26-Feb-2007  yamt sync with head.
 1.15.2.2 30-Dec-2006  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.8.3 14-Sep-2006  yamt sync with head.
 1.17.8.2 11-Aug-2006  yamt sync with head
 1.17.8.1 26-Jun-2006  yamt sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.21.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.22.36.1 08-Jan-2008  bouyer Sync with HEAD
 1.22.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.22.24.1 09-Jan-2008  matt sync with HEAD
 1.22.22.1 20-Jan-2008  chris Sync to HEAD.
 1.22.18.1 28-Feb-2008  rjs Sync with HEAD.
 1.24.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.24.10.1 04-May-2009  yamt sync with head.
 1.25.18.2 02-Jun-2012  mrg sync to latest -current.
 1.25.18.1 24-Feb-2012  mrg sync to -current.
 1.25.14.2 23-May-2012  yamt sync with head.
 1.25.14.1 17-Apr-2012  yamt sync with head
 1.10 05-Aug-2006  bjh21 branches: 1.10.34;
ANSIfy, un-__P, and generally KNF.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.8;
merge ktrace-lwp.
 1.8 15-Jul-2003  lukem branches: 1.8.16;
__KERNEL_RCSID()
 1.7 01-Apr-2003  thorpej branches: 1.7.2;
Use PAGE_SIZE rather than NBPG.
 1.6 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.5 10-Apr-2002  thorpej vm_offset_t -> vaddr_t,paddr_t
 1.4 18-Feb-2002  bjh21 Change signature of dma_intr() to match other interrupt handlers.
 1.3 25-Jan-2002  thorpej Overhaul of the ARM cache code. This is mostly a simplification
pass. Rather than providing a whole slew of cache operations that
aren't ever used, distill them down to some useful primitives:

icache_sync_all Synchronize I-cache
icache_sync_range Synchronize I-cache range

dcache_wbinv_all Write-back and Invalidate D-cache
dcache_wbinv_range Write-back and Invalidate D-cache range
dcache_inv_range Invalidate D-cache range
dcache_wb_range Write-back D-cache range

idcache_wbinv_all Write-back and Invalidate D-cache,
Invalidate I-cache
idcache_wbinv_range Write-back and Invalidate D-cache,
Invalidate I-cache range

Note: This does not yet include an overhaul of the actual asm files
that implement the primitives. Instead, we've provided a safe default
for each CPU type, and the individual CPU types can now be optimized
one at a time.
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_dma.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.2.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file iomd_dma.c was added on branch kqueue on 2002-01-10 19:38:02 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 30-Dec-2006  yamt sync with head.
 1.9.8.1 11-Aug-2006  yamt sync with head
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.34.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.3 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.2 18-Feb-2002  bjh21 branches: 1.2.126; 1.2.134; 1.2.140;
Add prototypes for dma_reset(), dma_setup(), dma_isactive(), dma_isintr() and
dma_intr().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iomd_dma.h was added on branch kqueue on 2002-01-10 19:38:02 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_dma.h was added on branch nathanw_sa on 2002-02-28 04:07:36 +0000
 1.2.140.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.134.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.126.1 04-May-2009  yamt sync with head.
 1.5 18-Aug-2013  matt Fix typo
 1.4 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.3 12-Aug-2013  matt Convert to unified syntax
 1.2 20-Dec-2001  thorpej branches: 1.2.2; 1.2.162; 1.2.172; 1.2.178;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_fiq.S was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.2.178.1 28-Aug-2013  rmind sync with head
 1.2.172.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.162.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 20-Dec-2001  thorpej file iomd_fiq.S was added on branch kqueue on 2002-01-10 19:38:02 +0000
 1.4 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.3 23-Nov-2001  thorpej branches: 1.3.2; 1.3.20;
Pull in assym.h for __PROG32 (needed for IRQenable/IRQdisable macros,
which should probably be pulled out of cpu.h anyway...)
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file iomd_iic.S was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.3.20.1 03-Aug-2004  skrll Sync with HEAD
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 23-Nov-2001  thorpej file iomd_iic.S was added on branch kqueue on 2002-01-10 19:38:03 +0000
 1.1 09-Feb-2008  chris branches: 1.1.2;
file iomd_intr.h was initially added on branch chris-arm-intr-rework.
 1.1.2.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.7 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.6 01-Jul-2011  dyoung branches: 1.6.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 05-Aug-2006  bjh21 ANSIfy, un-__P, and generally KNF.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 15-Jul-2003  lukem branches: 1.3.16;
__KERNEL_RCSID()
 1.2 27-Sep-2002  provos branches: 1.2.8;
remove trailing \n in panic(). approved perry.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iomd_io.c was added on branch kqueue on 2002-01-10 19:38:04 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_io.c was added on branch nathanw_sa on 2002-10-18 02:35:30 +0000
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 11-Aug-2006  yamt sync with head
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.6.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iomd_io_asm.S was added on branch kqueue on 2002-01-10 19:38:04 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file iomd_io_asm.S was added on branch nathanw_sa on 2001-10-05 22:27:42 +0000
 1.18 21-Nov-2020  skrll Adjust code and register usage so that r4 and r5 are preserved as
cur{cpu,lwp} respectively as required by the change to make ASTs
operate per-LWP rather than per-CPU. These registers are used by
DO_AST_AND_RESTORE_ALIGNMENT_FAULTS expecting this usage.

XXX untested
 1.17 21-Nov-2020  skrll Trailing whitespace
 1.16 02-Dec-2013  joerg branches: 1.16.42;
Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.15 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.14 29-Aug-2012  matt branches: 1.14.2; 1.14.4;
Avoid using r7 (which is being reserved for a different purpose).
 1.13 20-Dec-2010  matt branches: 1.13.8;
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.12 19-Aug-2008  matt branches: 1.12.16;
Re-init r5 at start of loop.
 1.11 27-Apr-2008  matt branches: 1.11.2; 1.11.6;
Merge kernel changes in matt-armv6 to HEAD.
 1.10 08-Jan-2008  matt branches: 1.10.6; 1.10.8; 1.10.10;
As of this commit, all arm32 kernel now build.
 1.9 06-Jan-2008  matt Truly kill current_intr_depth once and for all.
 1.8 17-Oct-2007  garbled branches: 1.8.2; 1.8.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 13-Aug-2007  tsutsui branches: 1.7.2;
Pull the similar fix from arch/shark/isa/isa_irq.S rev 1.8:

In irq_setmasks(), refer spl_masks[current_spl_level] directly
rather than spl_mask which is a saved value in splraise() and
splx() functions because the latter one is not always sync'ed with
current_spl_level and interrupt state could be mangled.
 1.6 09-Mar-2007  thorpej branches: 1.6.2; 1.6.8; 1.6.10; 1.6.14; 1.6.16; 1.6.18; 1.6.20;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.5 11-Dec-2005  christos branches: 1.5.26;
merge ktrace-lwp.
 1.4 05-Nov-2003  scw branches: 1.4.16;
Enable/Restore alignment fault state on interrupt handler entry/exit.
 1.3 14-Oct-2002  bjh21 branches: 1.3.8;
Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.2 20-Dec-2001  thorpej branches: 1.2.2;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_irq.S was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 20-Dec-2001  thorpej file iomd_irq.S was added on branch kqueue on 2002-01-10 19:38:05 +0000
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.2 21-Jan-2008  yamt sync with head
 1.4.16.1 03-Sep-2007  yamt sync with head.
 1.5.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.20.3 20-Jan-2008  chris Sync to HEAD.
 1.6.20.2 01-Jan-2008  chris Sync with HEAD.
 1.6.20.1 18-Aug-2007  chris Sync with HEAD
 1.6.18.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.6.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.6.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.6.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.6.10.1 03-Oct-2007  garbled Sync with HEAD
 1.6.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.6.2.1 20-Aug-2007  ad Sync with HEAD.
 1.7.2.4 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.7.2.3 09-Jan-2008  matt sync with HEAD
 1.7.2.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.7.2.1 06-Nov-2007  matt sync with HEAD
 1.8.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.8.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.10.2 04-May-2009  yamt 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.2 28-Sep-2008  mjf Sync with HEAD.
 1.10.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 19-Oct-2008  haad Sync with HEAD.
 1.11.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.12.16.1 05-Mar-2011  rmind sync with head
 1.13.8.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.8.1 30-Oct-2012  yamt sync with head
 1.14.4.2 18-May-2014  rmind sync with head
 1.14.4.1 28-Aug-2013  rmind sync with head
 1.14.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.24 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.23 10-Nov-2019  chs branches: 1.23.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.22 25-Oct-2014  skrll branches: 1.22.20;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.21 21-Sep-2014  christos fix leak.
 1.20 26-Mar-2014  christos branches: 1.20.4;
Add missing ;
 1.19 26-Mar-2014  christos kill sprintf
 1.18 20-Dec-2010  matt branches: 1.18.8; 1.18.18; 1.18.22;
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.17 27-Apr-2008  matt branches: 1.17.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.16 06-Jan-2008  matt branches: 1.16.6; 1.16.8; 1.16.10;
Truly kill current_intr_depth once and for all.
 1.15 17-Oct-2007  garbled branches: 1.15.2; 1.15.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.14 13-Aug-2007  tsutsui branches: 1.14.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.13 19-Feb-2007  matt branches: 1.13.4; 1.13.12; 1.13.16; 1.13.18; 1.13.20; 1.13.22;
Don't do softinit_init from irq_init.
 1.12 18-Feb-2007  matt Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
 1.11 05-Aug-2006  bjh21 branches: 1.11.10;
ANSIfy, un-__P, and generally KNF.
 1.10 11-May-2006  yamt remove irqblock[] as no one uses it. reviewed by Ben Harris.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 03-Jan-2004  chris branches: 1.8.16;
When adding a new interrupt handler to the iomd, turn off interrupts so
we don't run the risk of an interrupt happening while things are being
updated.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 27-Sep-2002  provos branches: 1.6.8;
remove trailing \n in panic(). approved perry.
 1.5 03-Apr-2002  thorpej Remove unused extern decls.
 1.4 20-Dec-2001  thorpej branches: 1.4.2;
* Share a common vector page between arm26 and arm32.
* Use a common set of exception handlers for all arm32 platforms.
* New FIQ framework based on discussions with Ben Harris, shared
between arm26 and arm32.
 1.3 27-Nov-2001  thorpej Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomd_irqhandler.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.4.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 20-Dec-2001  thorpej file iomd_irqhandler.c was added on branch kqueue on 2002-01-10 19:38:06 +0000
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.5 21-Jan-2008  yamt sync with head
 1.8.16.4 03-Sep-2007  yamt sync with head.
 1.8.16.3 26-Feb-2007  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.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 11-May-2006  elad sync with head
 1.9.8.2 11-Aug-2006  yamt sync with head
 1.9.8.1 24-May-2006  yamt sync with head.
 1.9.6.1 01-Jun-2006  kardel Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.11.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.22.4 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.13.22.3 20-Jan-2008  chris Sync to HEAD.
 1.13.22.2 01-Jan-2008  chris Sync with HEAD.
 1.13.22.1 18-Aug-2007  chris Sync with HEAD
 1.13.20.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.13.18.2 28-Feb-2008  rjs Sync with HEAD.
 1.13.18.1 01-Nov-2007  rjs Sync with HEAD.
 1.13.16.1 15-Aug-2007  skrll Sync with HEAD.
 1.13.12.1 03-Oct-2007  garbled Sync with HEAD
 1.13.4.1 20-Aug-2007  ad Sync with HEAD.
 1.14.2.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.14.2.2 09-Jan-2008  matt sync with HEAD
 1.14.2.1 06-Nov-2007  matt sync with HEAD
 1.15.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.15.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.10.1 16-May-2008  yamt sync with head.
 1.16.8.1 18-May-2008  yamt sync with head.
 1.16.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.22.1 05-Mar-2011  rmind sync with head
 1.18.22.1 18-May-2014  rmind sync with head
 1.18.18.2 03-Dec-2017  jdolecek update from HEAD
 1.18.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.8.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.20.4.1 10-Nov-2014  snj Pull up following revision(s) (requested by maxv in ticket #195):
sys/arch/arm/iomd/iomd_irqhandler.c: revision 1.21
sys/arch/arm/ofw/ofw_irqhandler.c: revision 1.21
sys/arch/atari/atari/intr.c: revision 1.24-1.25
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.14
sys/arch/hpcmips/tx/tx39icu.c: revision 1.34
sys/arch/shark/isa/isa_irqhandler.c: revision 1.27
sys/arch/sparc/sparc/machdep.c: revision 1.327
sys/arch/sparc64/dev/psycho.c: revision 1.119
sys/arch/sparc64/dev/schizo.c: revision 1.32
sys/arch/sparc64/sparc64/machdep.c: revision 1.279
sys/arch/sun68k/sun68k/bus.c: revision 1.22
sys/arch/x86/x86/ipmi.c: revision 1.58
sys/arch/xen/xen/privcmd.c: revision 1.46-1.49
Fix several memory leaks.
 1.22.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1 09-Feb-2008  chris branches: 1.1.2;
file iomd_irqhandler.h was initially added on branch chris-arm-intr-rework.
 1.1.2.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.13 15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.12 28-Mar-2022  riastradh sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 22-Dec-2019  thorpej branches: 1.9.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.8 14-Feb-2016  chs branches: 1.8.18;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.7 14-May-2012  skrll branches: 1.7.2; 1.7.16;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.6 06-Dec-2007  ad branches: 1.6.50; 1.6.54;
lockmgr -> mutex
 1.5 26-Jun-2006  drochner branches: 1.5.18; 1.5.30; 1.5.32; 1.5.34; 1.5.36; 1.5.42; 1.5.46;
use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args
 1.4 24-Dec-2005  perry branches: 1.4.4; 1.4.8; 1.4.16;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 01-Nov-2003  reinoud branches: 1.2.4; 1.2.18;
Fix for PR # 23264 thanks to Mike Pumford; it is only attatching clock once
now.
 1.1 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.2.18.3 07-Dec-2007  yamt sync with head
 1.2.18.2 30-Dec-2006  yamt sync with head.
 1.2.18.1 21-Jun-2006  yamt sync with head.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 01-Nov-2003  skrll file iomdiic.c was added on branch ktrace-lwp on 2004-08-03 10:32:38 +0000
 1.4.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.4.8.1 11-Aug-2006  yamt sync with head
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.46.1 08-Dec-2007  ad Sync with head.
 1.5.42.1 08-Dec-2007  mjf Sync with HEAD.
 1.5.36.1 09-Jan-2008  matt sync with HEAD
 1.5.34.1 01-Jan-2008  chris Sync with HEAD.
 1.5.32.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.5.30.1 26-Dec-2007  rjs Sync with HEAD.
 1.5.18.1 09-Dec-2007  reinoud Pullup to HEAD
 1.6.54.1 02-Jun-2012  mrg sync to latest -current.
 1.6.50.1 23-May-2012  yamt sync with head.
 1.7.16.1 19-Mar-2016  skrll Sync with HEAD
 1.7.2.1 03-Dec-2017  jdolecek update from HEAD
 1.8.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4;
New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file iomdiicvar.h was added on branch ktrace-lwp on 2004-08-03 10:32:38 +0000
 1.7 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.6 10-Nov-2019  chs branches: 1.6.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.5 14-May-2012  skrll branches: 1.5.40;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 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-Oct-2006  bjh21 Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.2 11-Dec-2005  christos branches: 1.2.20; 1.2.22;
merge ktrace-lwp.
 1.1 13-Mar-2004  bjh21 branches: 1.1.2; 1.1.4; 1.1.8; 1.1.16; 1.1.18; 1.1.24; 1.1.28; 1.1.30;
Add support for using the MI pckbd and pms drivers with the IOMD keyboard
and mouse ports, with a new driver, iomdkbc(4).
 1.1.30.1 11-Nov-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #1562):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.1.28.1 11-Nov-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #1562):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.1.24.1 22-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10728):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.16.1 11-Nov-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #1562):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.1.8.1 22-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10728):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 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 13-Mar-2004  skrll file iomdkbc.c was added on branch ktrace-lwp on 2004-08-03 10:32:38 +0000
 1.1.2.1 22-Oct-2006  bouyer Pull up following revision(s) (requested by bjh21 in ticket #10728):
sys/arch/arm/iomd/iomdkbc.c: revision 1.3
Interpret the argument to iomdkbc_set_poll() correctly. Quite how we
got this far with it the wrong way around is beyond me.
 1.2.22.1 22-Oct-2006  yamt sync with head
 1.2.20.1 18-Nov-2006  ad Sync with head.
 1.4.6.1 02-Jun-2012  mrg sync to latest -current.
 1.4.2.1 23-May-2012  yamt sync with head.
 1.5.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 13-Mar-2004  bjh21 branches: 1.1.4;
Add part of iomdkbc(4) that I missed last time.
 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 13-Mar-2004  skrll file iomdkbcvar.h was added on branch ktrace-lwp on 2004-08-03 10:32:38 +0000
 1.5 16-Apr-2022  andvar s/strickly/strictly/
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 31-Dec-2003  bjh21 Add some useful flag definitions for DMA registers.
 1.2 08-Jan-2002  bjh21 branches: 1.2.2; 1.2.20;
Add a couple of ARM7500 registers I missed last time, and correct a couple
of others to match the names in the data sheet.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.4.1 05-Oct-2001  nathanw file iomdreg.h was added on branch nathanw_sa on 2002-01-11 23:38:04 +0000
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 08-Jan-2002  thorpej file iomdreg.h was added on branch kqueue on 2002-01-10 19:38:07 +0000
 1.4 10-May-2012  skrll u_int*_t -> uint*_t
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 19-Apr-2002  wiz Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file iomdvar.h was added on branch kqueue on 2002-01-10 19:38:08 +0000
 1.1.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file iomdvar.h was added on branch nathanw_sa on 2002-06-20 03:38:10 +0000
 1.3.6.1 02-Jun-2012  mrg sync to latest -current.
 1.3.2.1 23-May-2012  yamt sync with head.
 1.8 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.8;
merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 23-Oct-2002  jdolecek branches: 1.5.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.4 22-Oct-2002  jdolecek g/c kbdpoll(), it was replaced with nopoll()
 1.3 05-Oct-2002  chs branches: 1.3.2;
add missing protos, clean up includes.
 1.2 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.14;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.14.1 17-May-2002  gehenna Add device switch.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file kbd.c was added on branch kqueue on 2002-01-10 19:38:08 +0000
 1.1.4.4 11-Nov-2002  nathanw Catch up to -current
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file kbd.c was added on branch nathanw_sa on 2002-09-17 21:13:30 +0000
 1.3.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.5.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.2 03-Aug-2004  skrll Sync with HEAD
 1.5.6.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.6.16.2 30-Dec-2006  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.7.8.1 03-Sep-2006  yamt sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.11 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.10 26-Mar-2006  thorpej Use device_unit().
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 08-Feb-2004  bjh21 branches: 1.8.16;
Increase the attach priority of opms(4) and kbd(4) (also rpckbd(4), but that
slipped into a previous commit) so that they can override the forthcoming
iomdkbc(4) if necessary.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.8;
Add trailing ; to CFATTACH_DECL
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file kbd_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file kbd_iomd.c was added on branch kqueue on 2002-01-10 19:38:08 +0000
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll 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.9.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.2 03-Sep-2006  yamt sync with head.
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.3 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.2 18-Feb-2002  bjh21 branches: 1.2.34; 1.2.48; 1.2.52;
Add prototype for getkey_polled().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file kbdvar.h was added on branch kqueue on 2002-01-10 19:38:09 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file kbdvar.h was added on branch nathanw_sa on 2002-02-28 04:07:37 +0000
 1.2.52.1 03-Sep-2006  yamt sync with head.
 1.2.48.1 09-Sep-2006  rpaulo sync with head
 1.2.34.1 30-Dec-2006  yamt sync with head.
 1.2 01-Jan-2004  bjh21 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days. Let the CVS history be its only memorial.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file lmc1982.S was added on branch kqueue on 2002-01-10 19:38:09 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file lmc1982.S was added on branch nathanw_sa on 2001-10-05 22:27:42 +0000
 1.2 01-Jan-2004  bjh21 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days. Let the CVS history be its only memorial.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file lmc1982.h was added on branch kqueue on 2002-01-10 19:38:10 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file lmc1982.h was added on branch nathanw_sa on 2001-10-05 22:27:42 +0000
 1.13 01-Jan-2004  bjh21 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days. Let the CVS history be its only memorial.
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 01-Apr-2003  thorpej branches: 1.11.2;
Use PAGE_SIZE rather than NBPG.
 1.10 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.9 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 16-Jun-2002  bjh21 struct lmcaudio_softc.iobase was unused other than to initialise it. G/C it.
This also means that the "aux" parameter to lmcaudio_attach is unused.
 1.5 10-Apr-2002  thorpej branches: 1.5.2;
vm_offset_t -> vaddr_t,paddr_t
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file lmcaudio.c was added on branch nathanw_sa on 2002-01-08 00:23:15 +0000
 1.4.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file lmcaudio.c was added on branch kqueue on 2002-01-10 19:38:10 +0000
 1.5.2.1 14-Jul-2002  gehenna catch up with -current.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 19-Aug-2006  bjh21 branches: 1.6.58; 1.6.60; 1.6.62;
The log2_bpp fields of the mode list generated by makemodes.awk weren't
used for anything. Rearrange things so that it doesn't any more, and
just produces an array of struct videomode. modedefs.c is looking
suspiciously much like videomode.c now.
 1.5 18-Aug-2006  bjh21 Move calculation of a screen mode's frame rate out of makemodes.awk into
the kernel, removing an element from struct vidc_mode. The calculation
is a bit pointless at the moment anyway, since both bootloaders pass in
a constant 56, but that might get fixed one day.
 1.4 17-Aug-2006  bjh21 Switch to using the MI struct videomode for storing VIDC video timings.
struct videomode doesn't have a way to record border widths (though I
wonder if VESA's "margins" are the same thing), so we now just treat them
as zero. Tested on my NC, which still seems to be working.
 1.3 16-Aug-2006  bjh21 Fix an obvious typo.
 1.2 20-Jun-2006  gdamore Use portable | cat 1>&2 instead of > /dev/stderr. This allows this script
to work, and supports building on Solaris 10.

Reviewed/approved by jlam@.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.40; 1.1.54; 1.1.58; 1.1.66;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.66.1 20-Jun-2006  gdamore Use portable | cat 1>&2 instead of > /dev/stderr. This allows this script
to work, and supports building on Solaris.
 1.1.58.2 03-Sep-2006  yamt sync with head.
 1.1.58.1 26-Jun-2006  yamt sync with head.
 1.1.54.1 09-Sep-2006  rpaulo sync with head
 1.1.40.2 30-Dec-2006  yamt sync with head.
 1.1.40.1 21-Jun-2006  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file makemodes.awk was added on branch kqueue on 2002-01-10 19:38:11 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file makemodes.awk was added on branch nathanw_sa on 2001-10-05 22:27:42 +0000
 1.6.62.1 16-May-2008  yamt sync with head.
 1.6.60.1 18-May-2008  yamt sync with head.
 1.6.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.5 14-Jul-2003  lukem use __KERNEL_RCSID(0, instead of RCSID( in the kernel
 1.4 26-Nov-2002  christos branches: 1.4.6;
si_ -> sel_
 1.3 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 19-Apr-2002  wiz branches: 1.1.2; 1.1.6; 1.1.8;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.1.8.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.4 02-Oct-2002  jdolecek do not need the (void *) cast for kn_hook anymore
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 19-Apr-2002  jdolecek file opms.c was added on branch kqueue on 2002-06-23 17:34:52 +0000
 1.1.6.5 11-Dec-2002  thorpej Sync with HEAD.
 1.1.6.4 11-Nov-2002  nathanw Catch up to -current
 1.1.6.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 19-Apr-2002  nathanw file opms.c was added on branch nathanw_sa on 2002-06-20 03:38:11 +0000
 1.1.2.1 17-May-2002  gehenna Add device switch.
 1.2.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.4.6.2 03-Aug-2004  skrll Sync with HEAD
 1.4.6.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.8 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.7 08-Feb-2004  bjh21 Increase the attach priority of opms(4) and kbd(4) (also rpckbd(4), but that
slipped into a previous commit) so that they can override the forthcoming
iomdkbc(4) if necessary.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.8;
Add trailing ; to CFATTACH_DECL
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 19-Apr-2002  wiz branches: 1.1.6; 1.1.8;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.1.8.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 19-Apr-2002  jdolecek file opms_iomd.c was added on branch kqueue on 2002-06-23 17:34:53 +0000
 1.1.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 19-Apr-2002  nathanw file opms_iomd.c was added on branch nathanw_sa on 2002-06-20 03:38:11 +0000
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.1 19-Apr-2002  wiz branches: 1.1.6; 1.1.8; 1.1.16;
Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.1.16.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 19-Apr-2002  jdolecek file opmsvar.h was added on branch kqueue on 2002-06-23 17:34:53 +0000
 1.1.6.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 19-Apr-2002  nathanw file opmsvar.h was added on branch nathanw_sa on 2002-06-20 03:38:11 +0000
 1.3 19-Apr-2002  wiz Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.2 18-Feb-2002  bjh21 Add internal prototype for cmd_mouse().
Also __RCSID() while I'm here.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.4 17-Jun-2002  jdolecek provide kqfilter hooks
XXX not tested
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file pms.c was added on branch kqueue on 2002-01-10 19:38:12 +0000
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file pms.c was added on branch nathanw_sa on 2002-02-28 04:07:38 +0000
 1.3 19-Apr-2002  wiz Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file pms_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file pms_iomd.c was added on branch kqueue on 2002-01-10 19:38:13 +0000
 1.2 19-Apr-2002  wiz Complete renaming of opms to opms (was partly named pms, externally and
internally). Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file pmsvar.h was added on branch kqueue on 2002-01-10 19:38:14 +0000
 1.1.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file pmsvar.h was added on branch nathanw_sa on 2002-06-20 03:38:12 +0000
 1.22 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.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.19 16-Oct-2019  maya branches: 1.19.10;
Switch files copyright Reinoud Zandijk from BSD 4 clause to BSD 2 clause.

OK'd by reinoud in email (from 4 Feb 2019).
 1.18 14-May-2012  skrll branches: 1.18.40;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.17 10-May-2012  skrll u_int*_t -> uint*_t
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.14 28-Apr-2008  martin branches: 1.14.2;
Remove clause 3 and 4 from TNF licenses
 1.13 17-Oct-2007  garbled 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.12 09-Jul-2007  ad branches: 1.12.10; 1.12.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.11 04-Mar-2007  christos branches: 1.11.2; 1.11.4; 1.11.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 12-Nov-2006  plunky branches: 1.10.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.9 05-Aug-2006  bjh21 branches: 1.9.4; 1.9.6;
ANSIfy, un-__P, and generally KNF.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 13-Mar-2004  bjh21 branches: 1.7.16;
Rename wsqms(4) to qms(4), since the "ws" is redundant now. While I'm here,
bundle it all into a single file, qms.c, replacing wsqms.c, wsqms_iomd.c,
and wsqmsvar.h.
 1.6 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 26-Nov-2002  christos branches: 1.4.6;
si_ -> sel_
 1.3 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.2 06-Sep-2002  gehenna branches: 1.2.2;
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.14;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.14.1 17-May-2002  gehenna Add device switch.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 02-Oct-2002  jdolecek do not need the (void *) cast for kn_hook anymore
 1.1.6.3 17-Jun-2002  jdolecek provide kqfilter hooks
XXX not tested
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file qms.c was added on branch kqueue on 2002-01-10 19:38:14 +0000
 1.1.4.4 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.3 11-Nov-2002  nathanw Catch up to -current
 1.1.4.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file qms.c was added on branch nathanw_sa on 2002-09-17 21:13:31 +0000
 1.2.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.4.6.5 13-Jan-2005  skrll Adapt to branch
 1.4.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.2 03-Aug-2004  skrll Sync with HEAD
 1.4.6.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.7.16.3 03-Sep-2007  yamt sync with head.
 1.7.16.2 30-Dec-2006  yamt sync with head.
 1.7.16.1 21-Jun-2006  yamt sync with head.
 1.8.8.1 11-Aug-2006  yamt sync with head
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.6.1 10-Dec-2006  yamt sync with head.
 1.9.4.1 18-Nov-2006  ad Sync with head.
 1.10.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.10.1 03-Oct-2007  garbled Sync with HEAD
 1.11.4.1 11-Jul-2007  mjf Sync with head.
 1.11.2.1 15-Jul-2007  ad Sync with head.
 1.12.12.1 06-Nov-2007  matt sync with HEAD
 1.12.10.1 01-Jan-2008  chris Sync with HEAD.
 1.14.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.16.6.1 02-Jun-2012  mrg sync to latest -current.
 1.16.2.1 23-May-2012  yamt sync with head.
 1.18.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 27-Nov-2001  thorpej branches: 1.3.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.2 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file qms_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.3.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.1 27-Nov-2001  thorpej file qms_iomd.c was added on branch kqueue on 2002-01-10 19:38:15 +0000
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.3 13-Mar-2004  bjh21 Remove busmouse(4) drivers. Everyone should be using wsmouse(4) these days.
 1.2 18-Feb-2002  bjh21 branches: 1.2.18;
Add a prototype for qms_console_freeze().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file qmsvar.h was added on branch kqueue on 2002-01-10 19:38:16 +0000
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file qmsvar.h was added on branch nathanw_sa on 2002-02-28 04:07:38 +0000
 1.2.18.1 03-Aug-2004  skrll Sync with HEAD
 1.14 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.13 25-Apr-2006  snj s/allready/already/
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11 29-Jan-2004  reinoud branches: 1.11.16;
The `beep' device has been removed but aparently this small reference was
obmitted resulting in a compilation failure in the autobuilds.

It effectively removes the now redundant reference to "beep.h" and removes
an associated prototype that wasn't used.
 1.10 17-Jan-2004  bjh21 Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.9 17-Jan-2004  bjh21 Don't include option headers we're not going to use.
 1.8 17-Jan-2004  bjh21 KNF.
 1.7 17-Jan-2004  bjh21 Un-__P.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 20-Jan-2003  simonb branches: 1.5.2;
The Double-Semi-Colon Police.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 17-Mar-2002  atatat branches: 1.3.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.2 10-Feb-2002  reinoud Please only return errno values !!! ... also doing a bit of KNF'ing
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file rpckbd.c was added on branch kqueue on 2002-01-10 19:38:16 +0000
 1.1.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file rpckbd.c was added on branch nathanw_sa on 2002-02-28 04:07:38 +0000
 1.3.4.1 19-May-2002  gehenna Remove unnecessary #include
 1.5.2.4 13-Jan-2005  skrll Adapt to branch
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.2 30-Dec-2006  yamt sync with head.
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.1 11-May-2006  elad sync with head
 1.12.8.2 03-Sep-2006  yamt sync with head.
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.1 01-Jun-2006  kardel Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.11 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 08-Feb-2004  bjh21 branches: 1.9.16;
Attach rpckbd(4) and kbd(4) in the same place, so that they can't both end
up attached at the same time, and so that they can both prevent the forthcoming
iomdkbc(4) attaching to the keyboard slot.
[ file missed in last commit ]
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 23-Mar-2002  reinoud Allthough this patch doesn't look that much it adds a few things that were
on the port-acorn32's TODO list for quite some time :

- when the serial console is selected, don't exclude the screen
alltogether; currently the keyboard is still not attached but that might be
a configuration problem in the GENERIC console or a failure to explicitly
connect to a wsmux. This needs further investigation.

- create a framework for the display memory writeback on vsync for
StrongARM processors since they don't have a write-trough cache. This is to
solve the lazy screen update that is very evident in single user mode on
these processors; the cache isn't flushed/written back that often and parts
of the screen can thus be resident in the cache but not written out to
memory yet.

- clean up some loose ends in the code.
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file rpckbd_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.2.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file rpckbd_iomd.c was added on branch kqueue on 2002-01-10 19:38:16 +0000
 1.7.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.4 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 17-Jan-2004  bjh21 branches: 1.2.16;
Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file rpckbdvar.h was added on branch kqueue on 2002-01-10 19:38:17 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file rpckbdvar.h was added on branch nathanw_sa on 2001-10-05 22:27:43 +0000
 1.2.16.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 03-Sep-2006  yamt sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.12 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 06-Jan-2003  wiz branches: 1.10.2;
specified, not specifed.
 1.9 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.8 02-Oct-2002  thorpej branches: 1.8.2;
Add trailing ; to CFATTACH_DECL
 1.7 01-Oct-2002  bjh21 Remove a spurious ']' from the CFATTACH_DECL invokation.
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 18-Feb-2002  bjh21 branches: 1.3.8;
Include <machine/conf.h> for cdevsw function prototypes.
Add internal prototypes for hexdectodec(), dectohexdec() and twodigits().
Correct signature of rtcioctl().
 1.2 05-Feb-2002  reinoud At last enable the real time clock again on acorn32 !! thanks a lot to Mike
Pumford for the patches.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file rtc.c was added on branch kqueue on 2002-01-10 19:38:17 +0000
 1.1.4.6 07-Jan-2003  thorpej Sync with HEAD.
 1.1.4.5 11-Nov-2002  nathanw Catch up to -current
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file rtc.c was added on branch nathanw_sa on 2002-02-28 04:07:38 +0000
 1.3.8.1 17-May-2002  gehenna Add device switch.
 1.8.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.10.2.2 03-Aug-2004  skrll Sync with HEAD
 1.10.2.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.9 17-Jan-2004  bjh21 Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.8 01-Jan-2004  bjh21 The lmcaudio driver was only ever used on the RC7500, which we don't support
these days. Let the CVS history be its only memorial.
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 16-Jun-2002  bjh21 Un-__P, ANSIfy, KNF.
 1.3 10-Mar-2002  bjh21 branches: 1.3.4;
__RCSID -> __KERNEL_RCSID
 1.2 18-Feb-2002  bjh21 Rename prototype from sysbeep_vidc() to sysbeep() to match definition.
Pull in beepvar.h and vidcaudiovar.h for beep_generate() and
vidcaudio_beep_generate() prototypes.
__RCSID().
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file sysbeep_vidc.c was added on branch kqueue on 2002-01-10 19:38:18 +0000
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file sysbeep_vidc.c was added on branch nathanw_sa on 2002-02-28 04:07:39 +0000
 1.3.4.1 14-Jul-2002  gehenna catch up with -current.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.3 18-Feb-2002  bjh21 Add prototype for yeartoday().
 1.2 05-Feb-2002  reinoud At last enable the real time clock again on acorn32 !! thanks a lot to Mike
Pumford for the patches.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file todclock.c was added on branch kqueue on 2002-01-10 19:38:18 +0000
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file todclock.c was added on branch nathanw_sa on 2002-02-28 04:07:39 +0000
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2 06-Oct-2003  thorpej New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file todclockvar.h was added on branch kqueue on 2002-01-10 19:38:18 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file todclockvar.h was added on branch nathanw_sa on 2001-10-05 22:27:43 +0000
 1.14 05-Feb-2024  andvar s/dependancies/dependencies/ and s/independantly/independently/ in comments and
distrib notes.
 1.13 18-Aug-2006  bjh21 Move calculation of a screen mode's frame rate out of makemodes.awk into
the kernel, removing an element from struct vidc_mode. The calculation
is a bit pointless at the moment anyway, since both bootloaders pass in
a constant 56, but that might get fixed one day.
 1.12 17-Aug-2006  bjh21 This is kernel-only now, so no need to check _KERNEL.
 1.11 17-Aug-2006  bjh21 Switch to using the MI struct videomode for storing VIDC video timings.
struct videomode doesn't have a way to record border widths (though I
wonder if VESA's "margins" are the same thing), so we now just treat them
as zero. Tested on my NC, which still seems to be working.
 1.10 15-Aug-2006  bjh21 Remove some prototypes and macros that aren't used any more.
 1.9 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8;
merge ktrace-lwp.
 1.7 31-Dec-2003  bjh21 branches: 1.7.16;
Add definitions of the bits in the Sound Control Register (SCR).
 1.6 05-Oct-2002  chs branches: 1.6.8;
copy over some stuff from the shark version of this file.
(how did this compile before?)
add missing protos.
 1.5 01-Oct-2002  reinoud Remove old unused cruft
 1.4 16-Jun-2002  bjh21 Parenthesise arguments to VIDC_BLUE and VIDC_GREEN correctly.
 1.3 30-Mar-2002  reinoud branches: 1.3.2; 1.3.4;
Only include the vidc_machdep.h file when we're compiling the kernel
 1.2 17-Oct-2001  reinoud branches: 1.2.4; 1.2.6;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 17-Oct-2001  thorpej file vidc.h was added on branch kqueue on 2002-01-10 19:38:19 +0000
 1.2.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file vidc.h was added on branch nathanw_sa on 2002-04-17 00:02:32 +0000
 1.3.4.1 21-Jun-2002  lukem Pull up revision 1.4 (requested by bjh21 in ticket #328):
Parenthesise arguments to VIDC_BLUE and VIDC_GREEN correctly.
 1.3.2.1 14-Jul-2002  gehenna catch up with -current.
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 30-Dec-2006  yamt sync with head.
 1.8.8.1 03-Sep-2006  yamt sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 14-May-2012  skrll branches: 1.17.54;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 05-Aug-2006  bjh21 ANSIfy, un-__P, and generally KNF.
 1.14 08-Mar-2006  lukem Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10;
merge ktrace-lwp.
 1.12 26-Aug-2005  drochner s/locdesc_t/int/g
 1.11 03-Jul-2005  he branches: 1.11.2;
Make the vidcsearch() prototype match the function declaration.
 1.10 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.8;
Add trailing ; to CFATTACH_DECL
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.4 16-Jun-2002  bjh21 Un-__P, ANSIfy, clean up comments.
 1.3 16-Jun-2002  bjh21 None of the children of vidc now use their aux pointer, so there's no need
to set it, and vidcprint isn't needed to print it. G/C all that code, and
most of the rest of vidcsearch too.
This also means that the locators on vidc's children are unused, so G/C them
as well.
 1.2 06-Jun-2002  bjh21 Don't identify all VIDCs as "vidc20". Instead, print something appropriate
based on the type of IOMD in the system (which we use anyway to work out
the VCO reference clock frequency).
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.14;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.14.1 14-Jul-2002  gehenna catch up with -current.
 1.1.6.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vidc20.c was added on branch kqueue on 2002-01-10 19:38:19 +0000
 1.1.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidc20.c was added on branch nathanw_sa on 2002-06-20 03:38:13 +0000
 1.8.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.8.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.2 30-Dec-2006  yamt sync with head.
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.13.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.13.8.2 11-Aug-2006  yamt sync with head
 1.13.8.1 13-Mar-2006  yamt sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.16.6.1 02-Jun-2012  mrg sync to latest -current.
 1.16.2.1 23-May-2012  yamt sync with head.
 1.17.54.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.17.54.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.17.54.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.17.54.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.17.54.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.17.54.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.37 18-May-2024  andvar s/abou/about/ in comment.
 1.36 24-May-2022  andvar fix various typos in comments, docs and log messages.
 1.35 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.34 25-Oct-2014  skrll Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.33 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.32 15-Mar-2009  cegger branches: 1.32.22;
ansify function definitions
 1.31 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.30 28-Oct-2006  bjh21 branches: 1.30.58; 1.30.66; 1.30.72;
When setting the FIFO preload, chose an entirely safe value rather than
using a completely bogus heuristic to guess at one. This might cause FIFO
underruns in particularly exciting video modes, but it also makes more
boring ones work correctly.
 1.29 21-Oct-2006  bjh21 Program the IOMD flyback size register correctly, or at least the same way
we did before we started using struct videomode. This seems to unbreak
systems with VRAM at least a little.
 1.28 19-Aug-2006  bjh21 branches: 1.28.2; 1.28.4;
When looking for a screen mode at startup, skip any interlaced and
doublescan modes, since vidcvideo doesn't support them.
 1.27 19-Aug-2006  bjh21 If we can't find a screen mode matching the bootloader's frame rate, choose
the nearest one, rather than the first one with the same resolution. This
is likely to be useful when the bootloader finally passes a valid frame rate.
For now, it just favours flickery over non-functional.
 1.26 19-Aug-2006  bjh21 Arrange things so that if MONITOR isn't defined in the kernel configration,
we use the standard mode list from videomode.c rather than one generated
by makemodes.awk. This is less useful than it might be since without a useful
frame rate from the bootloader we're likely to end up choosing a screen mode
that's either flickery or too fast for the monitor (or DRAM bandwidth).
 1.25 19-Aug-2006  bjh21 The log2_bpp fields of the mode list generated by makemodes.awk weren't
used for anything. Rearrange things so that it doesn't any more, and
just produces an array of struct videomode. modedefs.c is looking
suspiciously much like videomode.c now.
 1.24 18-Aug-2006  bjh21 Move calculation of a screen mode's frame rate out of makemodes.awk into
the kernel, removing an element from struct vidc_mode. The calculation
is a bit pointless at the moment anyway, since both bootloaders pass in
a constant 56, but that might get fixed one day.
 1.23 17-Aug-2006  bjh21 Switch to using the MI struct videomode for storing VIDC video timings.
struct videomode doesn't have a way to record border widths (though I
wonder if VESA's "margins" are the same thing), so we now just treat them
as zero. Tested on my NC, which still seems to be working.
 1.22 15-Aug-2006  bjh21 vidc_initialmode seems to be initialised at startup and never touched again.
Lose it.
 1.21 05-Aug-2006  bjh21 ANSIfy, un-__P, and generally KNF.
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.8;
merge ktrace-lwp.
 1.19 01-Apr-2005  yamt branches: 1.19.2;
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.18 11-Feb-2005  simonb White space nit- don't put a space before/after increment/decrement
operators.
 1.17 21-Sep-2003  matt branches: 1.17.8; 1.17.10;
Fix GCC 3.3.1 nits
 1.16 01-Apr-2003  thorpej branches: 1.16.2;
Use PAGE_SIZE rather than NBPG.
 1.15 01-Oct-2002  reinoud Fix some small range checks and why weren't we writing the palette in when
we're asked to set the VIDC in a given state! :-D ahum... these are fixed
now. The top palette entry wasn't set.
 1.14 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.13 19-Jun-2002  bjh21 Move over to using a 6:5:5 R:G:B palette in 16-bit display modes, and abstract
the palette generation to work with arbitrary numbers of bits.
This allows X to work after a fashion, since it tries to put the VIDC into
a 6:5:5 mode itself (which we ignore). Anything that actually tries to take
advantage of the DirectColor visual it offers will still be screwed, but I
hope such applications are rare.
 1.12 17-Jun-2002  bjh21 Kill off vidcvideo_textpalette() again, but better.
This time, vidcvideo_stdpalette() uses vidcvideo_write(), as it should, and
correctly initialises the paletter in 16bpp and (I hope) 32 bpp modes.
This fixes the colours on the text console in 16bpp modes. 32bpp seems to be
generally broken anyway.
 1.11 16-Jun-2002  bjh21 Revert last. vidcvideo_textpalette() and vidcvideo_stdpalette set the palette
by different means.
 1.10 16-Jun-2002  bjh21 vidcvideo_stdpalette() and vidcvideo_textpalette() do precisely the same thing.
G/C the latter and change its only caller to use the former.
 1.9 15-Mar-2002  reinoud branches: 1.9.4; 1.9.6;
Some cosmetic changes....
 1.8 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.7 18-Feb-2002  bjh21 Comment out vidcvideo_setbase() (it's unused).
Remove vidcvideo_mmap() (it's redundant).
Add in-core RCSID.
 1.6 15-Dec-2001  bjh21 branches: 1.6.2;
mod() was unused. g/c it. New code should use abs() anyway.
 1.5 15-Dec-2001  bjh21 Simplify the pixel-clock-rate-setting code, so it always works out the
parameters from first principles rather than using a static table for some
rates. This makes it work correctly on ARM7500, for which the table was
bogus (ARM7500 has a different refclk from VIDC20).
 1.4 27-Nov-2001  thorpej Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.6 01-Aug-2002  nathanw Catch up to -current.
 1.2.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file vidc20config.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.6.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.6.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.1 15-Dec-2001  thorpej file vidc20config.c was added on branch kqueue on 2002-01-10 19:38:20 +0000
 1.9.6.2 21-Jun-2002  lukem Pull up revision 1.13 (requested by bjh21 in ticket #328):
Move over to using a 6:5:5 R:G:B palette in 16-bit display modes, and abstract
the palette generation to work with arbitrary numbers of bits.
This allows X to work after a fashion, since it tries to put the VIDC into
a 6:5:5 mode itself (which we ignore). Anything that actually tries to take
advantage of the DirectColor visual it offers will still be screwed, but I
hope such applications are rare.
 1.9.6.1 21-Jun-2002  lukem Pull up revision 1.12 (requested by bjh21 in ticket #328):
Kill off vidcvideo_textpalette() again, but better.
This time, vidcvideo_stdpalette() uses vidcvideo_write(), as it should, and
correctly initialises the paletter in 16bpp and (I hope) 32 bpp modes.
This fixes the colours on the text console in 16bpp modes. 32bpp seems to be
generally broken anyway.
 1.9.4.2 16-Jul-2002  gehenna catch up with -current.
 1.9.4.1 14-Jul-2002  gehenna catch up with -current.
 1.16.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.16.2.4 15-Feb-2005  skrll Sync with HEAD.
 1.16.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.10.2 12-Feb-2005  yamt sync with head.
 1.17.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.17.8.1 29-Apr-2005  kent sync with -current
 1.19.2.1 30-Dec-2006  yamt sync with head.
 1.20.8.2 03-Sep-2006  yamt sync with head.
 1.20.8.1 11-Aug-2006  yamt sync with head
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.28.4.2 10-Dec-2006  yamt sync with head.
 1.28.4.1 22-Oct-2006  yamt sync with head
 1.28.2.1 18-Nov-2006  ad Sync with head.
 1.30.72.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.66.1 28-Apr-2009  skrll Sync with HEAD.
 1.30.58.1 04-May-2009  yamt sync with head.
 1.32.22.1 03-Dec-2017  jdolecek update from HEAD
 1.3 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.36; 1.2.50; 1.2.54;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidc20config.c.old-stuff was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.2.54.1 03-Sep-2006  yamt sync with head.
 1.2.50.1 09-Sep-2006  rpaulo sync with head
 1.2.36.1 30-Dec-2006  yamt sync with head.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file vidc20config.c.old-stuff was added on branch kqueue on 2002-01-10 19:38:20 +0000
 1.8 28-May-2022  andvar s/heigth/height/ in a function argument name.
 1.7 19-May-2008  reinoud Remove double copyright message by me
 1.6 28-Apr-2008  martin branches: 1.6.2;
Remove clause 3 and 4 from TNF licenses
 1.5 15-Aug-2006  bjh21 branches: 1.5.58; 1.5.60; 1.5.62;
Un-__P
 1.4 17-Jun-2002  bjh21 branches: 1.4.24; 1.4.38; 1.4.42;
Kill off vidcvideo_textpalette() again, but better.
This time, vidcvideo_stdpalette() uses vidcvideo_write(), as it should, and
correctly initialises the paletter in 16bpp and (I hope) 32 bpp modes.
This fixes the colours on the text console in 16bpp modes. 32bpp seems to be
generally broken anyway.
 1.3 16-Jun-2002  bjh21 Revert last. vidcvideo_textpalette() and vidcvideo_stdpalette set the palette
by different means.
 1.2 16-Jun-2002  bjh21 vidcvideo_stdpalette() and vidcvideo_textpalette() do precisely the same thing.
G/C the latter and change its only caller to use the former.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.14; 1.1.16;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.16.1 21-Jun-2002  lukem Pull up revision 1.4 (requested by bjh21 in ticket #328):
Kill off vidcvideo_textpalette() again, but better.
This time, vidcvideo_stdpalette() uses vidcvideo_write(), as it should, and
correctly initialises the paletter in 16bpp and (I hope) 32 bpp modes.
This fixes the colours on the text console in 16bpp modes. 32bpp seems to be
generally broken anyway.
 1.1.14.2 16-Jul-2002  gehenna catch up with -current.
 1.1.14.1 14-Jul-2002  gehenna catch up with -current.
 1.1.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vidc20config.h was added on branch kqueue on 2002-01-10 19:38:21 +0000
 1.1.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidc20config.h was added on branch nathanw_sa on 2002-06-20 03:38:13 +0000
 1.4.42.1 03-Sep-2006  yamt sync with head.
 1.4.38.1 09-Sep-2006  rpaulo sync with head
 1.4.24.1 30-Dec-2006  yamt sync with head.
 1.5.62.2 04-May-2009  yamt sync with head.
 1.5.62.1 16-May-2008  yamt sync with head.
 1.5.60.2 04-Jun-2008  yamt sync with head
 1.5.60.1 18-May-2008  yamt sync with head.
 1.5.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.62 27-Sep-2022  skrll malloc -> kmem
 1.61 03-Feb-2021  isaki Remove a comment no longer correct.
Because halt_output is no longer called from an interrupt context,
but that does not mean it's better to put this back to halt_output.
 1.60 23-Feb-2020  isaki branches: 1.60.6;
Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
 1.59 08-Jun-2019  isaki branches: 1.59.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.58 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.57 16-Mar-2019  isaki branches: 1.57.2;
Use C99 style struct initializer to audio_hw_if.
 1.56 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.55 13-Dec-2016  christos branches: 1.55.14; 1.55.16;
back to passing device_t
 1.54 09-Dec-2016  christos audiobell now only needs the unit.
 1.53 25-Oct-2014  skrll branches: 1.53.2; 1.53.4;
Remove katelib.h and references to it.

{Read,Write}{Word,Byte} macros are provided in the files that still use
them. Someone(tm) should convert them to bus_space(9)
 1.52 13-Sep-2014  matt Replace more vm_offset_t, vm_size_t with vaddr_t, vsize_t
Use paddr_t for msgbufphys
 1.51 10-Oct-2012  skrll Use device_xname.

From chuq.
 1.50 14-May-2012  skrll branches: 1.50.2;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.49 10-May-2012  skrll KNF
 1.48 24-Nov-2011  mrg branches: 1.48.2;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
 1.47 23-Nov-2011  jmcneill Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.46 01-Mar-2008  chris branches: 1.46.38; 1.46.40;
Fix acorn32 console beep to actually beep, rather than the kernel say:
aurateconv_fetch_to: internal error: unsupported encoding: enc=1 prec=8

The issue was that the playback filters for audio were being added to the
list in the wrong order. The first entry in the list is closest to the
hardware, the last is closest to the audio buffer. The code thought it
the other way around, so the incorrect formats were being passed down the
filter list.
 1.45 22-Feb-2007  thorpej branches: 1.45.2; 1.45.22; 1.45.24; 1.45.40; 1.45.44;
TRUE -> true, FALSE -> false
 1.44 14-Aug-2006  bjh21 branches: 1.44.8;
Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.43 11-Dec-2005  christos branches: 1.43.4; 1.43.8;
merge ktrace-lwp.
 1.42 15-Jan-2005  kent branches: 1.42.10;
ansify and KNF
 1.41 10-Jan-2005  kent merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
 1.40 29-Oct-2004  yamt branches: 1.40.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.
 1.39 13-Mar-2004  bjh21 Add support for using the MI pckbd and pms drivers with the IOMD keyboard
and mouse ports, with a new driver, iomdkbc(4).
 1.38 25-Jan-2004  bjh21 Remove spurious inclusion of obsolete <arch/arm/iomd/waveform.h>.
 1.37 18-Jan-2004  bjh21 vidcaudio_set_params() must return a value (oops!).
 1.36 17-Jan-2004  bjh21 Change the control flow in vidcaudio_set_params() so as to make the indentation
less hairy.
 1.35 17-Jan-2004  bjh21 Adjust vt(4) (WHICH MUST DIE) to the new way of handling bells on
NetBSD/acorn32.
 1.34 17-Jan-2004  bjh21 Use audiobell for system beeps on acorn32 when vidcaudio(4) is compiled in.
Remove the vestigal sysbeep device and replace it with the same kind of
mechanism that pckbd(4) uses to find the bell, which is just as ugly, but
more standard. Adapt beep(4) to the new world (though I'm not sure it
deserves to live).
 1.33 10-Jan-2004  bjh21 The VIDC20 data sheet doesn't define the polarity of the sign bit for
8-bit VIDC audio. Both Richard Earnshaw and I had guessed that a set
bit was positive (the same as normal mu-law), but the AudioWorks
manual, and Sound_SoundLog on RISC OS, seem to disagree. Change
MULAW_TO_VIDC to match Sound_SoundLog, since the latter is probably
definitive.
 1.32 03-Jan-2004  chris Currently the eb7500atx doesn't have a cmos_read function, however it also
won't use the RPC600_IOMD_ID code path, so disable that code path for the
eb7500atx.
 1.31 01-Jan-2004  bjh21 No need to #include "vidcaudio.h" here, so don't do it.
 1.30 01-Jan-2004  bjh21 Rather than calling pmap_extract() from an IPL_AUDIO interrupt handler (which
is naughty even if it does work), find out the complete list of physical pages
we'll have to DMA from in vidcaudio_trigger_output() and save it for use by
the interrupt handler.
 1.29 01-Jan-2004  bjh21 Restore a call to vidcaudio_ctrl() that I accidentally deleted.
 1.28 01-Jan-2004  bjh21 Tidy up debugging printfs to use a single #ifdef and a DPRINTF() macro,
rather than #ifdefs scattered all over the code.
 1.27 01-Jan-2004  bjh21 Add possibly-useful support for 16-bit sound on VIDC20 systems, using
RISC OS's "*Configure SoundSystem" setting to decide whether to use 16-bit
mode. Loosely based on parts of Richard Earnshaw's "sound16" patch.
 1.26 31-Dec-2003  bjh21 When returning our actual sample rate to audio(4) in 16-bit mode, use the right
base clock rate.
 1.25 31-Dec-2003  bjh21 Make local functions static.
 1.24 31-Dec-2003  bjh21 Substantial rewrite of vidcaudio(4). I don't know if the old version
had ever worked, but if it had, it had bit-rotted so far that it
almost all needed replacing. The new version support both 8-bit sound
on the VIDC20 and 16-bit sound on the ARM7500 and ARM7500FE.
sysbeep() support has been lost, but I'm not sure whether that belongs
here or in audio(4) anyway. Support for 16-bit sound on the VIDC20
isn't present because I don't have the hardware to test it. Donations
welcome!
 1.23 29-Dec-2003  bjh21 speaker_ctl() is optional, and vidcaudio_speaker_ctl() did nothing, so kill it.
 1.22 29-Dec-2003  bjh21 Control debugging with VIDCAUDIO_DEBUG rather that DEBUG, to avoid confusion
with the global kernel macro called DEBUG.
 1.21 29-Dec-2003  bjh21 Minor KNF.
 1.20 29-Dec-2003  bjh21 Fix a DEBUG printf.
 1.19 29-Dec-2003  bjh21 Use NULL rather than 0 to initialise unused function pointers.
 1.18 29-Dec-2003  bjh21 KNF.
 1.17 29-Dec-2003  bjh21 ANSIfy, un-__P().
 1.16 06-Dec-2003  bjh21 Don't complain if we're asked for != 8 channels. There's no actual support
for fewer channels yet, but this is necessary just to avoid a boot-time panic.
 1.15 26-Oct-2003  jdolecek fix NULL vs. 0 usage
 1.14 01-Apr-2003  thorpej branches: 1.14.2;
Use PAGE_SIZE rather than NBPG.
 1.13 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.12 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.9 16-Jun-2002  bjh21 struct vidcaudio_softc.iobase was unused other than to initialise it. G/C it.
This also means that the "aux" parameter to vidcaudio_attach is unused.
 1.8 10-Apr-2002  thorpej branches: 1.8.2;
vm_offset_t -> vaddr_t,paddr_t
 1.7 05-Apr-2002  thorpej * Rewrite the 32-bit ARM pte.h based on the ARM architecture manual.
Significant cleanup, here, including better PTE bit names.
* Add XScale PTE extensions (ECC enable, write-allocate cache mode).
* Mechanical changes everywhere else to update for new pte.h. While
doing this, two bugs (as a result of typos) were fixed in

arm/arm32/bus_dma.c
evbarm/integrator/int_bus_dma.c
 1.6 10-Mar-2002  bjh21 __RCSID -> __KERNEL_RCSID
 1.5 18-Feb-2002  bjh21 Add prototypes to all declarations of function pointers.
Include <arch/arm/iomd/vidcaudiovar.h> for vidcaudio_beep_generate() prototype.
Add in-core RCSID.
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.7 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.6 20-Jun-2002  nathanw Catch up to -current.
 1.2.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.2.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file vidcaudio.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.4.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file vidcaudio.c was added on branch kqueue on 2002-01-10 19:38:21 +0000
 1.8.2.1 14-Jul-2002  gehenna catch up with -current.
 1.14.2.5 17-Jan-2005  skrll Sync with HEAD.
 1.14.2.4 02-Nov-2004  skrll Sync with HEAD.
 1.14.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.40.2.3 09-Jan-2005  kent audio_hw_if change
* make open() and close() optional
* add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()
 1.40.2.2 05-Jan-2005  kent introduce FILTER_LOOP_PROLOGUE() and FILTER_LOOP_EPILOGUE() macros, and
simplify filter implementations by the macros.
 1.40.2.1 03-Jan-2005  kent adopt the filter pipeline framework
 1.42.10.3 17-Mar-2008  yamt sync with head.
 1.42.10.2 26-Feb-2007  yamt sync with head.
 1.42.10.1 30-Dec-2006  yamt sync with head.
 1.43.8.1 03-Sep-2006  yamt sync with head.
 1.43.4.1 09-Sep-2006  rpaulo sync with head
 1.44.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.45.44.1 03-Apr-2008  mjf Sync with HEAD.
 1.45.40.1 24-Mar-2008  keiichi sync with head.
 1.45.24.1 23-Mar-2008  matt sync with HEAD
 1.45.22.2 21-Mar-2008  chris Sync with head.
 1.45.22.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.45.2.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.46.40.2 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.46.40.1 20-Nov-2011  mrg port to audiomp: get_locks support, stream filter updates, remove IPL_AUDIO

not run time tested.
 1.46.38.3 30-Oct-2012  yamt sync with head
 1.46.38.2 23-May-2012  yamt sync with head.
 1.46.38.1 17-Apr-2012  yamt sync with head
 1.48.2.1 02-Jun-2012  mrg sync to latest -current.
 1.50.2.2 03-Dec-2017  jdolecek update from HEAD
 1.50.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.53.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.53.2.1 05-Feb-2017  skrll Sync with HEAD
 1.55.16.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.55.16.1 10-Jun-2019  christos Sync with HEAD
 1.55.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.57.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.57.2.2 04-May-2019  isaki Move dev/audiobell* -> dev/audio/audiobell*.
 1.57.2.1 21-Apr-2019  isaki Adapt to audio2.
 1.59.4.1 29-Feb-2020  ad Sync with head.
 1.60.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 18-Feb-2002  bjh21 branches: 1.1.2; 1.1.8;
Add a vidcaudiovar.h to contain a prototype for vidcaudio_beep_generate().
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 18-Feb-2002  jdolecek file vidcaudiovar.h was added on branch kqueue on 2002-03-16 15:56:14 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 18-Feb-2002  nathanw file vidcaudiovar.h was added on branch nathanw_sa on 2002-02-28 04:07:40 +0000
 1.51 05-Jan-2025  andvar Fix some typos in comments.
 1.50 27-Sep-2022  skrll branches: 1.50.10;
Remove unnecessary sys/malloc.h include
 1.49 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.48 20-Aug-2021  andvar fix various typos in comments and log messages.
 1.47 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.46 24-Apr-2021  thorpej branches: 1.46.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.45 24-Jan-2018  riastradh branches: 1.45.18;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.
 1.44 21-Jan-2014  christos tuck in variables that are only used in the #if 0 block
 1.43 14-May-2012  skrll branches: 1.43.2; 1.43.4;
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
 1.42 10-May-2012  skrll u_int*_t -> uint*_t
 1.41 14-Feb-2012  skrll Whitespace in previous.

Ride previous releng OK.
 1.40 14-Feb-2012  skrll Pass RI_NO_AUTO to rasops_init so that rasops doesn't attempt to allocate
memory as we're too early in kernel startup for this.

My A7000 boots now.

OK releng. ack 3 nak 0.
 1.39 01-Jul-2011  dyoung branches: 1.39.2; 1.39.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.38 21-Oct-2009  snj Remove 3rd and 4th clauses. OK'd by Tohru Nishimura and Reinoud Zandijk
(copyright holders).
 1.37 18-Mar-2009  cegger bzero -> memset
 1.36 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.35 29-Apr-2008  matt branches: 1.35.8; 1.35.14;
Change IPL_LEVELS to NIPL.
current_spl_level is dead.
 1.34 29-Feb-2008  chris branches: 1.34.2; 1.34.4;
Misc updates to hopefully improve vidcvideo console usability:
* add virtual consoles by using wsdisplay_vcons
* make use of generic scrollback support for consoles
* enable colour support for vidcvideo consoles
* use the default NetBSD font, rather than picking a sony one
* make kernel output green, so it's obvious.

This was tested at 800x600 in 8bpp on an A7000+ and 2MB VRAM RiscPC.

To actually benefit from these changes wscons=YES needs to be added to
your rc.conf
 1.33 05-Feb-2008  chris branches: 1.33.2; 1.33.6;
Fix up vidcvideo to be useable on a Write-Back processor, IE StrongArm,
during boot and ddb.

This is done by routing all requests for changes to the screen into one
function. The function can then determine if interrupts are enabled or
disabled, and either flush them to screen immediately or set them up for
the next flyback irq.

Also if we have nothing to do, disable the flyback irq, and re-enable when
we have something to do. This avoids taking an interrupt for every vsync,
IE 50-75Hz, just to do nothing.

This makes ddb usable and the boot dmesg visable with an SA.

lmbench now reports that the A7000+ has a 14Mhz CPU, rather than 4Mhz
(it's actually 48Mhz)

Tested on SA Risc-PC and A7000+
 1.32 03-Feb-2008  chris Use memmove rather than memcpy when moving rows around the framebuffer.

This fixes a problem where scrolling down fills the whole screen with the
first line on screen.
 1.31 04-Mar-2007  christos branches: 1.31.16; 1.31.20; 1.31.22; 1.31.28;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30 24-Jan-2007  hubertf branches: 1.30.2;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.29 21-Oct-2006  bjh21 Remove cruft left over from when this code was copied from some TURBOchannel
framebuffer or other.
 1.28 19-Aug-2006  bjh21 branches: 1.28.2; 1.28.4;
Arrange things so that if MONITOR isn't defined in the kernel configration,
we use the standard mode list from videomode.c rather than one generated
by makemodes.awk. This is less useful than it might be since without a useful
frame rate from the bootloader we're likely to end up choosing a screen mode
that's either flickery or too fast for the monitor (or DRAM bandwidth).
 1.27 17-Aug-2006  bjh21 Switch to using the MI struct videomode for storing VIDC video timings.
struct videomode doesn't have a way to record border widths (though I
wonder if VESA's "margins" are the same thing), so we now just treat them
as zero. Tested on my NC, which still seems to be working.
 1.26 05-Aug-2006  bjh21 bcopy -> memcpy
bzero -> memset
 1.25 05-Aug-2006  bjh21 ANSIfy, un-__P, and generally KNF.
 1.24 25-Apr-2006  snj s/allready/already/
 1.23 15-Apr-2006  jmmv Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.
 1.22 12-Apr-2006  jmmv Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.21 11-Dec-2005  christos branches: 1.21.4; 1.21.6; 1.21.8; 1.21.10; 1.21.12;
merge ktrace-lwp.
 1.20 13-Nov-2003  chs branches: 1.20.16;
eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.19 07-Nov-2003  he Suppress apparently-bogus -Wunitialized warnings, the compiler does
not detect that set / use occur under equal conditions in following
if() statements.
 1.18 24-Oct-2003  chris Don't pass NULL as an integer.
 1.17 06-May-2003  reinoud branches: 1.17.2;
Some entries were missing so i'd better add them for completion.
 1.16 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.15 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 06-Aug-2002  itojun integer overflow. from silvio@qualys.com
 1.13 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.12 19-Jun-2002  bjh21 Move over to using a 6:5:5 R:G:B palette in 16-bit display modes, and abstract
the palette generation to work with arbitrary numbers of bits.
This allows X to work after a fashion, since it tries to put the VIDC into
a 6:5:5 mode itself (which we ignore). Anything that actually tries to take
advantage of the DirectColor visual it offers will still be screwed, but I
hope such applications are rare.
 1.11 03-Apr-2002  reinoud branches: 1.11.2; 1.11.4;
Fix the mmap'ing of the screen memory. The way it was implemented
completely sucked... I wonder how it was even working (....)

Thanks to Jason for pointing out the problem.
 1.10 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.9 23-Mar-2002  reinoud Big rototil of the vidcvideo code to cleanup illogical structures and to
incorporate write back support for processors not having a write through
cache.

The current fb_devconfig structure now really holds the device's
configuration and the softc really only holds the attachment information.
This used to be mixed giving rise to weird stuctures and cross references.

The number of vertical syncs before the video memory writeback is triggered
is configurable ... default is to wait for 5 Vsync .. aprox minumum 10
times a second, but more likely in the order of 12,5 times a second. When
printing is in progress no write back is performed... only after the
waiting time. The reasoning behind this is that as long as the screen is
printed too the cache will be purged of dirty data anyway due to the
processing and new screen memory useage.
 1.8 23-Mar-2002  reinoud Fix up typos.
 1.7 23-Mar-2002  reinoud Fix typo.
 1.6 23-Mar-2002  reinoud Allthough this patch doesn't look that much it adds a few things that were
on the port-acorn32's TODO list for quite some time :

- when the serial console is selected, don't exclude the screen
alltogether; currently the keyboard is still not attached but that might be
a configuration problem in the GENERIC console or a failure to explicitly
connect to a wsmux. This needs further investigation.

- create a framework for the display memory writeback on vsync for
StrongARM processors since they don't have a write-trough cache. This is to
solve the lazy screen update that is very evident in single user mode on
these processors; the cache isn't flushed/written back that often and parts
of the screen can thus be resident in the cache but not written out to
memory yet.

- clean up some loose ends in the code.
 1.5 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.4 13-Mar-2002  ad Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
 1.3 18-Feb-2002  bjh21 Add a prototype for vidcvideo_config_wscons().
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.8 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.7 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.6 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.5 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidcvideo.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.2.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file vidcvideo.c was added on branch kqueue on 2002-01-10 19:38:21 +0000
 1.11.4.2 07-Aug-2002  lukem Pull up revision 1.14 (requested by itojun in ticket #616):
integer overflow. from silvio@qualys.com
 1.11.4.1 21-Jun-2002  lukem Pull up revision 1.12 (requested by bjh21 in ticket #328):
Move over to using a 6:5:5 R:G:B palette in 16-bit display modes, and abstract
the palette generation to work with arbitrary numbers of bits.
This allows X to work after a fashion, since it tries to put the VIDC into
a 6:5:5 mode itself (which we ignore). Anything that actually tries to take
advantage of the DirectColor visual it offers will still be screwed, but I
hope such applications are rare.
 1.11.2.2 30-Aug-2002  gehenna catch up with -current.
 1.11.2.1 16-Jul-2002  gehenna catch up with -current.
 1.17.2.4 21-Nov-2004  skrll Adapt to branch
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.16.7 17-Mar-2008  yamt sync with head.
 1.20.16.6 11-Feb-2008  yamt sync with head.
 1.20.16.5 04-Feb-2008  yamt sync with head.
 1.20.16.4 03-Sep-2007  yamt sync with head.
 1.20.16.3 26-Feb-2007  yamt sync with head.
 1.20.16.2 30-Dec-2006  yamt sync with head.
 1.20.16.1 21-Jun-2006  yamt sync with head.
 1.21.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.21.10.2 11-May-2006  elad sync with head
 1.21.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.21.8.3 03-Sep-2006  yamt sync with head.
 1.21.8.2 11-Aug-2006  yamt sync with head
 1.21.8.1 24-May-2006  yamt sync with head.
 1.21.6.2 01-Jun-2006  kardel Sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.28.4.1 22-Oct-2006  yamt sync with head
 1.28.2.2 01-Feb-2007  ad Sync with head.
 1.28.2.1 18-Nov-2006  ad Sync with head.
 1.30.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.31.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.31.22.1 23-Mar-2008  matt sync with HEAD
 1.31.20.4 21-Mar-2008  chris Sync with head.
 1.31.20.3 09-Feb-2008  chris Fixup vidcvideo, current_spl_level is replaced with current_ipl_level.
 1.31.20.2 09-Feb-2008  chris Sync to HEAD.
 1.31.20.1 09-Feb-2008  chris Add initial reworking of acorn32 to use new interrupt code.

Note that cats probably won't work currently as acorn32 changed the way
that the pic is registered, it has to provide the irq lines as on acorn32
we attach the iomd after we need to register irqs for the pioc. So we
setup the irqs for iomd before malloc etc are available. This needs
to be fixed.

More work is still needed to update most of the podulebus drivers.
First I need to add podulebus wrapper for interrupts that handles the
maskaddr and maskbits. Exposing them to the common irq code is wrong.
 1.31.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.33.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.33.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.33.2.1 24-Mar-2008  keiichi sync with head.
 1.34.4.3 11-Mar-2010  yamt sync with head
 1.34.4.2 04-May-2009  yamt sync with head.
 1.34.4.1 16-May-2008  yamt sync with head.
 1.34.2.1 18-May-2008  yamt sync with head.
 1.35.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.35.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.39.6.2 02-Jun-2012  mrg sync to latest -current.
 1.39.6.1 18-Feb-2012  mrg merge to -current.
 1.39.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.39.2.2 23-May-2012  yamt sync with head.
 1.39.2.1 17-Apr-2012  yamt sync with head
 1.43.4.1 18-May-2014  rmind sync with head
 1.43.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.45.18.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.46.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.50.10.1 02-Aug-2025  perseant Sync with HEAD
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 15-Aug-2006  bjh21 branches: 1.3.58; 1.3.60; 1.3.62;
Un-__P
 1.2 23-Mar-2002  reinoud branches: 1.2.28; 1.2.42; 1.2.46;
Big rototil of the vidcvideo code to cleanup illogical structures and to
incorporate write back support for processors not having a write through
cache.

The current fb_devconfig structure now really holds the device's
configuration and the softc really only holds the attachment information.
This used to be mixed giving rise to weird stuctures and cross references.

The number of vertical syncs before the video memory writeback is triggered
is configurable ... default is to wait for 5 Vsync .. aprox minumum 10
times a second, but more likely in the order of 12,5 times a second. When
printing is in progress no write back is performed... only after the
waiting time. The reasoning behind this is that as long as the screen is
printed too the cache will be purged of dirty data anyway due to the
processing and new screen memory useage.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vidcvideo.h was added on branch kqueue on 2002-01-10 19:38:22 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 05-Oct-2001  nathanw file vidcvideo.h was added on branch nathanw_sa on 2002-04-01 07:39:12 +0000
 1.2.46.1 03-Sep-2006  yamt sync with head.
 1.2.42.1 09-Sep-2006  rpaulo sync with head
 1.2.28.1 30-Dec-2006  yamt sync with head.
 1.3.62.1 16-May-2008  yamt sync with head.
 1.3.60.1 18-May-2008  yamt sync with head.
 1.3.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 25-Jan-2004  bjh21 Remove the "beep" driver. Its function is largely subsumed by a
combination of audio(4), wskbd(4) and audiobell(). Proposed a week
ago on port-acorn32 with no reaction whatever.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file waveform.h was added on branch kqueue on 2002-01-10 19:38:22 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file waveform.h was added on branch nathanw_sa on 2001-10-05 22:27:44 +0000
 1.2 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.40; 1.1.54; 1.1.58;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.58.1 03-Sep-2006  yamt sync with head.
 1.1.54.1 09-Sep-2006  rpaulo sync with head
 1.1.40.1 30-Dec-2006  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file wskbdmap_mfii.h was added on branch kqueue on 2002-01-10 19:38:23 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file wskbdmap_mfii.h was added on branch nathanw_sa on 2001-10-05 22:27:45 +0000
 1.9 13-Mar-2004  bjh21 Rename wsqms(4) to qms(4), since the "ws" is redundant now. While I'm here,
bundle it all into a single file, qms.c, replacing wsqms.c, wsqms_iomd.c,
and wsqmsvar.h.
 1.8 20-Jun-2002  bjh21 branches: 1.8.8;
Rather than explicitly masking and sign-extending 16-bit integers, use
u_int16_t and int16_t for the X and Y count registers. GCC produces better
code this way.

Also, initialise the stored state in wsqms_enable(), so that the mouse doesn't
warp to a random position on open.
 1.7 19-Jun-2002  bjh21 More wsqms cleanups:
sc_flags was never read. G/C it.
wsqms_attach() took two arguments that pointed to the same structure. G/C one
of them
Since wsqms controls the same device as qms, have it match the same attach
args.
 1.6 19-Jun-2002  bjh21 ANSIfy, un-__P, clean comments a little.
 1.5 19-Jun-2002  bjh21 Substantial overhaul of the wsqms driver:
Use a callout rather than hanging off the VSYNC interrupt.
Don't emit WSMOUSE_INPUT_ABSOLUTE events, since this isn't an absolute device.
Handle counter wrap-around sensibly, rather than limiting counts.
Don't gratuitously copy sc->sc_dev onto itself at attach time.
 1.4 04-Apr-2002  reinoud branches: 1.4.2;
Also provide differential coordinate updates... pitty it can't be choosen
or specified in wscons itself. The absolute coordinates are broadcasted
_after_ the relative so a program that takes both won't get confused.
 1.3 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.2 27-Nov-2001  thorpej branches: 1.2.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file wsqms.c was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file wsqms.c was added on branch kqueue on 2002-01-10 19:38:23 +0000
 1.4.2.1 16-Jul-2002  gehenna catch up with -current.
 1.8.8.1 03-Aug-2004  skrll Sync with HEAD
 1.9 13-Mar-2004  bjh21 Rename wsqms(4) to qms(4), since the "ws" is redundant now. While I'm here,
bundle it all into a single file, qms.c, replacing wsqms.c, wsqms_iomd.c,
and wsqmsvar.h.
 1.8 02-Oct-2002  thorpej branches: 1.8.8;
Add trailing ; to CFATTACH_DECL
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 19-Jun-2002  bjh21 More wsqms cleanups:
sc_flags was never read. G/C it.
wsqms_attach() took two arguments that pointed to the same structure. G/C one
of them
Since wsqms controls the same device as qms, have it match the same attach
args.
 1.4 19-Jun-2002  bjh21 ANSIfy, un-__P, clean comments a little.
 1.3 19-Jun-2002  bjh21 Substantial overhaul of the wsqms driver:
Use a callout rather than hanging off the VSYNC interrupt.
Don't emit WSMOUSE_INPUT_ABSOLUTE events, since this isn't an absolute device.
Handle counter wrap-around sensibly, rather than limiting counts.
Don't gratuitously copy sc->sc_dev onto itself at attach time.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file wsqms_iomd.c was added on branch nathanw_sa on 2002-01-08 00:23:17 +0000
 1.2.10.1 16-Jul-2002  gehenna catch up with -current.
 1.2.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file wsqms_iomd.c was added on branch kqueue on 2002-01-10 19:38:24 +0000
 1.8.8.1 03-Aug-2004  skrll Sync with HEAD
 1.6 13-Mar-2004  bjh21 Rename wsqms(4) to qms(4), since the "ws" is redundant now. While I'm here,
bundle it all into a single file, qms.c, replacing wsqms.c, wsqms_iomd.c,
and wsqmsvar.h.
 1.5 20-Jun-2002  bjh21 branches: 1.5.8;
Rather than explicitly masking and sign-extending 16-bit integers, use
u_int16_t and int16_t for the X and Y count registers. GCC produces better
code this way.
 1.4 19-Jun-2002  bjh21 More wsqms cleanups:
sc_flags was never read. G/C it.
wsqms_attach() took two arguments that pointed to the same structure. G/C one
of them
Since wsqms controls the same device as qms, have it match the same attach
args.
 1.3 19-Jun-2002  bjh21 Un-__P. Clean up comments.
 1.2 19-Jun-2002  bjh21 Substantial overhaul of the wsqms driver:
Use a callout rather than hanging off the VSYNC interrupt.
Don't emit WSMOUSE_INPUT_ABSOLUTE events, since this isn't an absolute device.
Handle counter wrap-around sensibly, rather than limiting counts.
Don't gratuitously copy sc->sc_dev onto itself at attach time.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.14;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.14.1 16-Jul-2002  gehenna catch up with -current.
 1.1.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file wsqmsvar.h was added on branch kqueue on 2002-01-10 19:38:24 +0000
 1.1.4.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file wsqmsvar.h was added on branch nathanw_sa on 2002-08-01 02:41:18 +0000
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.7 16-Aug-2006  he Remove an unneeded include of the now-deleted <arm/iomd/rpckbdvar.h>.
 1.6 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8;
merge ktrace-lwp.
 1.4 13-Mar-2004  bjh21 branches: 1.4.16;
Add support for using the MI pckbd and pms drivers with the IOMD keyboard
and mouse ports, with a new driver, iomdkbc(4).
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 22-Mar-2002  reinoud branches: 1.2.12;
If the serial console is asked for then dont forget to define the function
prototype for connecting the serial console....
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file consinit.c was added on branch kqueue on 2002-01-10 19:38:25 +0000
 1.1.4.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.1 05-Oct-2001  nathanw file consinit.c was added on branch nathanw_sa on 2002-04-01 07:39:14 +0000
 1.2.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.12.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.8.1 03-Sep-2006  yamt sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.18 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.17 23-Jul-2006  ad Use the LWP cached credentials where sane.
 1.16 14-May-2006  elad integrate kauth.
 1.15 15-Apr-2006  matt switch from MALLOC to malloc
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
merge ktrace-lwp.
 1.13 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 09-Jun-2005  he branches: 1.12.2;
Adapt to compiling with -Wcast-qual and -Wshadow.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 23-Oct-2002  jdolecek branches: 1.10.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.9 08-Oct-2002  jdolecek branches: 1.9.2;
tag the cdevsw as tty with D_TTY
 1.8 05-Oct-2002  chs add missing protos, clean up includes.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 17-Mar-2002  atatat branches: 1.3.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.2 22-Nov-2001  thorpej branches: 1.2.2;
Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.9 11-Nov-2002  nathanw Catch up to -current
 1.1.4.8 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.7 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.1.4.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.1.4.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.3 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.2 15-Nov-2001  thorpej Machine-dependent kernel mods for scheduler activations on
32-bit ARM processors. Kernel boots multi-user on an XScale,
but upcalls not yet tested.
 1.1.4.1 05-Oct-2001  thorpej file console.c was added on branch nathanw_sa on 2001-11-15 08:30:11 +0000
 1.2.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3 17-Jun-2002  jdolecek provide kqfilter hooks
XXX not tested
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 22-Nov-2001  thorpej file console.c was added on branch kqueue on 2002-01-10 19:38:25 +0000
 1.3.4.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.9.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.10.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.2 03-Aug-2004  skrll Sync with HEAD
 1.10.6.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.14.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.10.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.14.10.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.14.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.14.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.14.8.3 03-Sep-2006  yamt sync with head.
 1.14.8.2 11-Aug-2006  yamt sync with head
 1.14.8.1 24-May-2006  yamt sync with head.
 1.14.6.2 01-Jun-2006  kardel Sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.2 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.1 05-Oct-2002  chs branches: 1.1.2; 1.1.4; 1.1.28; 1.1.42; 1.1.46;
add missing protos, clean up includes.
 1.1.46.1 03-Sep-2006  yamt sync with head.
 1.1.42.1 09-Sep-2006  rpaulo sync with head
 1.1.28.1 30-Dec-2006  yamt sync with head.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2002  nathanw file console.h was added on branch nathanw_sa on 2002-10-18 02:35:35 +0000
 1.1.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.1 05-Oct-2002  jdolecek file console.h was added on branch kqueue on 2002-10-10 18:31:53 +0000
 1.4 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.24.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file debugconsole.c was added on branch kqueue on 2002-01-10 19:38:26 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file debugconsole.c was added on branch nathanw_sa on 2001-10-05 22:27:46 +0000
 1.2.16.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 03-Sep-2006  yamt sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.6 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8;
merge ktrace-lwp.
 1.4 06-Aug-2004  skrll branches: 1.4.12;
Include <sys/cdefs.h> once.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 05-Oct-2002  chs branches: 1.2.8;
add missing protos, clean up includes.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file dumb.c was added on branch kqueue on 2002-01-10 19:38:26 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file dumb.c was added on branch nathanw_sa on 2002-10-18 02:35:35 +0000
 1.2.8.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.2 12-Aug-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.12.1 30-Dec-2006  yamt sync with head.
 1.5.8.1 03-Sep-2006  yamt sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8;
merge ktrace-lwp.
 1.3 15-Jul-2003  lukem branches: 1.3.16;
__KERNEL_RCSID()
 1.2 22-Nov-2001  thorpej branches: 1.2.2; 1.2.20;
Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidc.c was added on branch nathanw_sa on 2002-01-08 00:23:17 +0000
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 22-Nov-2001  thorpej file vidc.c was added on branch kqueue on 2002-01-10 19:38:27 +0000
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.8.1 03-Sep-2006  yamt sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.2 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.40; 1.1.54; 1.1.58;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.58.1 03-Sep-2006  yamt sync with head.
 1.1.54.1 09-Sep-2006  rpaulo sync with head
 1.1.40.1 30-Dec-2006  yamt sync with head.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vidc_mc.S was added on branch kqueue on 2002-01-10 19:38:27 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file vidc_mc.S was added on branch nathanw_sa on 2001-10-05 22:27:46 +0000
 1.12 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.8;
merge ktrace-lwp.
 1.10 15-Jul-2003  lukem branches: 1.10.16;
__KERNEL_RCSID()
 1.9 23-Oct-2002  jdolecek branches: 1.9.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.8 05-Oct-2002  chs branches: 1.8.2;
add missing protos, clean up includes.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.3 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.2 27-Nov-2001  thorpej branches: 1.2.2; 1.2.10;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.1 05-Oct-2001  reinoud branches: 1.1.4;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.5 11-Nov-2002  nathanw Catch up to -current
 1.1.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vidcconsole.c was added on branch nathanw_sa on 2002-01-08 00:23:17 +0000
 1.2.10.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.2.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 27-Nov-2001  thorpej file vidcconsole.c was added on branch kqueue on 2002-01-10 19:38:28 +0000
 1.8.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.9.6.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.3 18-Sep-2004  skrll Sync with HEAD.
 1.9.6.2 03-Aug-2004  skrll Sync with HEAD
 1.9.6.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.10.16.2 30-Dec-2006  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.11.8.1 03-Sep-2006  yamt sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.19 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.18 24-Dec-2005  perry branches: 1.18.4; 1.18.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.17 11-Dec-2005  christos merge ktrace-lwp.
 1.16 09-Jun-2005  he branches: 1.16.2;
Adapt to compiling with -Wcast-qual and -Wshadow.
 1.15 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.14 11-Feb-2005  simonb White space nit- don't put a space before/after increment/decrement
operators.
 1.13 21-Sep-2003  matt branches: 1.13.8; 1.13.10;
Fix GCC 3.3.1 nits
 1.12 15-Jul-2003  lukem __KERNEL_RCSID()
 1.11 01-Apr-2003  thorpej branches: 1.11.2;
Use PAGE_SIZE rather than NBPG.
 1.10 05-Oct-2002  chs add missing protos, clean up includes.
 1.9 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.8 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.7 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.6 24-Mar-2002  thorpej branches: 1.6.2;
* arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.5 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.4 27-Nov-2001  thorpej branches: 1.4.2;
Use <machine/intr.h> rather than <machine/irqhandler.h>
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 17-Oct-2001  reinoud branches: 1.2.4;
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.
 1.1 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.2.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.4.4 17-Sep-2002  nathanw Catch up to -current.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.4.1 17-Oct-2001  nathanw file vidcrender.c was added on branch nathanw_sa on 2002-01-08 00:23:17 +0000
 1.4.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 27-Nov-2001  thorpej file vidcrender.c was added on branch kqueue on 2002-01-10 19:38:28 +0000
 1.6.2.1 19-May-2002  gehenna Remove hard-coded major.
 1.11.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.6 01-Apr-2005  skrll Sync with HEAD.
 1.11.2.5 15-Feb-2005  skrll Sync with HEAD.
 1.11.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.2 03-Aug-2004  skrll Sync with HEAD
 1.11.2.1 03-Jul-2003  wrstuden lwp-ify a lot of the arm drivers. Needed to get acorn32/GENERIC compiling.
 1.13.10.2 12-Feb-2005  yamt sync with head.
 1.13.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.13.8.1 29-Apr-2005  kent sync with -current
 1.16.2.2 30-Dec-2006  yamt sync with head.
 1.16.2.1 21-Jun-2006  yamt sync with head.
 1.18.8.1 03-Sep-2006  yamt sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.8 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.8;
merge ktrace-lwp.
 1.6 09-Jun-2005  he branches: 1.6.2;
Adapt to compiling with -Wcast-qual by constifying vt220_putstring()'s
first argument. Also gets rid of unneccessary casts to (u_char*).
 1.5 13-Mar-2004  bjh21 Remove support for freezing console on mouse-button presses, since that was
dependent on the old qms(4) driver, which is gone.
 1.4 17-Jan-2004  bjh21 Adjust vt(4) (WHICH MUST DIE) to the new way of handling bells on
NetBSD/acorn32.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 05-Oct-2002  chs branches: 1.2.8;
add missing protos, clean up includes.
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vt220.c was added on branch kqueue on 2002-01-10 19:38:29 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 05-Oct-2001  nathanw file vt220.c was added on branch nathanw_sa on 2002-10-18 02:35:35 +0000
 1.2.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.6.2.1 30-Dec-2006  yamt sync with head.
 1.7.8.1 03-Sep-2006  yamt sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.4 14-Aug-2006  bjh21 Finally remove the old, pre-wscons, acorn32 console code. This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long. It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 09-Jun-2005  he branches: 1.2.2;
Adapt to compiling with -Wcast-qual by constifying vt220_putstring()'s
first argument. Also gets rid of unneccessary casts to (u_char*).
 1.1 05-Oct-2001  reinoud branches: 1.1.4; 1.1.6; 1.1.24;
Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 05-Oct-2001  thorpej file vt220.h was added on branch kqueue on 2002-01-10 19:38:29 +0000
 1.1.4.2 05-Oct-2001  reinoud Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
 1.1.4.1 05-Oct-2001  reinoud file vt220.h was added on branch nathanw_sa on 2001-10-05 22:27:46 +0000
 1.2.2.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 03-Sep-2006  yamt sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 13-Jul-2003  igy using common bus_space_tag in ixpsip too
 1.4 17-Feb-2003  ichiro branches: 1.4.2;
files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.3 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.2 20-Jul-2002  ichiro branches: 1.2.2; 1.2.4; 1.2.6;
attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
 1.1 15-Jul-2002  ichiro add support for ixp12x0
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 20-Jul-2002  jdolecek file files.ixp12x0 was added on branch kqueue on 2002-09-06 08:32:48 +0000
 1.2.4.2 03-Jan-2003  thorpej Sync with HEAD.
 1.2.4.1 20-Jul-2002  thorpej file files.ixp12x0 was added on branch nathanw_sa on 2003-01-03 16:41:09 +0000
 1.2.2.2 21-Jul-2002  gehenna catch up with -current.
 1.2.2.1 20-Jul-2002  gehenna file files.ixp12x0 was added on branch gehenna-devsw on 2002-07-21 13:00:29 +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.22 25-Jun-2025  andvar s/Spase/Space/ in comment.
 1.21 07-Aug-2021  thorpej branches: 1.21.12;
Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.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.19 27-Oct-2012  chs branches: 1.19.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 01-Jul-2011  dyoung branches: 1.18.2; 1.18.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.17 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.16 21-Oct-2009  rmind branches: 1.16.4; 1.16.6;
Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.15 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.14 11-Dec-2005  christos branches: 1.14.80; 1.14.88; 1.14.94;
merge ktrace-lwp.
 1.13 30-Aug-2004  drochner 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.12 15-Sep-2003  ichiro fix typo
#if DEBUG -> #ifdef PCI_DEBUG
 1.11 13-Jul-2003  igy mapping pci configuration space (not subregion)
 1.10 13-Jul-2003  igy sharing bus_space_tag among ixpio, pci mem and i/o.
 1.9 13-Jul-2003  igy using devmap for static mapping
 1.8 15-Jun-2003  fvdl branches: 1.8.2;
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.7 25-Mar-2003  igy Add __KERNEL_RCSID tags
 1.6 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.5 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.4 02-Dec-2002  ichiro changes&fix name of mapping registers
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 21-Jul-2002  ichiro branches: 1.2.2; 1.2.4;
some bug fix and cosmetic changes
 1.1 15-Jul-2002  ichiro branches: 1.1.2;
add support for ixp12x0
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0.c was added on branch gehenna-devsw on 2002-07-21 13:00:29 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 21-Jul-2002  jdolecek file ixp12x0.c was added on branch kqueue on 2002-09-06 08:32:48 +0000
 1.2.2.4 03-Jan-2003  thorpej Sync with HEAD.
 1.2.2.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 21-Jul-2002  nathanw file ixp12x0.c was added on branch nathanw_sa on 2002-10-18 02:35:36 +0000
 1.8.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.2 03-Sep-2004  skrll Sync with HEAD
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.80.2 11-Mar-2010  yamt sync with head
 1.14.80.1 04-May-2009  yamt sync with head.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 31-May-2011  rmind sync with head
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.21.12.1 02-Aug-2025  perseant Sync with HEAD
 1.19 31-Jul-2021  andvar fix more typos in style found one in file - check/fix them all.
 1.18 29-May-2020  rin branches: 1.18.6;
For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.17 12-Nov-2012  skrll C99 types
 1.16 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.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.13 28-Apr-2008  martin branches: 1.13.2;
Remove clause 3 and 4 from TNF licenses
 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-2007  christos branches: 1.11.20; 1.11.24; 1.11.26; 1.11.32; 1.11.38;
Add generic TOD support. From Bucky Katz.
 1.10 11-Dec-2005  christos branches: 1.10.20; 1.10.24;
merge ktrace-lwp.
 1.9 04-Jun-2005  he branches: 1.9.2;
Fix shadowing warnings by renaming local variables and by
removing parameter names in function prototype.
 1.8 13-Jul-2003  igy KNF
 1.7 25-Mar-2003  igy branches: 1.7.2;
Add __KERNEL_RCSID tags
 1.6 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.5 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 21-Jul-2002  ichiro branches: 1.2.2; 1.2.4;
some bug fix and cosmetic changes
 1.1 15-Jul-2002  ichiro branches: 1.1.2;
add support for ixp12x0
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_clk.c was added on branch gehenna-devsw on 2002-07-21 13:00:29 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 21-Jul-2002  jdolecek file ixp12x0_clk.c was added on branch kqueue on 2002-09-06 08:32:49 +0000
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 21-Jul-2002  nathanw file ixp12x0_clk.c was added on branch nathanw_sa on 2002-10-18 02:35:36 +0000
 1.7.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.9.2.2 21-Jan-2008  yamt sync with head
 1.9.2.1 26-Feb-2007  yamt sync with head.
 1.10.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.10.20.1 12-Jan-2007  ad Sync with head.
 1.11.38.1 20-Jan-2008  bouyer Sync with HEAD
 1.11.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.26.1 23-Mar-2008  matt sync with HEAD
 1.11.24.1 27-Jan-2008  chris Sync to HEAD.
 1.11.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.13.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.15.2.1 30-Oct-2012  yamt sync with head
 1.18.6.1 01-Aug-2021  thorpej Sync with HEAD.
 1.4 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.3 06-Mar-2003  igy branches: 1.3.110;
insert macro to protect itself against multiple includion.
 1.2 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0_clkreg.h was added on branch kqueue on 2002-09-06 08:32:49 +0000
 1.1.4.2 15-Jul-2002  ichiro add support for ixp12x0
 1.1.4.1 15-Jul-2002  ichiro file ixp12x0_clkreg.h was added on branch nathanw_sa on 2002-07-15 16:27:17 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_clkreg.h was added on branch gehenna-devsw on 2002-07-21 13:00:29 +0000
 1.3.110.1 11-Mar-2010  yamt sync with head
 1.50 21-Jul-2022  andvar fix typos in comments and log messages, mainly s/intrrupt/interrupt/.
 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 15-Nov-2014  christos branches: 1.46.2;
centralize the call unit / dialout macros
 1.45 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.44 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.43 16-Mar-2014  dholland branches: 1.43.2;
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.42 12-Nov-2012  skrll branches: 1.42.2;
C99 types
 1.41 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.40 02-Feb-2012  tls branches: 1.40.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.39 01-Jul-2011  dyoung branches: 1.39.2; 1.39.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.38 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.37 15-Nov-2010  uebayasi branches: 1.37.2;
struct lwp * deref (for kauth).
 1.36 14-Mar-2009  dsl branches: 1.36.4;
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.35 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.34 11-Jun-2008  cegger branches: 1.34.4; 1.34.10;
use device_lookup_private to get softc
 1.33 28-Apr-2008  martin branches: 1.33.2; 1.33.4;
Remove clause 3 and 4 from TNF licenses
 1.32 08-Jan-2008  matt branches: 1.32.6; 1.32.8; 1.32.10;
As of this commit, all arm32 kernel now build.
 1.31 19-Nov-2007  ad branches: 1.31.6;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.30 04-Mar-2007  christos branches: 1.30.2; 1.30.16; 1.30.18; 1.30.20; 1.30.22; 1.30.26; 1.30.28;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29 01-Oct-2006  elad branches: 1.29.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.28 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.27 23-Jul-2006  ad branches: 1.27.4; 1.27.6;
Use the LWP cached credentials where sane.
 1.26 14-May-2006  elad integrate kauth.
 1.25 26-Mar-2006  thorpej Use device_unit().
 1.24 08-Mar-2006  he branches: 1.24.2;
Remove yet another instance of the macro triplet SET/CLR/ISSET, now
found in <sys/types.h>.
 1.23 20-Feb-2006  thorpej branches: 1.23.2; 1.23.4;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.22 11-Dec-2005  christos branches: 1.22.2; 1.22.4; 1.22.6;
merge ktrace-lwp.
 1.21 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.20 04-Jun-2005  he branches: 1.20.2;
Fix shadowing warnings by renaming local variables and by
removing parameter names in function prototype.
 1.19 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.18 29-Jun-2003  fvdl branches: 1.18.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.17 29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.16 25-Mar-2003  igy Add __KERNEL_RCSID tags
 1.15 06-Mar-2003  igy catch up to consdev update
 1.14 06-Mar-2003  igy Remove #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS switch and old interrupt
support. Ixp12x0 port always uses generic soft interrupt.
 1.13 22-Feb-2003  igy correct physical/virtual address handling

- to identify device instance, using hardware address.
- when console accesses device, using statically mapped address.
- when tty accesses device, using handler given by bus_space_map().
 1.12 21-Feb-2003  igy Don't use dv_unit to determine console. Back to comparing iobase again.
We always assume ixpcom is at statically mapped address (0xf0000000).
 1.11 21-Feb-2003  igy implement ioctl
 1.10 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.9 03-Dec-2002  ichiro initialize ixpcomconsaddr
use splserial()
fix IXPCOM registers
 1.8 02-Dec-2002  ichiro use bus_space map
 1.7 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.6 09-Oct-2002  thorpej branches: 1.6.2;
Make this compile with strict prototypes.
 1.5 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 21-Jul-2002  ichiro branches: 1.3.2; 1.3.4;
some bug fix and cosmetic changes
 1.2 20-Jul-2002  ichiro branches: 1.2.2;
attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
 1.1 15-Jul-2002  ichiro add support for ixp12x0
 1.2.2.3 30-Aug-2002  gehenna catch up with -current.
 1.2.2.2 21-Jul-2002  gehenna Add a character device switch.
 1.2.2.1 20-Jul-2002  gehenna file ixp12x0_com.c was added on branch gehenna-devsw on 2002-07-21 12:02:52 +0000
 1.3.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.1 21-Jul-2002  jdolecek file ixp12x0_com.c was added on branch kqueue on 2002-09-06 08:32:50 +0000
 1.3.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.3.2.4 11-Nov-2002  nathanw Catch up to -current
 1.3.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.3.2.1 21-Jul-2002  nathanw file ixp12x0_com.c was added on branch nathanw_sa on 2002-09-17 21:13:34 +0000
 1.6.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.18.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.2.4 17-Jan-2005  skrll Adapt to branch.
 1.18.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.5 21-Jan-2008  yamt sync with head
 1.20.2.4 07-Dec-2007  yamt sync with head
 1.20.2.3 03-Sep-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.22.6.2 01-Jun-2006  kardel Sync with head.
 1.22.6.1 22-Apr-2006  simonb Sync with head.
 1.22.4.1 09-Sep-2006  rpaulo sync with head
 1.22.2.1 01-Mar-2006  yamt sync with head.
 1.23.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.23.4.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.4.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.23.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.23.2.4 11-Aug-2006  yamt sync with head
 1.23.2.3 24-May-2006  yamt sync with head.
 1.23.2.2 01-Apr-2006  yamt sync with head.
 1.23.2.1 13-Mar-2006  yamt sync with head.
 1.24.2.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.24.2.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.27.6.1 22-Oct-2006  yamt sync with head
 1.27.4.1 18-Nov-2006  ad Sync with head.
 1.29.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.30.28.2 18-Feb-2008  mjf Sync with HEAD.
 1.30.28.1 08-Dec-2007  mjf Sync with HEAD.
 1.30.26.1 21-Nov-2007  bouyer Sync with HEAD
 1.30.22.1 09-Jan-2008  matt sync with HEAD
 1.30.20.2 20-Jan-2008  chris Sync to HEAD.
 1.30.20.1 01-Jan-2008  chris Sync with HEAD.
 1.30.18.1 21-Nov-2007  joerg Sync with HEAD.
 1.30.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.30.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.30.2.1 03-Dec-2007  ad Sync with HEAD.
 1.31.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.32.10.2 04-May-2009  yamt sync with head.
 1.32.10.1 16-May-2008  yamt sync with head.
 1.32.8.2 17-Jun-2008  yamt sync with head.
 1.32.8.1 18-May-2008  yamt sync with head.
 1.32.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.32.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.4.1 18-Jun-2008  simonb Sync with head.
 1.33.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.34.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.36.4.2 31-May-2011  rmind sync with head
 1.36.4.1 05-Mar-2011  rmind sync with head
 1.37.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.39.6.1 18-Feb-2012  mrg merge to -current.
 1.39.2.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.39.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.39.2.2 30-Oct-2012  yamt sync with head
 1.39.2.1 17-Apr-2012  yamt sync with head
 1.40.6.3 03-Dec-2017  jdolecek update from HEAD
 1.40.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.2.1 18-May-2014  rmind sync with head
 1.43.2.2 10-Aug-2014  tls Rebase.
 1.43.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.2.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.3 13-Jul-2003  igy code clean up
 1.2 27-Sep-2002  provos branches: 1.2.8;
remove trailing \n in panic(). approved perry.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0_com_io.c was added on branch kqueue on 2002-09-06 08:32:51 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixp12x0_com_io.c was added on branch nathanw_sa on 2002-10-18 02:35:36 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_com_io.c was added on branch gehenna-devsw on 2002-07-21 13:00:29 +0000
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.7 06-Mar-2003  igy branches: 1.7.110;
insert macro to protect itself against multiple includion.
 1.6 22-Feb-2003  igy correct physical/virtual address handling

- to identify device instance, using hardware address.
- when console accesses device, using statically mapped address.
- when tty accesses device, using handler given by bus_space_map().
 1.5 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.4 03-Dec-2002  ichiro initialize ixpcomconsaddr
use splserial()
fix IXPCOM registers
 1.3 02-Dec-2002  ichiro use bus_space map
 1.2 20-Jul-2002  ichiro branches: 1.2.2; 1.2.4; 1.2.6;
attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
 1.1 15-Jul-2002  ichiro add support for ixp12x0
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 20-Jul-2002  jdolecek file ixp12x0_comreg.h was added on branch kqueue on 2002-09-06 08:32:52 +0000
 1.2.4.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.4.1 20-Jul-2002  thorpej file ixp12x0_comreg.h was added on branch nathanw_sa on 2002-12-11 05:53:10 +0000
 1.2.2.2 21-Jul-2002  gehenna catch up with -current.
 1.2.2.1 20-Jul-2002  gehenna file ixp12x0_comreg.h was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.7.110.1 11-Mar-2010  yamt sync with head
 1.7 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.6 02-May-2008  martin branches: 1.6.34; 1.6.44;
Use standard 2 clause license
 1.5 06-Mar-2003  igy branches: 1.5.106; 1.5.108; 1.5.110;
Remove #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS switch and old interrupt
support. Ixp12x0 port always uses generic soft interrupt.
 1.4 22-Feb-2003  igy correct physical/virtual address handling

- to identify device instance, using hardware address.
- when console accesses device, using statically mapped address.
- when tty accesses device, using handler given by bus_space_map().
 1.3 02-Dec-2002  ichiro use bus_space map
 1.2 20-Jul-2002  ichiro branches: 1.2.2; 1.2.4; 1.2.6;
attach/match separated from ixp12x0_com
Some bug of com driver have been improved.
 1.1 15-Jul-2002  ichiro add support for ixp12x0
 1.2.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.1 20-Jul-2002  jdolecek file ixp12x0_comvar.h was added on branch kqueue on 2002-09-06 08:32:52 +0000
 1.2.4.2 11-Dec-2002  thorpej Sync with HEAD.
 1.2.4.1 20-Jul-2002  thorpej file ixp12x0_comvar.h was added on branch nathanw_sa on 2002-12-11 05:53:10 +0000
 1.2.2.2 21-Jul-2002  gehenna catch up with -current.
 1.2.2.1 20-Jul-2002  gehenna file ixp12x0_comvar.h was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.5.110.1 16-May-2008  yamt sync with head.
 1.5.108.1 18-May-2008  yamt sync with head.
 1.5.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.44.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.34.1 30-Oct-2012  yamt sync with head
 1.33 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.32 10-Nov-2019  chs branches: 1.32.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.31 08-Apr-2015  ozaki-r branches: 1.31.18;
Include sys/lwp.h instead of arm/cpu.h

sys/lwp.h is preferred because arm/cpu.h has a dependency on sys/lwp.h.

Suggested by skrll@ and matt@
 1.30 07-Apr-2015  ozaki-r Add missing #include <arm/cpu.h>
 1.29 26-Mar-2014  christos branches: 1.29.6;
kill sprintf
 1.28 20-Mar-2014  skrll Mechanically replace simplelock with kmutex_t.
 1.27 02-Mar-2014  joerg GC ipending.
 1.26 18-Dec-2013  skrll Remove unused variable
 1.25 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.24 12-Nov-2012  skrll branches: 1.24.2;
C99 types
 1.23 02-Aug-2012  skrll branches: 1.23.2;
Remove irqframe and replace with identical trapframe.
 1.22 01-Jul-2011  dyoung branches: 1.22.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21 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.20 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.19 28-Apr-2008  martin branches: 1.19.20; 1.19.22;
Remove clause 3 and 4 from TNF licenses
 1.18 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.17 08-Jan-2008  matt branches: 1.17.6; 1.17.8; 1.17.10;
As of this commit, all arm32 kernel now build.
 1.16 06-Jan-2008  matt Truly kill current_intr_depth once and for all.
 1.15 24-Nov-2006  wiz branches: 1.15.24; 1.15.28; 1.15.30; 1.15.36; 1.15.44;
s/heirarchy/hierarchy/, from Zafer.
 1.14 24-Dec-2005  perry branches: 1.14.20; 1.14.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.13 11-Dec-2005  christos merge ktrace-lwp.
 1.12 14-Aug-2005  he Fix one more missed clockframe -> irqframe transition.
 1.11 21-Sep-2003  matt branches: 1.11.16;
Fix GCC 3.3.1 nits.
 1.10 21-Jul-2003  igy Delaying to mask interrupt by hardware until actually it occurs.

The new code maintains two variables 'current_spl_level' and
'hardware_spl_level'. Variable hardware_spl_level reflects actual
priority level at the hardware's point of view. hardware_spl_level is
always synchronized to hardware.

splraise() just increases current_spl_level. splx() sets
current_spl_level. If (and only if) hardware_spl_level and
current_spl_level is not same, splx() synchronizes interrupt mask
register and hardware_spl_level to current_spl_level.

In most case, splraise() raises current_spl_level and splx() restores
only current_spl_level.

When an interrupt occurs, hardware_spl_level and interrupt mask
register are synchronized to current_spl_level.

In this implementation, during a higher priority interrupt handler is
running, lower priority interrupts never cause intr_dispatch() to run.
It will avoid some race condition.
 1.9 13-Jul-2003  igy code clean up
 1.8 16-Jun-2003  thorpej branches: 1.8.2;
Rename IPL_IMP -> IPL_VM.
 1.7 25-Mar-2003  igy Add __KERNEL_RCSID tags
 1.6 22-Feb-2003  igy fix incorrect interrupt mask handling.
pci_imask[IPL_NET] is incorrectly ORed on imask[IPL_SOFTSERIAL].
imask[IPL_NET] should be ORed.
 1.5 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.4 02-Dec-2002  ichiro use bus_space map
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 21-Jul-2002  ichiro branches: 1.2.2; 1.2.4;
some bug fix and cosmetic changes
 1.1 15-Jul-2002  ichiro branches: 1.1.2;
add support for ixp12x0
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_intr.c was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 21-Jul-2002  jdolecek file ixp12x0_intr.c was added on branch kqueue on 2002-09-06 08:32:53 +0000
 1.2.2.3 11-Dec-2002  thorpej Sync with HEAD.
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 21-Jul-2002  nathanw file ixp12x0_intr.c was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.8.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.3 21-Jan-2008  yamt sync with head
 1.11.16.2 30-Dec-2006  yamt sync with head.
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.14.22.1 10-Dec-2006  yamt sync with head.
 1.14.20.1 12-Jan-2007  ad Sync with head.
 1.15.44.1 08-Jan-2008  bouyer Sync with HEAD
 1.15.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.15.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.15.30.2 09-Jan-2008  matt sync with HEAD
 1.15.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.15.28.1 20-Jan-2008  chris Sync to HEAD.
 1.15.24.1 28-Feb-2008  rjs Sync with HEAD.
 1.17.10.2 11-Aug-2010  yamt sync with head.
 1.17.10.1 16-May-2008  yamt sync with head.
 1.17.8.1 18-May-2008  yamt sync with head.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.22.2 05-Mar-2011  rmind sync with head
 1.19.22.1 03-Jul-2010  rmind sync with head
 1.19.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.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.22.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.22.2.1 30-Oct-2012  yamt sync with head
 1.23.2.3 03-Dec-2017  jdolecek update from HEAD
 1.23.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.2 18-May-2014  rmind sync with head
 1.24.2.1 28-Aug-2013  rmind sync with head
 1.29.6.1 06-Jun-2015  skrll Sync with HEAD
 1.31.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.32.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 04-Feb-2014  matt _setsoftintr is long dead. reap any leftovers from arm.
 1.2 08-Jan-2008  matt branches: 1.2.44; 1.2.54; 1.2.60;
As of this commit, all arm32 kernel now build.
 1.1 03-Jan-2003  thorpej branches: 1.1.2; 1.1.20; 1.1.78; 1.1.82; 1.1.84; 1.1.90; 1.1.98;
Use the generic irq_dispatch.S
 1.1.98.1 08-Jan-2008  bouyer Sync with HEAD
 1.1.90.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.84.1 09-Jan-2008  matt sync with HEAD
 1.1.82.1 20-Jan-2008  chris Sync to HEAD.
 1.1.78.1 28-Feb-2008  rjs Sync with HEAD.
 1.1.20.1 21-Jan-2008  yamt sync with head
 1.1.2.2 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 03-Jan-2003  thorpej file ixp12x0_intr.h was added on branch nathanw_sa on 2003-01-03 16:41:09 +0000
 1.2.60.1 18-May-2014  rmind sync with head
 1.2.54.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.44.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.19 21-Apr-2023  skrll Trailing whitespace
 1.18 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.17 23-Feb-2014  martin branches: 1.17.28;
Fix obvious typo
 1.16 22-Feb-2014  matt Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.12; 1.15.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 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.13 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.12 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.11 24-Nov-2005  yamt branches: 1.11.80; 1.11.88; 1.11.94;
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 13-Jul-2003  igy branches: 1.9.8; 1.9.10;
mapping pci configuration space (not subregion)
 1.8 13-Jul-2003  igy sharing bus_space_tag among ixpio, pci mem and i/o.
 1.7 25-Mar-2003  igy branches: 1.7.2;
Add __KERNEL_RCSID tags
 1.6 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.5 22-Dec-2002  ichiro Use generic_bs_wr_4 for writing region
 1.4 22-Dec-2002  ichiro Use generic_bs_sr_4
 1.3 08-Dec-2002  ichiro change flags of pmap_enter() in ixp12x0_io.c, ixpsip_io.c
bug fix: ixp12x0_pci.c
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0_io.c was added on branch kqueue on 2002-09-06 08:32:53 +0000
 1.1.4.4 29-Dec-2002  thorpej Sync with HEAD.
 1.1.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixp12x0_io.c was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_io.c was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.7.2.5 11-Dec-2005  christos Sync with head.
 1.7.2.4 01-Apr-2005  skrll Sync with HEAD.
 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.9.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.9.8.1 29-Apr-2005  kent sync with -current
 1.10.8.1 29-Nov-2005  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.11.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.80.2 11-Mar-2010  yamt sync with head
 1.11.80.1 04-May-2009  yamt sync with head.
 1.15.16.1 18-May-2014  rmind sync with head
 1.15.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.4 02-Jan-2003  thorpej Garbage-collect prev_intr_depth; nothing uses it.
 1.3 14-Oct-2002  bjh21 Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.2 14-Aug-2002  thorpej branches: 1.2.2; 1.2.4;
Use cpsr_c rather then cpsr_all where appropriate.
 1.1 15-Jul-2002  ichiro branches: 1.1.2;
add support for ixp12x0
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_irq.S was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 14-Aug-2002  jdolecek file ixp12x0_irq.S was added on branch kqueue on 2002-09-06 08:32:54 +0000
 1.2.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 14-Aug-2002  nathanw file ixp12x0_irq.S was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.18 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.17 07-Jul-2020  thorpej 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.16 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.15 02-Oct-2015  msaitoh 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.14 18-Aug-2013  matt branches: 1.14.6;
<arm/locore.h> fallout (fixes some include ordering errors)
 1.13 27-Oct-2012  chs branches: 1.13.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 07-Sep-2012  matt branches: 1.12.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.11 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.10 14-Mar-2009  dsl branches: 1.10.12; 1.10.16;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.9 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.8 28-Apr-2008  martin branches: 1.8.8; 1.8.14;
Remove clause 3 and 4 from TNF licenses
 1.7 11-Dec-2005  christos branches: 1.7.76; 1.7.78; 1.7.80;
merge ktrace-lwp.
 1.6 15-Sep-2003  ichiro add address decode of "PCI Configuration type 1"
 1.5 25-Mar-2003  igy branches: 1.5.2;
Add __KERNEL_RCSID tags
 1.4 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.3 08-Dec-2002  ichiro change flags of pmap_enter() in ixp12x0_io.c, ixpsip_io.c
bug fix: ixp12x0_pci.c
 1.2 09-Oct-2002  thorpej Need <dev/pci/pciconf.h>.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0_pci.c was added on branch kqueue on 2002-09-06 08:32:54 +0000
 1.1.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixp12x0_pci.c was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_pci.c was added on branch gehenna-devsw on 2002-07-21 13:00:30 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.80.2 04-May-2009  yamt sync with head.
 1.7.80.1 16-May-2008  yamt sync with head.
 1.7.78.1 18-May-2008  yamt sync with head.
 1.7.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.16.1 18-Feb-2012  mrg merge to -current.
 1.10.12.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.10.12.2 30-Oct-2012  yamt sync with head
 1.10.12.1 17-Apr-2012  yamt sync with head
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.2.1 28-Aug-2013  rmind sync with head
 1.14.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.9 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 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-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.6 25-Mar-2003  igy branches: 1.6.110;
Add __KERNEL_RCSID tags
 1.5 17-Feb-2003  ichiro files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.4 09-Oct-2002  thorpej Need ixp12x0var.h
CVS ----------------------------------------------------------------------
 1.3 17-Aug-2002  thorpej branches: 1.3.2; 1.3.4;
Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.2 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.1 15-Jul-2002  ichiro branches: 1.1.2;
add support for ixp12x0
 1.1.2.3 30-Aug-2002  gehenna catch up with -current.
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_pci_dma.c was added on branch gehenna-devsw on 2002-07-21 13:00:31 +0000
 1.3.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.1 17-Aug-2002  jdolecek file ixp12x0_pci_dma.c was added on branch kqueue on 2002-09-06 08:32:55 +0000
 1.3.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.1 17-Aug-2002  nathanw file ixp12x0_pci_dma.c was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.6.110.1 11-Mar-2010  yamt sync with head
 1.8.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.2.1 30-Oct-2012  yamt sync with head
 1.3 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.2 17-Feb-2003  ichiro branches: 1.2.110;
files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0_pcireg.h was added on branch kqueue on 2002-09-06 08:32:55 +0000
 1.1.4.2 15-Jul-2002  ichiro add support for ixp12x0
 1.1.4.1 15-Jul-2002  ichiro file ixp12x0_pcireg.h was added on branch nathanw_sa on 2002-07-15 16:27:18 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0_pcireg.h was added on branch gehenna-devsw on 2002-07-21 13:00:31 +0000
 1.2.110.1 11-Mar-2010  yamt sync with head
 1.9 17-Sep-2021  andvar some love to double letters (in comments).
 1.8 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.7 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.6 11-Dec-2005  christos branches: 1.6.80;
merge ktrace-lwp.
 1.5 10-Nov-2003  wiz Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.4 13-Jul-2003  igy move window of pci i/o cycle to higher address
 1.3 17-Feb-2003  ichiro branches: 1.3.2;
files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.2 02-Dec-2002  ichiro changes&fix name of mapping registers
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0reg.h was added on branch kqueue on 2002-09-06 08:32:55 +0000
 1.1.4.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.1 15-Jul-2002  thorpej file ixp12x0reg.h was added on branch nathanw_sa on 2002-12-11 05:53:11 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0reg.h was added on branch gehenna-devsw on 2002-07-21 13:00:31 +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.11 12-Nov-2012  skrll C99 types
 1.10 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.9 01-Jul-2011  dyoung branches: 1.9.2; 1.9.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.8 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.7 11-Dec-2005  christos branches: 1.7.80;
merge ktrace-lwp.
 1.6 13-Jul-2003  igy code clean up
 1.5 13-Jul-2003  igy mapping pci configuration space (not subregion)
 1.4 13-Jul-2003  igy sharing bus_space_tag among ixpio, pci mem and i/o.
 1.3 17-Feb-2003  ichiro branches: 1.3.2;
files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit(). Calling bus_space_map()
is not safe here, because bus_space_map() calls uvm_km_valloc() but
uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
Now you can attach ixpcom0 with physical address like this:
ixpcom* at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly. (bug fix)
3. Start the timer device without interrupt on attach time.
Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
but size of this mapping increase to 1MByte because fails
cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
 1.2 09-Oct-2002  thorpej add ixp12x0_reset() prototype.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixp12x0var.h was added on branch kqueue on 2002-09-06 08:32:56 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixp12x0var.h was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixp12x0var.h was added on branch gehenna-devsw on 2002-07-21 13:00:31 +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.7.80.1 11-Mar-2010  yamt sync with head
 1.9.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.9.2.1 30-Oct-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 01-Jul-2011  dyoung branches: 1.13.2; 1.13.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.11 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.10 11-Dec-2005  christos branches: 1.10.80; 1.10.88; 1.10.94;
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 13-Jul-2003  igy using common bus_space_tag in ixpsip too
 1.6 25-Mar-2003  igy branches: 1.6.2;
Add __KERNEL_RCSID tags
 1.5 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixpsip.c was added on branch kqueue on 2002-09-06 08:32:56 +0000
 1.1.4.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixpsip.c was added on branch nathanw_sa on 2002-10-18 02:35:37 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixpsip.c was added on branch gehenna-devsw on 2002-07-21 13:00:31 +0000
 1.6.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.10.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.10.80.2 11-Mar-2010  yamt sync with head
 1.10.80.1 04-May-2009  yamt sync with head.
 1.13.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.2.1 30-Oct-2012  yamt sync with head
 1.14.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 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.5 13-Jul-2003  igy code clean up
 1.4 25-Mar-2003  igy branches: 1.4.2;
Add __KERNEL_RCSID tags
 1.3 08-Dec-2002  ichiro change flags of pmap_enter() in ixp12x0_io.c, ixpsip_io.c
bug fix: ixp12x0_pci.c
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6;
add support for ixp12x0
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixpsip_io.c was added on branch kqueue on 2002-09-06 08:32:57 +0000
 1.1.4.3 11-Dec-2002  thorpej Sync with HEAD.
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 15-Jul-2002  nathanw file ixpsip_io.c was added on branch nathanw_sa on 2002-10-18 02:35:38 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixpsip_io.c was added on branch gehenna-devsw on 2002-07-21 13:00:31 +0000
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4 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.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.1 15-Jul-2002  ichiro branches: 1.1.2; 1.1.4; 1.1.6; 1.1.122;
add support for ixp12x0
 1.1.122.1 11-Mar-2010  yamt sync with head
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 15-Jul-2002  jdolecek file ixpsipvar.h was added on branch kqueue on 2002-09-06 08:32:57 +0000
 1.1.4.2 15-Jul-2002  ichiro add support for ixp12x0
 1.1.4.1 15-Jul-2002  ichiro file ixpsipvar.h was added on branch nathanw_sa on 2002-07-15 16:27:18 +0000
 1.1.2.2 21-Jul-2002  gehenna catch up with -current.
 1.1.2.1 15-Jul-2002  gehenna file ixpsipvar.h was added on branch gehenna-devsw on 2002-07-21 13:00:31 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.20 20-Apr-2001  matt branches: 1.20.8;
Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.19 18-Apr-2001  rearnsha Put back that old (not) unused include file. But only include it
when ARMFPE is defined. Since that is the only time we use it.
 1.18 04-Apr-2001  reinoud Removing an old unused include
 1.17 13-Mar-2001  bjh21 Change the value of tf_pc in undefined-instruction handlers on arm32. It now
always points to the undefined instruction in question. It's up to the
handler to advance it to the next instruction if it wants execution to
continue there. This is how things have always worked on arm26.
 1.16 13-Mar-2001  bjh21 Update FPU detection to use remove_coproc_handler().
 1.15 11-Mar-2001  bjh21 branches: 1.15.2;
Pass a softc pointer around everywhere, and use it when we need the name of
the device.

Don't pretend that fpe0 and fpu0 exist as devices (they don't).

G/C a few items related to /dev/cpu* support.
 1.14 10-Mar-2001  bjh21 Add code to point out to the user if their CPU isn't supported, and to
suggest what kernel options to use to get it to work.
 1.13 10-Mar-2001  bjh21 Change the meaning of cpu_class. It now has one value for each core we
support, which corresponds to one for each CPU_* option, or one for each
cpufunc structure.

Also remove some more residual code for the support of multiple and non-ARM
CPUs.
 1.12 04-Mar-2001  bjh21 branches: 1.12.2;
Add CPU ID for ARM7500FE (determined empirically from two I've got here).
 1.11 03-Mar-2001  bjh21 Kill cpu_host and cpu_flags: they weren't having any practical effect.
 1.10 03-Mar-2001  bjh21 Remove support for /dev/cpu*. This code has never done anything useful anyway.
 1.9 03-Mar-2001  bjh21 Remove spurious declaration of initialise_fpe().
 1.8 03-Mar-2001  bjh21 NCPU will always be 1 if this file is being compiled at all, so don't bother
checking it.
 1.7 03-Mar-2001  bjh21 Re-design identify_arm_cpu() to use a table of CPU types. This also makes
it easy for it to identify lots of CPU types, so have it do that too.
 1.6 01-Mar-2001  bjh21 ARM7100 -> ARM710A, following information from reinoud.
 1.5 26-Feb-2001  bjh21 Fix up indentation, and remove a spurious set of braces. Should be no
semantic change from the last revision.
 1.4 26-Feb-2001  bjh21 fpe-sp, and the associated "options FPE", was deleted in 1997. G/C references
to it.
 1.3 25-Feb-2001  bjh21 Move arm32 ports over to using <arm/armreg.h>, so <cpu.h> mostly contains
NetBSD-specific definitions.

This also entails some changes to the way CPU identification is done. I hope
I've got it right.
 1.2 25-Feb-2001  bjh21 The cpu_type element of struct _cpu was only used in identify_arm_cpu().
Make it a local variable.
 1.1 24-Feb-2001  reinoud Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
 1.12.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.15.2.5 23-Apr-2001  bouyer Sync with HEAD.
 1.15.2.4 21-Apr-2001  bouyer Sync with HEAD
 1.15.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.15.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.15.2.1 11-Mar-2001  bouyer file cpu.c was added on branch thorpej_scsipi on 2001-03-12 13:27:25 +0000
 1.20.8.2 20-Apr-2001  matt Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.20.8.1 20-Apr-2001  matt file cpu.c was added on branch nathanw_sa on 2001-04-20 18:08:50 +0000
 1.19 09-May-2024  pho kern/58195: arm: Support drvctl -d and -r for cpufeaturebus

This is required for detaching and re-attaching the vmt(4) driver on aarch64.
 1.18 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.17 28-Jan-2020  skrll Traiing whitespace
 1.16 29-Oct-2014  skrll branches: 1.16.20; 1.16.26;
Sprinkle #include "opt_multiprocessor.h"
 1.15 05-Jun-2014  matt branches: 1.15.2;
Cleanup a few MULTIPROCESSOR issues.
 1.14 28-Mar-2014  matt branches: 1.14.2;
arm_cpu_max = num of cpus
 1.13 29-Aug-2012  matt branches: 1.13.2; 1.13.4;
Add core locator to mainbus. Add support for attaching multiple CPUs
 1.12 29-Aug-2012  matt Use new armv7 CP15 register to print out cache types.
If the cpu_cc_freq is set, report it.
Add macros to make inlines for reading/writing co-processor registers.
 1.11 05-Jun-2011  matt branches: 1.11.2; 1.11.10;
struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
 1.10 14-Mar-2009  dsl branches: 1.10.4; 1.10.6; 1.10.10;
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.9 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.8 11-Dec-2005  christos branches: 1.8.80; 1.8.88; 1.8.94; 1.8.98;
merge ktrace-lwp.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.8;
Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.3 05-Jan-2002  chris branches: 1.3.8;
Make some of the arm32 files build with LOOSE_PROTOTYPES not set in the makefile. Turned up a few mismatched functions. Note that this isn't all of the arm32 files. Aim will be to get arm32 kernels built with LOOSE_PROTOTYPES not set.
 1.2 23-Nov-2001  thorpej Use <arm/undefined.h> instead of <machine/undefined.h>.
 1.1 20-Apr-2001  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Split cpu from mainbus so that cpu can attached to other buses (like ofbus).
 1.1.12.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.12.5 17-Sep-2002  nathanw Catch up to -current.
 1.1.12.4 28-Feb-2002  nathanw Catch up to -current.
 1.1.12.3 11-Jan-2002  nathanw More catchup.
 1.1.12.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.12.1 20-Apr-2001  nathanw file cpu_mainbus.c was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.1.6.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.1 20-Apr-2001  bouyer file cpu_mainbus.c was added on branch thorpej_scsipi on 2001-04-23 09:41:35 +0000
 1.3.8.1 19-May-2002  gehenna Remove unnecessary #include
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll Sync with HEAD
 1.8.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.8.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.80.1 04-May-2009  yamt sync with head.
 1.10.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.10.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.4.1 12-Jun-2011  rmind sync with head
 1.11.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.11.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.11.2.1 30-Oct-2012  yamt sync with head
 1.13.4.1 18-May-2014  rmind sync with head
 1.13.2.2 03-Dec-2017  jdolecek update from HEAD
 1.13.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.2.1 10-Aug-2014  tls Rebase.
 1.15.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.16.26.1 29-Feb-2020  ad Sync with head.
 1.16.20.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.24 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.23 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.22 24-Apr-2021  thorpej branches: 1.22.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.21 05-Jun-2014  matt branches: 1.21.42;
Cleanup a few MULTIPROCESSOR issues.
 1.20 29-Aug-2012  matt branches: 1.20.2; 1.20.12;
Add core locator to mainbus. Add support for attaching multiple CPUs
 1.19 14-Jul-2012  matt Add intrbase locator to mainbus.
 1.18 01-Jul-2011  dyoung branches: 1.18.2; 1.18.10;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.17 05-Jun-2011  matt struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
 1.16 14-Mar-2009  dsl branches: 1.16.4; 1.16.6; 1.16.10;
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.15 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.14 27-Apr-2008  matt branches: 1.14.8; 1.14.14; 1.14.18;
Merge kernel changes in matt-armv6 to HEAD.
 1.13 11-Dec-2005  christos branches: 1.13.46; 1.13.52; 1.13.60; 1.13.76; 1.13.78; 1.13.80;
merge ktrace-lwp.
 1.12 26-Aug-2005  drochner s/locdesc_t/int/g
 1.11 30-Jun-2005  drochner branches: 1.11.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.10 03-Jan-2004  chris On a riscstation leave the iobase as requested, don't add IO_CONF_BASE to
it.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 29-Apr-2003  thorpej branches: 1.8.2;
Use aprint*().
 1.7 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.6 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.3 13-Jun-2001  nathanw branches: 1.3.2; 1.3.8;
That's supposed to be <machine/io.h> in the XXX'd #ifdef, not a repeat
of <machine/bus.h>.
 1.2 11-Jun-2001  matt Add common Makefile for arm ports. Only include (for now) machine/io.h
if arm32 is defined. io.h is RISCPC specific and isn't needed for other
ports.
 1.1 24-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 24-Feb-2001  bouyer file mainbus.c was added on branch thorpej_scsipi on 2001-03-12 13:27:26 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.8.3 03-Jan-2003  thorpej Sync with HEAD.
 1.3.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 13-Jun-2001  nathanw file mainbus.c was added on branch nathanw_sa on 2002-10-18 02:35:38 +0000
 1.3.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.8.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.13.80.2 04-May-2009  yamt sync with head.
 1.13.80.1 16-May-2008  yamt sync with head.
 1.13.78.1 18-May-2008  yamt sync with head.
 1.13.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.60.1 10-Nov-2007  matt Add AT91 support from Sami Kantoluoto
Add TI OMAP2430 support from Marty Fouts @ Danger Inc
 1.13.52.1 05-Nov-2007  matt Init mb_iosize
 1.13.46.1 07-Oct-2007  rjs Only include io.h for acorn32.
 1.14.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.14.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 12-Jun-2011  rmind sync with head
 1.18.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.20.12.1 10-Aug-2014  tls Rebase.
 1.20.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.42.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.21.42.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.21.42.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.21.42.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.21.42.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.21.42.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.22.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 04-Sep-2012  matt Add multiple inclusion protection.
 1.4 29-Aug-2012  matt Add core locator to mainbus. Add support for attaching multiple CPUs
 1.3 14-Jul-2012  matt Add intrbase locator to mainbus.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.10;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 24-Feb-2001  reinoud branches: 1.1.4; 1.1.154;
Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
 1.1.154.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 24-Feb-2001  bouyer file mainbus.h was added on branch thorpej_scsipi on 2001-03-12 13:27:26 +0000
 1.2.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.24 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.23 22-Feb-2014  matt branches: 1.23.28;
Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.22 15-Jul-2012  matt branches: 1.22.2; 1.22.4;
Add stream methods
 1.21 01-Jul-2011  dyoung branches: 1.21.2; 1.21.10;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.20 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.19 15-Mar-2009  cegger ansify function definitions
 1.18 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.17 24-Nov-2005  yamt branches: 1.17.80; 1.17.88; 1.17.94; 1.17.98;
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.16 01-Apr-2005  yamt branches: 1.16.2; 1.16.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.15 01-Jan-2004  chris branches: 1.15.8; 1.15.10;
Correct the usage of the 4th arg to mainbus_bs_map. It's a flags arg, so
test for the CACHEABLE bit, rather than assuming a non-zero means cacheable
 1.14 06-Dec-2003  bjh21 Fix the ARM mainbus version of bus_space_subregion() to correctly shift the
base offset before using it. This makes it work the same as every other
implementation, and makes wdc at pioc on acorn32 work again. Fix the only
caller I found which depended on the old behaviour.
 1.13 15-Jul-2003  lukem __KERNEL_RCSID()
 1.12 27-Sep-2002  provos branches: 1.12.8;
remove trailing \n in panic(). approved perry.
 1.11 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.10 09-Apr-2002  thorpej branches: 1.10.2;
* Split pte_cache_mode into pte_l1_s_cache_mode, pte_l2_l_cache_mode,
and pte_l2_s_cache_mode. The cache-meaningful bits are different
for these descriptor types on some processor models.
* Add pte_*_cache_mask, corresponding to each above, which has a mask
of the cache-meangful bits, and define those for generic and XScale
MMU classes. Note, the L2_S_CACHE_MASK_xscale definition requires
use of the Extended Small Page L2 descriptor (the "X" bit overlaps
with AP bits otherwise).
 1.9 05-Apr-2002  thorpej Use pte_cache_mode instead of PT_CACHEABLE.
 1.8 24-Mar-2002  thorpej * arm_byte_to_page() -> arm_btop()
* arm_page_to_byte() -> arm_ptob()
 1.7 23-Mar-2002  thorpej KERNEL_SPACE_START -> KERNEL_BASE
 1.6 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.5 10-Sep-2001  chris branches: 1.5.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.4 10-Sep-2001  reinoud Initial commitment of the bus_space_mmap() functions as proposed by Jason R
Thorpe as an extension to the bus_space(9) API.

Only the mainbus has a working mmap... iomd, podulebus and isa dont have
one yet. Its trivial to add the iomd and isa's memory part but am a bit
hessistant to add it without knowing its implications by heart.

Podulebus might be implemented in 32 bits EASI but otherwise its not really
transparent since there is AFAIK no function to explicitly read one byte or
so .. or is this implemented in a higher level ?

ARM26 and arch/arm32/dnard (Shark) kernels compile and RiscPC and Shark
kernels are tested and function OK.

Implications of other ARM systems like hpcarm and ebarm are propably
minimal or solved trivially.
 1.3 28-Jul-2001  chris branches: 1.3.2;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.2 24-Apr-2001  thorpej branches: 1.2.2;
Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.1 24-Feb-2001  reinoud branches: 1.1.2; 1.1.4;
Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 24-Feb-2001  bouyer file mainbus_io.c was added on branch thorpej_scsipi on 2001-03-12 13:27:26 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.2.1 03-Aug-2001  lukem update to -current
 1.3.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.5.4.6 18-Oct-2002  nathanw Catch up to -current.
 1.5.4.5 27-Aug-2002  thorpej Sync with -current.
 1.5.4.4 17-Apr-2002  nathanw Catch up to -current.
 1.5.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.5.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.5.4.1 10-Sep-2001  nathanw file mainbus_io.c was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.10.2.1 30-Aug-2002  gehenna catch up with -current.
 1.12.8.5 11-Dec-2005  christos Sync with head.
 1.12.8.4 01-Apr-2005  skrll Sync with HEAD.
 1.12.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.8.1 03-Aug-2004  skrll Sync with HEAD
 1.15.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.15.8.1 29-Apr-2005  kent sync with -current
 1.16.8.1 29-Nov-2005  yamt sync with head.
 1.16.2.1 21-Jun-2006  yamt sync with head.
 1.17.98.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.17.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.17.80.2 11-Mar-2010  yamt sync with head
 1.17.80.1 04-May-2009  yamt sync with head.
 1.21.10.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.21.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.21.2.1 30-Oct-2012  yamt sync with head
 1.22.4.1 18-May-2014  rmind sync with head
 1.22.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.1 24-Feb-2001  reinoud branches: 1.1.4; 1.1.154; 1.1.170; 1.1.180; 1.1.186;
Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
 1.1.186.1 28-Aug-2013  rmind sync with head
 1.1.180.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.170.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.1.154.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 24-Feb-2001  bouyer file mainbus_io_asm.S was added on branch thorpej_scsipi on 2001-03-12 13:27:26 +0000
 1.26 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.25 31-May-2022  andvar s/disbale/disable/ and s/enbale/enable/ in comments. also one more typo fix.
 1.24 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.23 30-Oct-2020  skrll Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.22 14-May-2020  msaitoh Remove extra semicolon.
 1.21 26-Feb-2017  skrll Trailing whitespace
 1.20 26-Feb-2017  skrll Use PEX numbers consistently. No functional change.
 1.19 23-Feb-2017  skrll Typo in comment
 1.18 11-Jan-2017  maya branches: 1.18.2;
also fix this other off by one.
 1.17 11-Jan-2017  maya fix off by one.

ok riastradh
 1.16 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.15 03-Jun-2015  hsuenaga branches: 1.15.2;
add ARMADA XP's Soc internal bus(Mbus) address decoder initialization function.
some versions of u-boot initializes the address decoder incorrectly(probably
these values are come from Kirkwood SoC or older.) the codes generates
SoC's default address spaces and some modifications for NetBSD's assumption.

add error interrupt definitions, interrupt name strings for 'vmstat -e',
verbose output of Mbus settings for such low-level debugging of SoC.
 1.14 19-May-2015  hsuenaga fix Marvell Coherency Barrier register address.
configure coherency bus maintance broadcast using MPIDR. we need to configure
this regardless of 'options MULTIPROCESSOR.'
 1.13 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.12 03-May-2015  hsuenaga write back unaligned boundary of L2 cache even if invalidate operation
is requested.
 1.11 17-Apr-2015  hsuenaga sync L2 cache on the tail of region.
 1.10 15-Apr-2015  hsuenaga add L2 cache write eviction buffer sync barrier
 1.9 15-Apr-2015  hsuenaga implement L2 cache maintenance operations of ARMADA XP.
the L2 cahce maintenance operations are defined on SoC internal registers.
 1.8 05-Apr-2014  matt branches: 1.8.2; 1.8.6;
Initialize cpu_cc_freq with our CPU speed.
 1.7 15-Mar-2014  kiyohara branches: 1.7.2;
Add armada370_getclks().
Remove some white spaces.
 1.6 23-Dec-2013  kiyohara Support to check the clock gating for Armada XP in armadaxp.c.
Also move the checking for clock gate of Kirkwood into kirkwood.c.
 1.5 23-Dec-2013  kiyohara Move Misc Registers from mvsocreg.h to armadaxpreg.h. These registers only
Armada XP. The misc_base initializes in initarm() instead of mvsoc_bootstrap().
 1.4 20-Nov-2013  kiyohara Support __HAVE_PIC_SET_PRIORITY for Armada XP.
 1.3 30-Sep-2013  kiyohara Change argument for some functions.
 1.2 29-May-2013  rkujawa branches: 1.2.2; 1.2.4;
Add CVS IDs where appropriate.
 1.1 29-May-2013  rkujawa Add support for Armada XP PIC.

Obtained from Marvell, Semihalf.
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.4 03-Dec-2017  jdolecek update from HEAD
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 29-May-2013  tls file armadaxp.c was added on branch tls-maxphys on 2013-06-23 06:20:00 +0000
 1.7.2.1 10-Aug-2014  tls Rebase.
 1.8.6.3 28-Aug-2017  skrll Sync with HEAD
 1.8.6.2 05-Feb-2017  skrll Sync with HEAD
 1.8.6.1 06-Jun-2015  skrll Sync with HEAD
 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 05-Apr-2014  yamt file armadaxp.c was added on branch yamt-pagecache on 2014-05-22 11:39:33 +0000
 1.15.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.18.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.10 13-Aug-2023  andvar fix typos in comments.
 1.9 04-Apr-2022  andvar fix various typos, mainly in comments.
 1.8 10-Mar-2017  skrll Initialise the windows and allow access to PCI Express port 1 first lane.

Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d

mvpex1 at mvsoc0 unit 4 offset 0x80000-0x81fff irq 62: Marvell PCI Express Interface
pci1 at mvpex1
xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04)
xhci0: interrupting at interrupt pin INTA#
usb3 at xhci0: USB revision 3.0
usb4 at xhci0: USB revision 2.0
 1.7 07-Jan-2017  kiyohara branches: 1.7.2;
Add register macros.
And reorder registers.
Also remove white-spaces.
 1.6 06-Nov-2015  kiyohara branches: 1.6.2;
Add mvsocts to mvsoc_periph for Armada XP.
 1.5 03-Jun-2015  hsuenaga add ARMADA XP's Soc internal bus(Mbus) address decoder initialization function.
some versions of u-boot initializes the address decoder incorrectly(probably
these values are come from Kirkwood SoC or older.) the codes generates
SoC's default address spaces and some modifications for NetBSD's assumption.

add error interrupt definitions, interrupt name strings for 'vmstat -e',
verbose output of Mbus settings for such low-level debugging of SoC.
 1.4 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.3 15-Apr-2015  hsuenaga implement L2 cache maintenance operations of ARMADA XP.
the L2 cahce maintenance operations are defined on SoC internal registers.
 1.2 23-Dec-2013  kiyohara branches: 1.2.4; 1.2.6; 1.2.10; 1.2.12;
Move Misc Registers from mvsocreg.h to armadaxpreg.h. These registers only
Armada XP. The misc_base initializes in initarm() instead of mvsoc_bootstrap().
 1.1 30-Sep-2013  kiyohara Move armadaxpreg.h into arm/marvell.
And add some defines and reorder.
 1.2.12.4 28-Aug-2017  skrll Sync with HEAD
 1.2.12.3 05-Feb-2017  skrll Sync with HEAD
 1.2.12.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.12.1 06-Jun-2015  skrll Sync with HEAD
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 23-Dec-2013  tls file armadaxpreg.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 23-Dec-2013  yamt file armadaxpreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:33 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 23-Dec-2013  rmind file armadaxpreg.h was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.6.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.7.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.4 27-Feb-2025  andvar Fix various typos in comments.
 1.3 07-Jan-2017  kiyohara branches: 1.3.14; 1.3.54;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.2 03-Jun-2015  hsuenaga branches: 1.2.2; 1.2.4;
add ARMADA XP's Soc internal bus(Mbus) address decoder initialization function.
some versions of u-boot initializes the address decoder incorrectly(probably
these values are come from Kirkwood SoC or older.) the codes generates
SoC's default address spaces and some modifications for NetBSD's assumption.

add error interrupt definitions, interrupt name strings for 'vmstat -e',
verbose output of Mbus settings for such low-level debugging of SoC.
 1.1 15-Apr-2015  hsuenaga implement L2 cache maintenance operations of ARMADA XP.
the L2 cahce maintenance operations are defined on SoC internal registers.
 1.2.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2.2.3 05-Feb-2017  skrll Sync with HEAD
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 03-Jun-2015  skrll file armadaxpvar.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.3.54.1 02-Aug-2025  perseant Sync with HEAD
 1.3.14.2 03-Dec-2017  jdolecek update from HEAD
 1.3.14.1 07-Jan-2017  jdolecek file armadaxpvar.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.4 14-Sep-2025  andvar Fix various typos in comments and log message.
 1.3 30-Sep-2021  skrll Drive-by KNF
 1.2 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.1 07-Jan-2017  kiyohara branches: 1.1.4; 1.1.6; 1.1.18;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-Jan-2017  jdolecek file dove.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.6.1 07-Jan-2017  pgoyette file dove.c was added on branch pgoyette-localcount on 2017-03-20 06:57:11 +0000
 1.1.4.2 05-Feb-2017  skrll Sync with HEAD
 1.1.4.1 07-Jan-2017  skrll file dove.c was added on branch nick-nhusb on 2017-02-05 13:40:04 +0000
 1.2 31-Oct-2022  andvar s/interrut/interrupt/ and s/accelelerator/accelerator/ in comments.
 1.1 07-Jan-2017  kiyohara branches: 1.1.4; 1.1.6; 1.1.18;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-Jan-2017  jdolecek file dovereg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.6.1 07-Jan-2017  pgoyette file dovereg.h was added on branch pgoyette-localcount on 2017-03-20 06:57:11 +0000
 1.1.4.2 05-Feb-2017  skrll Sync with HEAD
 1.1.4.1 07-Jan-2017  skrll file dovereg.h was added on branch nick-nhusb on 2017-02-05 13:40:04 +0000
 1.18 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.17 03-Jun-2015  hsuenaga branches: 1.17.2;
add new cryptographic accelerator driver 'mvxpsec.'

this driver controls CESA unit as same as mvcesa, but uses DMA engines and
does CBC operations, HMAC operations by hardware. about 2 kbytes of data
are processed at one. supported algorithms are:

- DES-CBC, 3DES-CBC, AES-CBC
- HMAC-SHA1, HMAC-MD5

non-CBC algorithm such as AES-GCM is not supported by CESA's acceleration
engine. mvcesa is still useful to implement such algorithms as combination of
accelerated block cipher and software chaining.
 1.16 03-Jun-2015  hsuenaga separate buffer management codes 'mvxpbm.c' from if_mvxpe.c.

the buffer management(ex. fill the rx descriptors/buffers) is done by H/W in
ARMADA XP/380, and is done by S/W in ARMADA 370. the H/W BM support is not yet
implemented, so all devices use the S/W management mode at this time.
 1.15 03-Jun-2015  hsuenaga move Marvell ARMADA SoC's device driver definitions from arm/marvell
to dev/marvell.
 1.14 03-May-2015  hsuenaga add new ethernet driver mvxpe for recent MARVELL's SoC after ARMADA/XP.
this driver supports 'counter mode', and is disabled by default.

ARMADA SoC family has new ethernet controller acceleration mode called
'enhanced mode' or 'counter mode.' it seems that backward compatibility mode
used by if_mvgbe is still working, but the specification of the old mode
is completely disappeared from SoC's reference manual.

I tested the driver using MIRABOX(ARMADA/370).
 1.13 18-Mar-2014  matt branches: 1.13.6;
defflag MVSOC_CONSOLE_EARLY
 1.12 18-Mar-2014  matt Add MEMSIZE to opt_mvsoc.h
 1.11 18-Mar-2014  matt Move defparam opt_mvsoc.h to more appropriate place.
 1.10 30-Sep-2013  kiyohara Add ARMADAXP into opt_mvsoc.h.
And add mv78xx0.c. However not test long time.
 1.9 29-Aug-2013  kiyohara Fix build failed with ofppc.
Move 'attach mvspi at mvsoc' to arch/arm/marvell/files.marvell.
 1.8 29-May-2013  rkujawa branches: 1.8.2;
Add support for Armada XP PIC.

Obtained from Marvell, Semihalf.
 1.7 01-Aug-2012  kiyohara branches: 1.7.2;
Add mvsocts.
 1.6 27-Jul-2012  kiyohara Add mvcesa.
 1.5 19-Jun-2012  hans Add support for the watchdog timer in mvsoctmr.
Tested on DreamPlug system.
 1.4 12-Mar-2011  nonaka branches: 1.4.4; 1.4.10;
mvsoc needs pic_splfuncs.
 1.3 05-Mar-2011  matt branches: 1.3.2;
Add contributed Marvell Kirkwood RTC driver from Brett Slager
Fixes PR 44004
 1.2 06-Oct-2010  kiyohara branches: 1.2.2; 1.2.4; 1.2.6;
Comment-out mvcesa. It not exists now.
 1.1 03-Oct-2010  kiyohara Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.2.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.2.4.1 06-Oct-2010  uebayasi file files.marvell was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.2.2.2 09-Oct-2010  yamt sync with head
 1.2.2.1 06-Oct-2010  yamt file files.marvell was added on branch yamt-nfs-mp on 2010-10-09 03:31:39 +0000
 1.3.2.4 21-Apr-2011  rmind sync with head
 1.3.2.3 06-Mar-2011  rmind sync with head (and fix few botches with this)
 1.3.2.2 05-Mar-2011  rmind sync with head
 1.3.2.1 05-Mar-2011  rmind file files.marvell was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.4.10.1 13-Jan-2013  bouyer Pull up following revision(s) (requested by riz in ticket #770):
sys/arch/arm/marvell/files.marvell: revision 1.5
sys/arch/arm/marvell/mvsoctmr.c: revision 1.4
sys/arch/arm/marvell/mvsoctmr.c: revision 1.5
sys/arch/arm/marvell/mvsoctmr.c: revision 1.6
sys/arch/arm/marvell/mvsoctmr.c: revision 1.7
Add support for the watchdog timer in mvsoctmr.
Tested on DreamPlug system.
When disabling watchdog timer, do not set the counter to 0.
Having the watchdog counter at 0 and having WDRstOutEn set to 1 causes
immediate watchdog reset on my 88F5182 A2.
Remove duplicate global variable.
The maximum watchdog period is dependant on mvTclk; calculate at runtime.
This gets the maximum period up to 25 seconds at 166â…”MHz mvTclk.
 1.4.4.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.4.4.1 30-Oct-2012  yamt sync with head
 1.7.2.3 03-Dec-2017  jdolecek update from HEAD
 1.7.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 23-Jun-2013  tls resync from head
 1.8.2.1 18-May-2014  rmind sync with head
 1.13.6.2 05-Feb-2017  skrll Sync with HEAD
 1.13.6.1 06-Jun-2015  skrll Sync with HEAD
 1.17.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.10 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.9 11-Mar-2014  martin branches: 1.9.6; 1.9.10;
Mark a diagnostic only variable
 1.8 23-Dec-2013  kiyohara Support to check the clock gating for Armada XP in armadaxp.c.
Also move the checking for clock gate of Kirkwood into kirkwood.c.
 1.7 06-Sep-2012  msaitoh branches: 1.7.2; 1.7.4;
Add missing ','
It will fix a bug that "vmstat -e" shows the incorrect counts in wrong entries.
 1.6 18-Jul-2012  kiyohara Add 88F6282.
Also fix/add some clock parameters.
 1.5 18-Jul-2012  kiyohara Fix always check high. macro KIRKWOOD_IRQ_* means bit number. HIGH is bit0.
 1.4 24-May-2011  matt branches: 1.4.4; 1.4.10;
Merge in the patch in PR/44965 with some improvements (removing ifs when
possible).
 1.3 22-May-2011  mellon Add support for Dreamplug CPU clock speed detection.
 1.2 30-Oct-2010  kiyohara branches: 1.2.2; 1.2.6;
Fix mvPclk. Need 'break' each 'case'.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.4.3 06-Nov-2010  uebayasi Sync with HEAD.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file kirkwood.c was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file kirkwood.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.6.3 31-May-2011  rmind sync with head
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 30-Oct-2010  rmind file kirkwood.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.2.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.10.2 23-Oct-2012  riz Pull up following revision(s) (requested by msaitoh in ticket #620):
sys/arch/arm/marvell/kirkwood.c: revision 1.7
Add missing ','
It will fix a bug that "vmstat -e" shows the incorrect counts in wrong
entries.
 1.4.10.1 20-Oct-2012  riz Pull up following revision(s) (requested by msaitoh in ticket #609):
sys/arch/arm/marvell/kirkwood.c: revision 1.5
Fix always check high. macro KIRKWOOD_IRQ_* means bit number. HIGH is
bit0.
 1.4.4.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.4.4.1 30-Oct-2012  yamt sync with head
 1.7.4.1 18-May-2014  rmind sync with head
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.9.6.1 05-Feb-2017  skrll Sync with HEAD
 1.7 31-Oct-2022  andvar s/interrut/interrupt/ and s/accelelerator/accelerator/ in comments.
 1.6 23-Dec-2013  kiyohara Fixup model value for Kirkwood 88F6192.
Thanks for lwazidub at gmail com.
Add some KIRKWOOD_MISC_* Registers.
s/AUDIOSDIO/AUDIO/.
 1.5 28-Sep-2013  kiyohara Change address/size of CESA Registers.
 1.4 01-Aug-2012  kiyohara branches: 1.4.2; 1.4.4;
Add Thermal Sensor for Kirkwood(88F6282). tested only OpenBlockS A6.
 1.3 21-Jul-2012  kiyohara Add some comments of 88F6282 and TWSI column.
Add IRQ and BASE for TWSI1.
 1.2 18-Jul-2012  kiyohara Add attributes, irqs and base-address for PEX1.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.14.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.1.14.1 30-Oct-2012  yamt sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file kirkwoodreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file kirkwoodreg.h was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file kirkwoodreg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.4.4.1 18-May-2014  rmind sync with head
 1.4.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.2 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1 30-Sep-2013  kiyohara branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12; 1.1.16;
Add mv78xx0 support. However not test long time.
 1.1.16.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.12.1 05-Feb-2017  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 30-Sep-2013  tls file mv78xx0.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 30-Sep-2013  yamt file mv78xx0.c was added on branch yamt-pagecache on 2014-05-22 11:39:33 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 30-Sep-2013  rmind file mv78xx0.c was added on branch rmind-smpnet on 2014-05-18 17:44:58 +0000
 1.3 31-Oct-2022  andvar s/interrut/interrupt/ and s/accelelerator/accelerator/ in comments.
 1.2 30-Sep-2013  kiyohara Change some defines.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.24; 1.1.28;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.28.1 18-May-2014  rmind sync with head
 1.1.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.14.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.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mv78xx0reg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mv78xx0reg.h was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mv78xx0reg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.33 19-Jun-2023  msaitoh Fix typo. unknwon -> unknown
 1.32 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.31 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.30 24-Apr-2021  thorpej branches: 1.30.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.29 10-Mar-2017  skrll branches: 1.29.28;
Initialise the windows and allow access to PCI Express port 1 first lane.

Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d

mvpex1 at mvsoc0 unit 4 offset 0x80000-0x81fff irq 62: Marvell PCI Express Interface
pci1 at mvpex1
xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04)
xhci0: interrupting at interrupt pin INTA#
usb3 at xhci0: USB revision 3.0
usb4 at xhci0: USB revision 2.0
 1.28 24-Feb-2017  skrll Typo in a model string
 1.27 09-Jan-2017  kiyohara branches: 1.27.2;
Remove no-need #ifdef MARVELL_ATTR_AXI_DDR. It has defined.
 1.26 07-Jan-2017  christos make this compile (but not work) XXX
 1.25 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.24 06-Nov-2015  kiyohara branches: 1.24.2;
Add mvsocts to mvsoc_periph for Armada XP.
 1.23 03-Jun-2015  hsuenaga add new cryptographic accelerator driver 'mvxpsec.'

this driver controls CESA unit as same as mvcesa, but uses DMA engines and
does CBC operations, HMAC operations by hardware. about 2 kbytes of data
are processed at one. supported algorithms are:

- DES-CBC, 3DES-CBC, AES-CBC
- HMAC-SHA1, HMAC-MD5

non-CBC algorithm such as AES-GCM is not supported by CESA's acceleration
engine. mvcesa is still useful to implement such algorithms as combination of
accelerated block cipher and software chaining.
 1.22 03-Jun-2015  hsuenaga separate buffer management codes 'mvxpbm.c' from if_mvxpe.c.

the buffer management(ex. fill the rx descriptors/buffers) is done by H/W in
ARMADA XP/380, and is done by S/W in ARMADA 370. the H/W BM support is not yet
implemented, so all devices use the S/W management mode at this time.
 1.21 03-Jun-2015  hsuenaga dump Mbus settins on boot if AV_VERBOSE or AV_DEBUG is enabled.
 1.20 11-May-2015  hsuenaga add MARVELL Armada XP MV78260 B0(rev.2)
recent OpenBlocks AX3 uses it.
 1.19 03-May-2015  hsuenaga add new ethernet driver mvxpe for recent MARVELL's SoC after ARMADA/XP.
this driver supports 'counter mode', and is disabled by default.

ARMADA SoC family has new ethernet controller acceleration mode called
'enhanced mode' or 'counter mode.' it seems that backward compatibility mode
used by if_mvgbe is still working, but the specification of the old mode
is completely disappeared from SoC's reference manual.

I tested the driver using MIRABOX(ARMADA/370).
 1.18 15-Mar-2014  kiyohara branches: 1.18.6;
Support Armada 370.
 1.17 17-Feb-2014  kiyohara Support MARVELL_TAG_DDR3_CS[0-3].
 1.16 23-Dec-2013  kiyohara Support to check the clock gating for Armada XP in armadaxp.c.
Also move the checking for clock gate of Kirkwood into kirkwood.c.
 1.15 23-Dec-2013  kiyohara Move Misc Registers from mvsocreg.h to armadaxpreg.h. These registers only
Armada XP. The misc_base initializes in initarm() instead of mvsoc_bootstrap().
 1.14 23-Dec-2013  kiyohara Fixup model value for Kirkwood 88F6192.
Thanks for lwazidub at gmail com.
Add some KIRKWOOD_MISC_* Registers.
s/AUDIOSDIO/AUDIO/.
 1.13 30-Sep-2013  kiyohara Remove #ifdef ARMADAXP. It is OK !ARMADAXP.
Add some ARMADAXP devices to peripheral list.
And sort and reorder list.
 1.12 03-Jun-2013  rkujawa branches: 1.12.2;
Add support for SDIO on Armada XP.
 1.11 29-May-2013  rkujawa Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.
 1.10 19-Oct-2012  msaitoh Add CLKGATING_BIT for some devices. This change prevent some boards
that a device's clock is stopped from hangup.
 1.9 10-Aug-2012  matt branches: 1.9.2;
Add MVSOC_CONSOLE_EARLY option to get a com console as soon as initarm
is entered.
 1.8 01-Aug-2012  kiyohara Add Thermal Sensor for Kirkwood(88F6282). tested only OpenBlockS A6.
 1.7 23-Jul-2012  kiyohara Enable idmac.
 1.6 21-Jul-2012  kiyohara Add 88F6282 parameters.
Use MVSOC_UNITID_PEX instead of {ORION,KIRKWOOD}_UNITID_PEX. This PEX UNITID is generic UNITID for MVSoC maybe.
 1.5 12-Feb-2012  matt branches: 1.5.2;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.4 21-Sep-2011  reinoud branches: 1.4.2; 1.4.6;
Add revision 3/A1 of the KIRKWOOD

{ KIRKWOOD(88F6192), 3, "88F619x", "A1", "Kirkwood" },
 1.3 30-Jul-2011  jakllsch Add interrupt info for 88F5182 gtidmac(4) and uncomment.
 1.2 05-Mar-2011  matt branches: 1.2.2;
Add contributed Marvell Kirkwood RTC driver from Brett Slager
Fixes PR 44004
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoc.c was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoc.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.2.3 06-Mar-2011  rmind sync with head (and fix few botches with this)
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 05-Mar-2011  rmind file mvsoc.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 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.2.1 11-Dec-2012  riz sys/arch/arm/marvell/mvsoc.c patch
sys/arch/arm/marvell/mvsocreg.h patch

Add CLKGATING_BIT, enable it for some 88F6281 devices, and don't
configure devices if their clock is disabled.
[msaitoh, ticket #737]
 1.9.2.4 03-Dec-2017  jdolecek update from HEAD
 1.9.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.2 23-Jun-2013  tls resync from head
 1.9.2.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.18.6.4 28-Aug-2017  skrll Sync with HEAD
 1.18.6.3 05-Feb-2017  skrll Sync with HEAD
 1.18.6.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.18.6.1 06-Jun-2015  skrll Sync with HEAD
 1.24.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.27.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.29.28.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.29.28.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.30.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsoc_dma.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoc_dma.c was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoc_dma.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.9 22-Feb-2014  martin Explicitly include armreg.h (for the interrupt enable bit)
 1.8 20-Nov-2013  kiyohara Support __HAVE_PIC_SET_PRIORITY for Armada XP.
 1.7 30-Sep-2013  kiyohara Reorder include opt_mvsoc.h.
 1.6 29-May-2013  rkujawa branches: 1.6.2;
Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.
 1.5 29-Jul-2012  matt branches: 1.5.2;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.4 22-Jul-2012  jakllsch Use IST_LEVEL_HIGH for the ist argument to intr_establish() (as is done in
marvell_intr_establish() and other relevant places) instead of 0 in
mvsoc_bridge_intr_establish(). This IST argument isn't used anywhere,
but it looks better this way.
 1.3 13-Aug-2011  jakllsch branches: 1.3.2;
In *find_pending_irqs() return the value of pic_mark_pending_sources() instead
of 1. Changed to match other ARM PIC code.
 1.2 20-Dec-2010  matt branches: 1.2.6;
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.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoc_intr.c was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoc_intr.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.6.2 05-Mar-2011  rmind sync with head
 1.2.6.1 20-Dec-2010  rmind file mvsoc_intr.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.3.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.3.2.1 30-Oct-2012  yamt sync with head
 1.5.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 23-Jun-2013  tls resync from head
 1.6.2.1 18-May-2014  rmind sync with head
 1.9 13-Jul-2023  riastradh marvell: Reconcile arm vs powerpc marvell_intr_establish.

If there's a better way to do this without #ifdef __powerpc__, please
have at it!
 1.8 25-Jun-2022  jmcneill branches: 1.8.4;
Remove GIC_SPLFUNCS.
 1.7 24-Sep-2021  skrll Catch up with spl changes.

It's 2021 and ugly is in (with apologies to PWEI)
 1.6 03-Jun-2015  hsuenaga dump Mbus settins on boot if AV_VERBOSE or AV_DEBUG is enabled.
 1.5 08-Apr-2015  matt Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
 1.4 18-Mar-2014  matt branches: 1.4.4; 1.4.6;
Only include "opt_mvsoc.h" if _INTR_PRIVATE is defined.
 1.3 20-Nov-2013  kiyohara Support __HAVE_PIC_SET_PRIORITY for Armada XP.
 1.2 29-Jul-2012  matt branches: 1.2.2; 1.2.4;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.14.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.1.14.1 30-Oct-2012  yamt sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsoc_intr.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoc_intr.h was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoc_intr.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.1 06-Jun-2015  skrll Sync with HEAD
 1.4.4.1 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.8.4.1 11-Aug-2023  martin Additionall pull up following revision(s) (requested by riastradh in ticket #316):

sys/dev/marvell/marvellvar.h: revision 1.7
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.9

marvell: Reconcile arm vs powerpc marvell_intr_establish.

If there's a better way to do this without #ifdef __powerpc__, please
have at it!
 1.2 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.1 07-Jan-2017  kiyohara branches: 1.1.4; 1.1.6; 1.1.18; 1.1.34;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1.34.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-Jan-2017  jdolecek file mvsoc_sdhc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.6.1 07-Jan-2017  pgoyette file mvsoc_sdhc.c was added on branch pgoyette-localcount on 2017-03-20 06:57:11 +0000
 1.1.4.2 05-Feb-2017  skrll Sync with HEAD
 1.1.4.1 07-Jan-2017  skrll file mvsoc_sdhc.c was added on branch nick-nhusb on 2017-02-05 13:40:04 +0000
 1.12 23-May-2022  andvar s/controll/control/ in comments.
 1.11 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.10 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.9 10-Mar-2017  skrll branches: 1.9.12;
Initialise the windows and allow access to PCI Express port 1 first lane.

Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d

mvpex1 at mvsoc0 unit 4 offset 0x80000-0x81fff irq 62: Marvell PCI Express Interface
pci1 at mvpex1
xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04)
xhci0: interrupting at interrupt pin INTA#
usb3 at xhci0: USB revision 3.0
usb4 at xhci0: USB revision 2.0
 1.8 07-Jan-2017  kiyohara branches: 1.8.2;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.7 22-Feb-2014  matt branches: 1.7.6; 1.7.10;
Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.6 29-May-2013  rkujawa branches: 1.6.2;
Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.
 1.5 28-Jul-2012  matt branches: 1.5.2;
Add a few missing commas.
 1.4 18-Jul-2012  kiyohara Add bus-space-tags for PEX1 of Kirkwood. But not test.
 1.3 15-Jul-2012  matt Add stream methods
 1.2 01-Jul-2011  dyoung branches: 1.2.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsoc_space.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoc_space.c was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoc_space.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.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.2.2.1 30-Oct-2012  yamt sync with head
 1.5.2.3 03-Dec-2017  jdolecek update from HEAD
 1.5.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 23-Jun-2013  tls resync from head
 1.6.2.1 18-May-2014  rmind sync with head
 1.7.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.7.6.2 28-Aug-2017  skrll Sync with HEAD
 1.7.6.1 05-Feb-2017  skrll Sync with HEAD
 1.8.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.9.12.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9 19-Jun-2023  msaitoh Fix typo. unknwon -> unknown
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 28-Jan-2014  martin branches: 1.6.44;
Remove an unused variable
 1.5 21-Nov-2012  msaitoh branches: 1.5.2;
Fix a uvm_fault panic that memory is not allocated for the last few GPIO bits.
 1.4 10-Sep-2012  msaitoh branches: 1.4.2;
Fix a bug that the irq_masks of GPIO are incorrectly set on Marvell SoCs.
 1.3 13-Aug-2011  jakllsch branches: 1.3.2; 1.3.8;
In *find_pending_irqs() return the value of pic_mark_pending_sources() instead
of 1. Changed to match other ARM PIC code.
 1.2 24-Jan-2011  jakllsch branches: 1.2.2;
Capture more initial GPIO state.
Also, fix behaviour if the number of GPIOs exceed 32.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.1.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsocgpp.c was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsocgpp.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 24-Jan-2011  rmind file mvsocgpp.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.3.8.2 24-Nov-2012  jdc Pull up revision 1.5 (requested by msaitoh in ticket #713).

Fix a uvm_fault panic that memory is not allocated for the last few GPIO bits.
 1.3.8.1 23-Oct-2012  riz Pull up following revision(s) (requested by msaitoh in ticket #623):
sys/arch/arm/marvell/mvsocgpp.c: revision 1.4
Fix a bug that the irq_masks of GPIO are set on Marvell SoCs.
 1.3.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.3.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.4.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 25-Feb-2013  tls resync with head
 1.5.2.1 18-May-2014  rmind sync with head
 1.6.44.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.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsocgppreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsocgppreg.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsocgppreg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsocgppvar.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsocgppvar.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsocgppvar.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.1 07-Jan-2017  kiyohara branches: 1.1.4; 1.1.6; 1.1.18;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-Jan-2017  jdolecek file mvsocpmu.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.6.1 07-Jan-2017  pgoyette file mvsocpmu.c was added on branch pgoyette-localcount on 2017-03-20 06:57:11 +0000
 1.1.4.2 05-Feb-2017  skrll Sync with HEAD
 1.1.4.1 07-Jan-2017  skrll file mvsocpmu.c was added on branch nick-nhusb on 2017-02-05 13:40:04 +0000
 1.1 07-Jan-2017  kiyohara branches: 1.1.4; 1.1.6; 1.1.18;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-Jan-2017  jdolecek file mvsocpmuvar.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 20-Mar-2017  pgoyette Sync with HEAD
 1.1.6.1 07-Jan-2017  pgoyette file mvsocpmuvar.h was added on branch pgoyette-localcount on 2017-03-20 06:57:11 +0000
 1.1.4.2 05-Feb-2017  skrll Sync with HEAD
 1.1.4.1 07-Jan-2017  skrll file mvsocpmuvar.h was added on branch nick-nhusb on 2017-02-05 13:40:04 +0000
 1.14 07-Jan-2025  andvar Fix typos in the word 'Control' in comments.
 1.13 07-Jan-2017  kiyohara branches: 1.13.52;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.12 03-Jun-2015  hsuenaga branches: 1.12.2;
dump Mbus settins on boot if AV_VERBOSE or AV_DEBUG is enabled.
 1.11 19-May-2015  hsuenaga fix Marvell Coherency Barrier register address.
configure coherency bus maintance broadcast using MPIDR. we need to configure
this regardless of 'options MULTIPROCESSOR.'
 1.10 14-May-2015  hsuenaga add synchronization barrier for AURORA_IO_CACHE_COHERENCY.
cleanup MARVELL L2 cache code.
 1.9 17-Feb-2014  kiyohara branches: 1.9.6;
Add some MVSOC_MLMB_ definitions for supporting DDR3.
 1.8 23-Dec-2013  kiyohara Support to check the clock gating for Armada XP in armadaxp.c.
Also move the checking for clock gate of Kirkwood into kirkwood.c.
 1.7 23-Dec-2013  kiyohara Move Misc Registers from mvsocreg.h to armadaxpreg.h. These registers only
Armada XP. The misc_base initializes in initarm() instead of mvsoc_bootstrap().
 1.6 20-Nov-2013  kiyohara Add defines for MISC registers.
 1.5 30-Sep-2013  kiyohara Remove #ifdef ARMADAXP. It is OK !ARMADAXP.
 1.4 29-May-2013  rkujawa branches: 1.4.2;
Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.
 1.3 19-Oct-2012  msaitoh Add CLKGATING_BIT for some devices. This change prevent some boards
that a device's clock is stopped from hangup.
 1.2 01-Feb-2011  jakllsch branches: 1.2.2; 1.2.6; 1.2.12; 1.2.16;
Address 3rd issue in PR#43990.
Different implementation but same method as suggested.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.1.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsocreg.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsocreg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.16.4 03-Dec-2017  jdolecek update from HEAD
 1.2.16.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.16.2 23-Jun-2013  tls resync from head
 1.2.16.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.12.1 11-Dec-2012  riz sys/arch/arm/marvell/mvsoc.c patch
sys/arch/arm/marvell/mvsocreg.h patch

Add CLKGATING_BIT, enable it for some 88F6281 devices, and don't
configure devices if their clock is disabled.
[msaitoh, ticket #737]
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 30-Oct-2012  yamt sync with head
 1.2.2.2 05-Mar-2011  rmind sync with head
 1.2.2.1 01-Feb-2011  rmind file mvsocreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.4.2.1 18-May-2014  rmind sync with head
 1.9.6.2 05-Feb-2017  skrll Sync with HEAD
 1.9.6.1 06-Jun-2015  skrll Sync with HEAD
 1.12.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.52.1 02-Aug-2025  perseant Sync with HEAD
 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 20-Nov-2014  christos use the inline bcdtobin and bintobcd directly instead through a macro.
 1.2 01-Jul-2011  dyoung branches: 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 05-Mar-2011  matt branches: 1.1.2; 1.1.6;
Add contributed Marvell Kirkwood RTC driver from Brett Slager
Fixes PR 44004
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 05-Mar-2011  jruoho file mvsocrtc.c was added on branch jruoho-x86intr on 2011-06-06 09:05:04 +0000
 1.1.2.2 06-Mar-2011  rmind sync with head (and fix few botches with this)
 1.1.2.1 05-Mar-2011  rmind file mvsocrtc.c was added on branch rmind-uvmplock on 2011-03-06 00:26:57 +0000
 1.2.12.1 03-Dec-2017  jdolecek update from HEAD
 1.1 05-Mar-2011  matt branches: 1.1.2; 1.1.6;
Add contributed Marvell Kirkwood RTC driver from Brett Slager
Fixes PR 44004
 1.1.6.2 06-Jun-2011  jruoho Sync with HEAD.
 1.1.6.1 05-Mar-2011  jruoho file mvsocrtcreg.h was added on branch jruoho-x86intr on 2011-06-06 09:05:04 +0000
 1.1.2.2 06-Mar-2011  rmind sync with head (and fix few botches with this)
 1.1.2.1 05-Mar-2011  rmind file mvsocrtcreg.h was added on branch rmind-uvmplock on 2011-03-06 00:26:57 +0000
 1.15 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.14 07-Jan-2017  kiyohara Change to a tab from white-spaces.
 1.13 15-Mar-2014  kiyohara branches: 1.13.6; 1.13.10;
Support Armada 370. tested on MiraBox.
 1.12 26-Feb-2014  martin Initialize mvsoctmr_freq earlier (in mvsoctmr_attach) to avoid division
by zero in calculation of the watchdog parameters.
 1.11 17-Feb-2014  kiyohara Remove TMR_FLAGS_ARMADAXP and Add flags NOBRIDGE, 25MHZ, SYSCLK.
- NOBRIDGE does not go via a bridge.
- 25MHZ is always counted with the cycle of 25 MHz.
- SYSCLK is counted with the cycle of sysClk. This is used in a few days
for Armada 370.
And please use not mvTclk but variable mvsoctmr_freq for calculation of a clock.
(e.g. in delay())
 1.10 14-Oct-2013  kiyohara Remove some #ifdef ARMADAXP. We can enable simultaneously both ARMADAXP and
other SoC options.
 1.9 01-May-2013  rkujawa branches: 1.9.4;
Add support for timers on Armada XP.

Obtained from Marvell, Semihalf.
 1.8 22-Jul-2012  jakllsch branches: 1.8.2;
Actually, the WDT-expired bit in the ICR needs to be cleared before enabling
watchdog reset.
 1.7 22-Jul-2012  jakllsch The maximum watchdog period is dependant on mvTclk; calculate at runtime.
This gets the maximum period up to 25 seconds at 166â…”MHz mvTclk.
 1.6 22-Jul-2012  jakllsch Remove duplicate global variable.
 1.5 22-Jul-2012  jakllsch When disabling watchdog timer, do not set the counter to 0.
Having the watchdog counter at 0 and having WDRstOutEn set to 1 causes
immediate watchdog reset on my 88F5182 A2.
 1.4 19-Jun-2012  hans Add support for the watchdog timer in mvsoctmr.
Tested on DreamPlug system.
 1.3 12-Feb-2012  matt branches: 1.3.2;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.2 09-Jun-2011  jakllsch branches: 1.2.2; 1.2.6;
Rework mvsoctmr(4), improving timekeeping accuracy

Inconveniently the Marvell hardware only counts down.
We need to reverse this for timecounter(9), and we need
to do it in a very lightweight way.

- use Timer0 for the clock interrupt
- use Timer1 for timecounter(9) and delay(9)
- drop statclock due to lack of timers (does anyone actually use this?)
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.12;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.12.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.1.10.3 12-Jun-2011  rmind sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsoctmr.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoctmr.c was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoctmr.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.6.1 18-Feb-2012  mrg merge to -current.
 1.2.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.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.3.2.1 13-Jan-2013  bouyer Pull up following revision(s) (requested by riz in ticket #770):
sys/arch/arm/marvell/files.marvell: revision 1.5
sys/arch/arm/marvell/mvsoctmr.c: revision 1.4
sys/arch/arm/marvell/mvsoctmr.c: revision 1.5
sys/arch/arm/marvell/mvsoctmr.c: revision 1.6
sys/arch/arm/marvell/mvsoctmr.c: revision 1.7
Add support for the watchdog timer in mvsoctmr.
Tested on DreamPlug system.
When disabling watchdog timer, do not set the counter to 0.
Having the watchdog counter at 0 and having WDRstOutEn set to 1 causes
immediate watchdog reset on my 88F5182 A2.
Remove duplicate global variable.
The maximum watchdog period is dependant on mvTclk; calculate at runtime.
This gets the maximum period up to 25 seconds at 166â…”MHz mvTclk.
 1.8.2.3 03-Dec-2017  jdolecek update from HEAD
 1.8.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 23-Jun-2013  tls resync from head
 1.9.4.1 18-May-2014  rmind sync with head
 1.13.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.13.6.1 05-Feb-2017  skrll Sync with HEAD
 1.4 17-Feb-2014  kiyohara Add comment 'Armada XP only' to 25MHz bit. Also it is documented to errata?
 1.3 14-Oct-2013  kiyohara Add timer 2 and 3 for Discovery Innovation.
 1.2 01-May-2013  rkujawa branches: 1.2.4;
Add support for timers on Armada XP.

Obtained from Marvell, Semihalf.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.24;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.24.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.24.1 23-Jun-2013  tls resync from head
 1.1.14.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.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsoctmrreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsoctmrreg.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsoctmrreg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.4.1 18-May-2014  rmind sync with head
 1.3 19-Jun-2023  msaitoh Fix typo. unknwon -> unknown
 1.2 06-Nov-2015  kiyohara Support Armada XP.
 1.1 01-Aug-2012  kiyohara branches: 1.1.2; 1.1.4; 1.1.18;
Add Thermal Sensor for Kirkwood(88F6282). tested only OpenBlockS A6.
 1.1.18.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 01-Aug-2012  yamt file mvsocts.c was added on branch yamt-pagecache on 2012-10-30 17:19:06 +0000
 1.1.2.1 03-Dec-2017  jdolecek update from HEAD
 1.13 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.12 10-Mar-2017  skrll Initialise the windows and allow access to PCI Express port 1 first lane.

Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d

mvpex1 at mvsoc0 unit 4 offset 0x80000-0x81fff irq 62: Marvell PCI Express Interface
pci1 at mvpex1
xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04)
xhci0: interrupting at interrupt pin INTA#
usb3 at xhci0: USB revision 3.0
usb4 at xhci0: USB revision 2.0
 1.11 07-Jan-2017  kiyohara branches: 1.11.2;
Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.10 03-Jun-2015  hsuenaga branches: 1.10.2;
add new cryptographic accelerator driver 'mvxpsec.'

this driver controls CESA unit as same as mvcesa, but uses DMA engines and
does CBC operations, HMAC operations by hardware. about 2 kbytes of data
are processed at one. supported algorithms are:

- DES-CBC, 3DES-CBC, AES-CBC
- HMAC-SHA1, HMAC-MD5

non-CBC algorithm such as AES-GCM is not supported by CESA's acceleration
engine. mvcesa is still useful to implement such algorithms as combination of
accelerated block cipher and software chaining.
 1.9 03-Jun-2015  hsuenaga dump Mbus settins on boot if AV_VERBOSE or AV_DEBUG is enabled.
 1.8 15-Mar-2014  kiyohara branches: 1.8.6;
Add armada370_getclks().
Remove some white spaces.
 1.7 23-Dec-2013  kiyohara Support to check the clock gating for Armada XP in armadaxp.c.
Also move the checking for clock gate of Kirkwood into kirkwood.c.
 1.6 23-Dec-2013  kiyohara Move Misc Registers from mvsocreg.h to armadaxpreg.h. These registers only
Armada XP. The misc_base initializes in initarm() instead of mvsoc_bootstrap().
 1.5 30-Sep-2013  kiyohara Remove #ifdef ARMADAXP. It is OK !ARMADAXP.
Change argument for armadaxp functions.
Add some MV78xx0 definitions.
Add mv78xx0 functions.
 1.4 29-May-2013  rkujawa branches: 1.4.2;
Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.
 1.3 18-Jul-2012  kiyohara branches: 1.3.2;
Add tags for PEX1 of Kirkwood.
Remove unneccesary white-space.
Reorder function prototypes.
 1.2 01-Jul-2011  dyoung branches: 1.2.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file mvsocvar.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file mvsocvar.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file mvsocvar.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.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.2.2.1 30-Oct-2012  yamt sync with head
 1.3.2.3 03-Dec-2017  jdolecek update from HEAD
 1.3.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.1 23-Jun-2013  tls resync from head
 1.4.2.1 18-May-2014  rmind sync with head
 1.8.6.3 28-Aug-2017  skrll Sync with HEAD
 1.8.6.2 05-Feb-2017  skrll Sync with HEAD
 1.8.6.1 06-Jun-2015  skrll Sync with HEAD
 1.10.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.7 30-Aug-2021  rin Add ARMEB support to {evb,}arm/marvell.

Combined with upcoming commit to dev/marvell, all peripheral devices
seem to work just fine for KUROBOX_PRO in big-endian mode.
 1.6 07-Jan-2017  kiyohara Add support Marvell Dove.
Also <SoC>_intr_bootstrap() rename to <SoC>_bootstrap(). And SoC init func, getclk into that.
 1.5 28-Jan-2014  martin branches: 1.5.6; 1.5.10;
Mark a diagnostic-only variable
 1.4 12-Feb-2012  matt branches: 1.4.6; 1.4.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.3 28-Jan-2012  jakllsch I have a feeling 133333334 was off-by-one.
 1.2 28-Jan-2012  jakllsch Constify sysclktbl and use __arraycount thereon.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.18;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.18.1 18-Feb-2012  mrg merge to -current.
 1.1.14.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.1.14.1 17-Apr-2012  yamt sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file orion.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file orion.c was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file orion.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.4.10.1 18-May-2014  rmind sync with head
 1.4.6.2 03-Dec-2017  jdolecek update from HEAD
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.6.1 05-Feb-2017  skrll Sync with HEAD
 1.2 28-Sep-2013  kiyohara Change address/size of CESA Registers.
 1.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.10; 1.1.14; 1.1.24; 1.1.28;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.28.1 18-May-2014  rmind sync with head
 1.1.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.14.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.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file orionreg.h was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file orionreg.h was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file orionreg.h was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.16 14-May-2020  msaitoh Remove extra semicolon.
 1.15 26-Nov-2018  jmcneill Switch to designated initializers
 1.14 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.13 03-Nov-2018  jmcneill Fix build
 1.12 19-Apr-2017  jmcneill branches: 1.12.10; 1.12.12;
Initialize intr_setattr of arm32_pci_chipset
 1.11 10-Mar-2017  skrll Initialise the windows and allow access to PCI Express port 1 first lane.

Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d

mvpex1 at mvsoc0 unit 4 offset 0x80000-0x81fff irq 62: Marvell PCI Express Interface
pci1 at mvpex1
xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04)
xhci0: interrupting at interrupt pin INTA#
usb3 at xhci0: USB revision 3.0
usb4 at xhci0: USB revision 2.0
 1.10 12-Jul-2016  kiyohara branches: 1.10.2; 1.10.4;
Fix intr_establish. PCI interrupt is LEVEL LOW.
 1.9 02-Oct-2015  msaitoh 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.8 30-Mar-2014  christos branches: 1.8.6;
wrap a few lines
 1.7 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.6 26-Mar-2014  christos kill sprintf
 1.5 01-May-2013  rkujawa branches: 1.5.4;
Handle situations where we can have more pexes, like Armada XP.

Obtained from Marvell, Semihalf.
 1.4 07-Sep-2012  matt branches: 1.4.2;
Fix pci_conf_hook/interrupt for ARM.
 1.3 07-Sep-2012  matt Fix more pci_conf_interrupt/pci_conf_hook problems
 1.2 04-Apr-2011  dyoung branches: 1.2.4;
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.1 03-Oct-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10;
Add support Marvell Sheeva Core and SoC. (Orion/Kirkwood)
Discovery Innovation not yet.
 1.1.10.3 21-Apr-2011  rmind sync with head
 1.1.10.2 05-Mar-2011  rmind sync with head
 1.1.10.1 03-Oct-2010  rmind file pci_machdep.c was added on branch rmind-uvmplock on 2011-03-05 20:49:37 +0000
 1.1.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 03-Oct-2010  uebayasi file pci_machdep.c was added on branch uebayasi-xip on 2010-10-22 09:23:12 +0000
 1.1.2.2 09-Oct-2010  yamt sync with head
 1.1.2.1 03-Oct-2010  yamt file pci_machdep.c was added on branch yamt-nfs-mp on 2010-10-09 03:31:40 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 30-Oct-2012  yamt sync with head
 1.4.2.3 03-Dec-2017  jdolecek update from HEAD
 1.4.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 23-Jun-2013  tls resync from head
 1.5.4.1 18-May-2014  rmind sync with head
 1.8.6.3 28-Aug-2017  skrll Sync with HEAD
 1.8.6.2 05-Oct-2016  skrll Sync with HEAD
 1.8.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.10.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.10.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.12.12.1 10-Jun-2019  christos Sync with HEAD
 1.12.10.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12.10.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.53 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.52 29-Aug-2020  jakllsch tegra_xusb: fix xusb static firmware build

To work around objcopy and ld now being unable to create a EABI5 object
from a binary, use the assembler directive .incbin in inline assembly
to pull in the firmware blob.

This also probably makes TEGRA210_XUSB_BIN_STATIC actually work.
 1.51 08-Jul-2020  uwe tegra_xusb depends on firmload.

Make the dependency explicit, do not rely on some random USB device to
pull it in.
 1.50 27-Jul-2019  skrll Remove unused needs-flag
 1.49 08-Jul-2018  jmcneill Use psci_fdt_bootstrap for MP spinup on Tegra210.
 1.48 01-Apr-2018  ryo branches: 1.48.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.47 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.46 26-Dec-2017  jmcneill branches: 1.46.2;
Use DRM GEM/CMA helper.
 1.45 26-Sep-2017  jmcneill branches: 1.45.2;
More PCIe / XUSBPAD initialization goo for Tegra210.
 1.44 22-Sep-2017  jmcneill Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.43 19-Sep-2017  jmcneill Add basic tegra210 xusbpad driver, shorten tegra*xusbpad driver names to
tegra*xpad to fit in dv_xname
 1.42 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.41 21-Jul-2017  jmcneill Add support for NVIDIA Tegra X1.
 1.40 02-Jun-2017  jmcneill Attach Tegra124 DVFS to /cpus/cpu0 now that another driver is claiming the
/cpus node.
 1.39 30-May-2017  jmcneill Fix VERBOSE_INIT_ARM build with TEGRA kernel.
 1.38 28-May-2017  jmcneill Add a facility for platform-specific callbacks and use it to remove most
of the Tegra-specific code from tegra_machdep.c.

Platform code matches on the compatible property of the root ("/") DT node
and allows for chip-specific implementations of the following:

- devmap: Return a 0-terminated list of static device map entries.
- bootstrap: Early initialization of platform-specific facilities.
- early_putchar: Provides an implementation of putchar for use in early
debug messages.
- device_register: Platform-specific device register callback.
- reset: Platform-specific CPU reset implementation.
- consinit: Platform-specific console init implementation.
 1.37 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.36 25-May-2017  jmcneill Chip detection and MP spinup code for Tegra210
 1.35 29-Apr-2017  jmcneill Add Tegra124 APB-DMA controller driver.
 1.34 28-Apr-2017  jmcneill Hide the debug output unless either TEGRA_XUSB_DEBUG is defined or
tegra_xusb_debug is set to 1.
 1.33 23-Apr-2017  jmcneill branches: 1.33.2;
Split cpufreq driver out into a separate module.
 1.32 22-Apr-2017  jmcneill Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.31 21-Apr-2017  jmcneill Fix defparam name (CONADDR -> CONSADDR)
 1.30 11-Apr-2017  jmcneill Hide debug messages with TEGRA_XUSBPAD_DEBUG
 1.29 26-Sep-2016  jakllsch branches: 1.29.2;
Add xhci(4) attachment glue and firmware handler for Tegra K1 "XUSB"
xHCI controller. Adjustments to tegraxusbpad(4) will be needed
to connect the controller to actual USB ports.
 1.28 22-Dec-2015  jmcneill branches: 1.28.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.27 13-Dec-2015  jmcneill Get rid of board-specific options.
 1.26 13-Dec-2015  jmcneill remove tegraio
 1.25 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.24 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.23 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.22 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.21 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.20 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.19 21-Oct-2015  jmcneill Split out USB PHY support out of the ehci glue and into a separate driver.
 1.18 19-Oct-2015  jmcneill defflag TEGRA_HDMI_DEBUG
 1.17 17-Oct-2015  jmcneill Add bus glue for attaching nouveau DRM
 1.16 22-Aug-2015  jmcneill Add kernel config for Tegra K1 "Nyan Big" board, as found in the Acer
Chromebook 13 (CB5-311).
 1.15 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.14 30-May-2015  jmcneill Tegra K1 Watchdog support.
 1.13 18-May-2015  jmcneill Power-on Host1x subsystem
 1.12 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.11 15-May-2015  jmcneill Tegra XUSB PADCTL driver
 1.10 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.9 10-May-2015  jmcneill Tegra I2C driver
 1.8 07-May-2015  jmcneill add Tegra MPIO / Pinmux driver
 1.7 05-May-2015  jmcneill Tegra K1 RTC driver.
 1.6 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.5 02-May-2015  jmcneill jetsontk1 specific gpio setup for sdhc
 1.4 02-May-2015  jmcneill hook in gpio driver
 1.3 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.7 28-Aug-2017  skrll Sync with HEAD
 1.2.2.6 05-Oct-2016  skrll Sync with HEAD
 1.2.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.4 22-Sep-2015  skrll Sync with HEAD
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file files.tegra was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.28.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.28.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.29.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.33.2.1 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.45.2.2 03-Dec-2017  jdolecek update from HEAD
 1.45.2.1 26-Sep-2017  jdolecek file files.tegra was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.46.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.46.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.46.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.48.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.48.2.1 10-Jun-2019  christos Sync with HEAD
 1.22 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.21 31-Jan-2019  skrll branches: 1.21.6;
Fix another build
 1.20 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.19 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.18 07-Jul-2018  jmcneill Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).
 1.17 23-Apr-2017  jmcneill branches: 1.17.10; 1.17.12; 1.17.14;
Split cpufreq driver out into a separate module.
 1.16 22-Apr-2017  jmcneill Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.15 17-Apr-2017  jmcneill Set cpu_cc_freq when changing frequencies.
 1.14 16-Apr-2017  jmcneill get cpu pll clock from devicetree
 1.13 13-Apr-2017  jmcneill DT ode path to i2c controller with ams3722 has changed from /i2c@0,7000d000
to /i2c@7000d000 in newer dts files. Support both paths for cpufreq
scaling.
 1.12 22-Dec-2015  jmcneill branches: 1.12.2; 1.12.4;
Switch Tegra over to fdt based clocks and reset controls.
 1.11 01-Dec-2015  jmcneill replace 2292MHz entry with 2316MHz
 1.10 21-Nov-2015  jmcneill Apply initial fuse offset in tegra_fuse_read instead of in each reg def
 1.9 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.8 12-Nov-2015  jmcneill Standard mode for I2C needs a source divider of 20, not 2.
 1.7 11-Nov-2015  jmcneill make VDD_CPU programming a bit easier to understand, and while here, actually program it to 1.4V as intended instead of 1.39V
 1.6 03-Jun-2015  skrll Use arm_dmb. No functional change
 1.5 31-May-2015  jmcneill set VDD_CPU to 1.4V
 1.4 17-May-2015  matt Restructure a bit to make spinning a subset of cores easier.
 1.3 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.2 26-Apr-2015  jmcneill add Tegra124 MP support
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file soc_tegra124.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.12.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.12.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.17.14.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.14.1 10-Jun-2019  christos Sync with HEAD
 1.17.12.2 20-Oct-2018  pgoyette Sync with head
 1.17.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.17.10.2 03-Dec-2017  jdolecek update from HEAD
 1.17.10.1 23-Apr-2017  jdolecek file soc_tegra124.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.21.6.1 29-Feb-2020  ad Sync with head.
 1.3 08-Jul-2018  jmcneill Use psci_fdt_bootstrap for MP spinup on Tegra210.
 1.2 07-Jul-2018  jmcneill Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).
 1.1 25-May-2017  jmcneill branches: 1.1.6; 1.1.10; 1.1.12; 1.1.14;
Chip detection and MP spinup code for Tegra210
 1.1.14.1 10-Jun-2019  christos Sync with HEAD
 1.1.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 25-May-2017  jdolecek file soc_tegra210.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 25-May-2017  skrll file soc_tegra210.c was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.24 19-Mar-2022  riastradh tegra124_car(4): Attach rndsource synchronously.

It looks like the original motivation for deferring to
config_interrupts was to wait until softint_establish worked. But
this no longer needs to use softints to deliver the entropy, so
that's moot.

Doing this synchronously gives us a better chance for more entropy
earlier.
 1.23 19-Mar-2022  riastradh tegra124_car(4): No need for rnd lock -- delete it.

This only ever reads from a single device register, so no need to
serialize access.

XXX This should really have a hardware-specific health test, but I
can't find any documentation on the underlying physical entropy
source.
 1.22 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.21 12-Aug-2020  jmcneill branches: 1.21.2;
Add CEC clock
 1.20 30-Apr-2020  riastradh rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.19 13-Oct-2019  skrll Restore %# for PRIxBUSADDR
 1.18 13-Oct-2019  skrll Use PRIxBUSADDR
 1.17 09-Mar-2019  jakllsch Add Tegra124 "mselect" clock and two PCIe-related clocks it sources.

With mainline u-boot (not starting the pci subsystem in the firmware):
Gets to a root prompt instead of hanging during tegrapcie attach, but
PCIe remains non-functional without a modern "xusbpad" phy driver for
Tegra124 (needed to configure the lane map).
 1.16 26-Sep-2018  jmcneill Register clocks with clk_attach
 1.15 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.14 21-Jul-2017  jmcneill branches: 1.14.2; 1.14.4; 1.14.6;
Add support for NVIDIA Tegra X1.
 1.13 29-Apr-2017  jmcneill add APB-DMA clock gate
 1.12 26-Apr-2017  jmcneill branches: 1.12.2;
Set host1x parent to pll_p_out0
 1.11 22-Apr-2017  jmcneill Fix fractional divider calculations and round down for sdmmc clocks.
 1.10 16-Apr-2017  jmcneill Add support for multiple clock domains in clk API.
 1.9 14-Apr-2017  jmcneill Add GPU gating clock
 1.8 12-Jan-2017  maya branches: 1.8.2;
fix off by one.

ok riastradh
 1.7 17-Dec-2016  riastradh Simplify bcm2835, tegra, and am335x hardware RNG drivers.

Tested by nick@.
 1.6 08-Sep-2016  jakllsch Add Tegra124 CAR bits to support the XUSB xHCI core.
 1.5 02-Sep-2016  jakllsch Source of pll_p_out5 is not div_pllp_out5 but div_pll_p_out5.
 1.4 17-Aug-2016  jakllsch Complete implementation of clocks for SPI controllers in tegra124_car.
 1.3 17-Aug-2016  jakllsch Fix I2C clock calculations. Previously I2C clocks were half what was
requested. The I2C clock registers have a LSB of one-half rather than
one-whole like the rest of them.
 1.2 23-Dec-2015  jmcneill branches: 1.2.2; 1.2.4;
fix divider calculations for hdmi, and treat clock ID 211 as pll_p_out0 instead of directly pll_p
 1.1 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.2.4.3 26-Apr-2017  pgoyette Sync with HEAD
 1.2.4.2 20-Mar-2017  pgoyette Sync with HEAD
 1.2.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.2.2.5 28-Aug-2017  skrll Sync with HEAD
 1.2.2.4 05-Feb-2017  skrll Sync with HEAD
 1.2.2.3 05-Oct-2016  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 23-Dec-2015  skrll file tegra124_car.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.8.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.12.2.1 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.14.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.6.1 10-Jun-2019  christos Sync with HEAD
 1.14.4.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.14.2.2 03-Dec-2017  jdolecek update from HEAD
 1.14.2.1 21-Jul-2017  jdolecek file tegra124_car.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.21.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 09-Mar-2019  jakllsch Add Tegra124 "mselect" clock and two PCIe-related clocks it sources.

With mainline u-boot (not starting the pci subsystem in the firmware):
Gets to a root prompt instead of hanging during tegrapcie attach, but
PCIe remains non-functional without a modern "xusbpad" phy driver for
Tegra124 (needed to configure the lane map).
 1.6 21-Jul-2017  jmcneill branches: 1.6.2; 1.6.6;
Add support for NVIDIA Tegra X1.
 1.5 22-Jan-2017  jakllsch Whitespace adjustment.
 1.4 22-Jan-2017  jakllsch Define bits in CAR_PLLP_OUTA_REG.
 1.3 08-Sep-2016  jakllsch branches: 1.3.2;
Add Tegra124 CAR bits to support the XUSB xHCI core.
 1.2 17-Aug-2016  jakllsch Complete implementation of clocks for SPI controllers in tegra124_car.
 1.1 22-Dec-2015  jmcneill branches: 1.1.2; 1.1.4;
Switch Tegra over to fdt based clocks and reset controls.
 1.1.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 05-Feb-2017  skrll Sync with HEAD
 1.1.2.3 05-Oct-2016  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 22-Dec-2015  skrll file tegra124_carreg.h was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.3.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.6.1 10-Jun-2019  christos Sync with HEAD
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 21-Jul-2017  jdolecek file tegra124_carreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 25-Aug-2020  skrll branches: 1.5.2;
Protect tegra124_cpu_init_cpufreq against being run more than once.

config_finalize will call all config_finalize_register functions until
all registered functions return 0. rf_autoconfig currently returns 1
which means tegra124_cpu_init_cpufreq would get called multiple times.
 1.4 02-Jun-2017  jmcneill branches: 1.4.6; 1.4.10;
Attach Tegra124 DVFS to /cpus/cpu0 now that another driver is claiming the
/cpus node.
 1.3 29-Apr-2017  jmcneill Adjust voltage when changing CPU frequency.
 1.2 29-Apr-2017  jakllsch - Recognize the AS3722 sd0_v_minus_200mV bit, which is 1 on my Jetson TK1.
- Reduce intended core voltage for Tegra K1 124 by 200mV to 1.2V.

The actual value programmed into the SD0 regulator remains the same (0x50),
a value corresponding to 1.20V.
 1.1 23-Apr-2017  jmcneill branches: 1.1.2; 1.1.4;
Split cpufreq driver out into a separate module.
 1.1.4.1 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.1.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.1.2.1 23-Apr-2017  pgoyette file tegra124_cpu.c was added on branch pgoyette-localcount on 2017-04-26 02:53:00 +0000
 1.4.10.2 03-Dec-2017  jdolecek update from HEAD
 1.4.10.1 02-Jun-2017  jdolecek file tegra124_cpu.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.4.6.2 28-Aug-2017  skrll Sync with HEAD
 1.4.6.1 02-Jun-2017  skrll file tegra124_cpu.c was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.5.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 13-Oct-2019  skrll branches: 1.4.8;
Restore %# for PRIxBUSADDR
 1.3 13-Oct-2019  skrll Use PRIxBUSADDR
 1.2 22-Sep-2017  jakllsch branches: 1.2.2; 1.2.6;
use more symbolic register bits
 1.1 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.2.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 22-Sep-2017  jdolecek file tegra124_xusbpad.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.4.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 22-Sep-2017  jakllsch branches: 1.3.2;
Add more Tegra124 XUSB PADCTL register bits.
 1.2 22-Sep-2017  jakllsch Update #include guard #define after move.
 1.1 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 22-Sep-2017  jdolecek file tegra124_xusbpadreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.27 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.26 30-Apr-2020  riastradh branches: 1.26.2;
rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.25 13-Oct-2019  skrll Restore %# for PRIxBUSADDR
 1.24 13-Oct-2019  skrll Use PRIxBUSADDR
 1.23 14-Dec-2018  skrll Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.22 12-Dec-2018  skrll Trailing whitespace
 1.21 26-Sep-2018  jmcneill Initialize CML1 clock
 1.20 26-Sep-2018  jmcneill Register clocks with clk_attach
 1.19 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.18 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.17 28-Sep-2017  jmcneill branches: 1.17.2; 1.17.4; 1.17.6;
use CLK_GATE_SIMPLE
 1.16 27-Sep-2017  jmcneill Tegra210 HDA support.
 1.15 27-Sep-2017  jmcneill add SOC_THERM and TSENSOR clocks
 1.14 26-Sep-2017  jmcneill More PCIe / XUSBPAD initialization goo for Tegra210.
 1.13 25-Sep-2017  jmcneill Add clocks used by pcie
 1.12 25-Sep-2017  jmcneill Disable debug again
 1.11 25-Sep-2017  jmcneill USB works on Tegra X1 now.
 1.10 24-Sep-2017  jmcneill More XUSB init. A USB3 memory stick seems to work now.
 1.9 23-Sep-2017  jmcneill Disable debug
 1.8 23-Sep-2017  jmcneill Add APBDMA clock
 1.7 23-Sep-2017  jmcneill More XUSB init stuff.
 1.6 22-Sep-2017  jmcneill add USB2_TRK and HSIC_TRK clocks
 1.5 22-Sep-2017  jmcneill Initialize PLLE
 1.4 21-Sep-2017  jmcneill Setup PLLU
 1.3 21-Sep-2017  jmcneill Fix div calculation and utmip init params
 1.2 19-Sep-2017  jmcneill Add some xusb clocks (not working yet)
 1.1 21-Jul-2017  jmcneill branches: 1.1.2;
Add support for NVIDIA Tegra X1.
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 21-Jul-2017  skrll file tegra210_car.c was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.17.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.17.6.1 10-Jun-2019  christos Sync with HEAD
 1.17.4.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.17.4.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.17.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.17.2.2 03-Dec-2017  jdolecek update from HEAD
 1.17.2.1 28-Sep-2017  jdolecek file tegra210_car.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.26.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9 14-Dec-2018  skrll Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.8 25-Sep-2017  jmcneill branches: 1.8.2; 1.8.4; 1.8.6;
Add clocks used by pcie
 1.7 24-Sep-2017  jmcneill More XUSB init. A USB3 memory stick seems to work now.
 1.6 23-Sep-2017  jmcneill More XUSB init stuff.
 1.5 22-Sep-2017  jmcneill #define<tab>
 1.4 22-Sep-2017  jmcneill add USB2_TRK and HSIC_TRK clocks
 1.3 22-Sep-2017  jmcneill More USB3 port init stuff
 1.2 21-Sep-2017  jmcneill Setup PLLU
 1.1 21-Jul-2017  jmcneill branches: 1.1.2;
Add support for NVIDIA Tegra X1.
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 21-Jul-2017  skrll file tegra210_carreg.h was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.8.6.1 10-Jun-2019  christos Sync with HEAD
 1.8.4.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8.2.2 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 25-Sep-2017  jdolecek file tegra210_carreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.2 28-Sep-2019  skrll Update tegra_pinmux to support all bindings (pins and pin groups)

Update tegra210_pinmux.c with all defined pins and groups.
 1.1 22-Sep-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.1.10.1 28-Sep-2019  martin Pull up following revision(s) (requested by skrll in ticket #263):

sys/arch/arm/nvidia/tegra_pinmux.h: revision 1.2
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.3
sys/arch/arm/nvidia/tegra210_pinmux.c: revision 1.2

Update tegra_pinmux to support all bindings (pins and pin groups)
Update tegra210_pinmux.c with all defined pins and groups.
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 22-Sep-2017  jdolecek file tegra210_pinmux.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 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-Jan-2021  thorpej branches: 1.14.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 13-Oct-2019  skrll branches: 1.13.8;
Restore %# for PRIxBUSADDR
 1.12 13-Oct-2019  skrll Use PRIxBUSADDR
 1.11 14-Dec-2018  skrll Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.10 12-Dec-2018  skrll Trailing whitespace
 1.9 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.8 26-Sep-2017  jmcneill branches: 1.8.2; 1.8.4; 1.8.6;
More PCIe / XUSBPAD initialization goo for Tegra210.
 1.7 25-Sep-2017  jmcneill USB works on Tegra X1 now.
 1.6 24-Sep-2017  jmcneill More XUSB init. A USB3 memory stick seems to work now.
 1.5 23-Sep-2017  jmcneill More XUSB init stuff.
 1.4 22-Sep-2017  jmcneill Print an error if we can't acquire a clock or reset
 1.3 22-Sep-2017  jmcneill More USB3 port init stuff
 1.2 20-Sep-2017  jmcneill parse ports node and configure usb2/usb3/hsic ports
 1.1 19-Sep-2017  jmcneill Add basic tegra210 xusbpad driver, shorten tegra*xusbpad driver names to
tegra*xpad to fit in dv_xname
 1.8.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.6.1 10-Jun-2019  christos Sync with HEAD
 1.8.4.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.8.2.2 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 26-Sep-2017  jdolecek file tegra210_xusbpad.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.13.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.18 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.16 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.15 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.14 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.13 28-Dec-2020  jmcneill Remove the AHCI_QUIRK_SKIP_RESET quirk now that the underlying issue is
fixed.
 1.12 14-Dec-2018  skrll branches: 1.12.4; 1.12.12;
Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.11 19-Sep-2017  jmcneill branches: 1.11.2; 1.11.4; 1.11.6;
The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.10 16-Apr-2017  jmcneill Add support for multiple clock domains in clk API.
 1.9 22-Dec-2015  jmcneill branches: 1.9.2; 1.9.4;
Switch Tegra over to fdt based clocks and reset controls.
 1.8 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.7 15-Oct-2015  jmcneill disable SATA sleep feature
 1.6 24-May-2015  jmcneill set AHCI_QUIRK_SKIP_RESET quirk
 1.5 15-May-2015  jmcneill more Tegra SATA init
 1.4 14-May-2015  jmcneill fix SATA controller init
 1.3 10-May-2015  jmcneill Tegra SATA ungating support
 1.2 26-Apr-2015  jmcneill fix bus space handle for ahcisata
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_ahcisata.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.9.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.9.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.11.6.1 10-Jun-2019  christos Sync with HEAD
 1.11.4.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.11.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 19-Sep-2017  jdolecek file tegra_ahcisata.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.12.12.2 03-Apr-2021  thorpej Sync with HEAD.
 1.12.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.12.4.1 30-Dec-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #1167):

sys/dev/ic/ahcisata_core.c: revision 1.84
sys/dev/ic/ahcisata_core.c: revision 1.85
sys/dev/ic/ahcisata_core.c: revision 1.88
sys/dev/ic/ahcisata_core.c: revision 1.89
sys/arch/arm/nvidia/tegra_ahcisata.c: revision 1.13
sys/dev/ic/ahcisatavar.h: revision 1.26
sys/dev/ic/ahcisata_core.c: revision 1.90
sys/dev/ic/ahcisata_core.c: revision 1.91
sys/dev/ic/ahcisata_core.c: revision 1.92
sys/dev/ata/satareg.h: revision 1.6

ahci_exec_fis: wait for the correct amount of time when AT_WAIT is set

Retry clearing WDCTL_RST a few times before giving up. Makes SATA work in
Solidrun Honeycomb LX2K.

AHCI 1.3.1 specification says that it is good practice for system software
to 'zero-out' the memory allocated and referenced by PxCLB and PxFB.

ahci_intr: use ffs in the port bitmask instead of looping over all 32 bits

AHCI 1.3.1 section 5.5.3 "Processing Completed Commands" says that we
should clear PxIS before IS.IPS.

Add G3 and DevSleep definitions. This changes the mask used by
SControl_IPM_NONE from 0x3 to 0x7.

Make sure to ack IS after PxIS when polling and when using multiple MSI-X
messages.

Remove the AHCI_QUIRK_SKIP_RESET quirk now that the underlying issue is
fixed.
 1.3 14-Dec-2018  skrll Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.2 15-Oct-2015  jmcneill branches: 1.2.16; 1.2.18; 1.2.20;
disable SATA sleep feature
 1.1 15-May-2015  jmcneill branches: 1.1.2;
Tegra SATA registers
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 15-May-2015  skrll file tegra_ahcisatareg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.2.20.1 10-Jun-2019  christos Sync with HEAD
 1.2.18.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 15-Oct-2015  jdolecek file tegra_ahcisatareg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.7 13-Oct-2019  skrll branches: 1.7.8;
Restore %# for PRIxBUSADDR
 1.6 13-Oct-2019  skrll Use PRIxBUSADDR
 1.5 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.4 23-Sep-2017  jmcneill branches: 1.4.2; 1.4.4; 1.4.6;
Match nvidia,tegra210-apbdma
 1.3 03-May-2017  jakllsch branches: 1.3.6;
The DMA Request number is seperate from the DMA Channel number, treat as such.
 1.2 03-May-2017  jmcneill tegra_apbdma_acquire: length param is in bytes not cells
 1.1 29-Apr-2017  jmcneill branches: 1.1.2;
Add Tegra124 APB-DMA controller driver.
 1.1.2.3 11-May-2017  pgoyette Sync with HEAD
 1.1.2.2 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.1.2.1 29-Apr-2017  pgoyette file tegra_apbdma.c was added on branch prg-localcount2 on 2017-05-02 03:19:16 +0000
 1.3.6.2 28-Aug-2017  skrll Sync with HEAD
 1.3.6.1 03-May-2017  skrll file tegra_apbdma.c was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.4.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.6.1 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 23-Sep-2017  jdolecek file tegra_apbdma.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.7.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 29-Apr-2017  jmcneill branches: 1.2.2; 1.2.8; 1.2.12;
APB-DMA channel registers start at offset 1000h relative to the APB-DMA
controller registers.
 1.1 29-Apr-2017  jmcneill Add Tegra124 APB-DMA controller driver.
 1.2.12.2 03-Dec-2017  jdolecek update from HEAD
 1.2.12.1 29-Apr-2017  jdolecek file tegra_apbdmareg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.2.8.2 28-Aug-2017  skrll Sync with HEAD
 1.2.8.1 29-Apr-2017  skrll file tegra_apbdmareg.h was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.2.2.2 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.2.2.1 29-Apr-2017  pgoyette file tegra_apbdmareg.h was added on branch prg-localcount2 on 2017-05-02 03:19:16 +0000
 1.1 29-Mar-2015  jmcneill branches: 1.1.2; 1.1.18;
NVIDIA Tegra K1 support, work in progress.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 29-Mar-2015  jdolecek file tegra_apbreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_apbreg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.32 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.31 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.30 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.29 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.28 19-Nov-2015  jmcneill aprint_verbose_dev -> aprint_debug_dev
 1.27 17-Oct-2015  jmcneill add support for enabling the GPU
 1.26 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.25 29-Jul-2015  jmcneill use utmip settings for 12MHz ref clk, not 13MHz
 1.24 25-Jul-2015  jmcneill Add HDMI audio support
 1.23 23-Jul-2015  jmcneill Support fractional dividers. This lets us use 48MHz for SDMMC HS mode
instead of 45.333MHz.
 1.22 23-Jul-2015  jmcneill fix some clocks; many periph dividers are in units of 0.5x not 1x, use PLLD2 for DC, use correct pldiv value for PLLD2
 1.21 30-May-2015  jmcneill branches: 1.21.2;
Tegra K1 Watchdog support.
 1.20 30-May-2015  jmcneill Use PLL LFSR as rnd source.
 1.19 20-May-2015  jmcneill wait for PLLD2 lock
 1.18 18-May-2015  jmcneill make sure the display controllar partition is powered on
 1.17 18-May-2015  jmcneill Power-on Host1x subsystem
 1.16 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.15 16-May-2015  jmcneill use correct enable reg for I2C5
 1.14 15-May-2015  jmcneill more Tegra SATA init
 1.13 14-May-2015  jmcneill enable SATA OOB clock
 1.12 14-May-2015  jmcneill fix SATA controller init
 1.11 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.10 10-May-2015  jmcneill remove debug printf
 1.9 10-May-2015  jmcneill Tegra I2C driver
 1.8 10-May-2015  jmcneill Tegra SATA ungating support
 1.7 10-May-2015  jmcneill Tegra HD audio support (untested as it is for HDMI output)
 1.6 09-May-2015  jmcneill Tegra USB PHY support
 1.5 09-May-2015  jmcneill add tegra_car_pllu_rate
 1.4 03-May-2015  jmcneill add pllc and uart rate funcs
 1.3 03-May-2015  jmcneill when setting sdmmc divisor, do a full reset / enable sequence
 1.2 02-May-2015  jmcneill SDMMC clock input is PLLP (408 MHz). Set input divisor to 2 to get a
204 MHz input for the SDHC, which is just below the maximum supported
frequency for SDR104.
 1.1 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.21.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.21.2.3 22-Sep-2015  skrll Sync with HEAD
 1.21.2.2 06-Jun-2015  skrll Sync with HEAD
 1.21.2.1 30-May-2015  skrll file tegra_car.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.23 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.22 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.21 17-Oct-2015  jmcneill add support for enabling the GPU
 1.20 25-Jul-2015  jmcneill Add HDMI audio support
 1.19 23-Jul-2015  skrll CAR_PLLD_BASE_REG defines
 1.18 30-May-2015  jmcneill branches: 1.18.2;
Tegra K1 Watchdog support.
 1.17 30-May-2015  jmcneill Use PLL LFSR as rnd source.
 1.16 18-May-2015  jmcneill Power-on Host1x subsystem
 1.15 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.14 14-May-2015  jmcneill enable SATA OOB clock
 1.13 14-May-2015  jmcneill fix SATA controller init
 1.12 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.11 10-May-2015  jmcneill Tegra I2C driver
 1.10 10-May-2015  jmcneill Tegra SATA ungating support
 1.9 10-May-2015  jmcneill correct CAR_PLLX_MISC_REG value
 1.8 10-May-2015  jmcneill Tegra HD audio support (untested as it is for HDMI output)
 1.7 09-May-2015  jmcneill Tegra USB PHY support
 1.6 09-May-2015  jmcneill add tegra_car_pllu_rate
 1.5 06-May-2015  skrll More device bit definitions.
 1.4 03-May-2015  jmcneill add pllc and uart rate funcs
 1.3 03-May-2015  jmcneill when setting sdmmc divisor, do a full reset / enable sequence
 1.2 02-May-2015  jmcneill SDMMC clock input is PLLP (408 MHz). Set input divisor to 2 to get a
204 MHz input for the SDHC, which is just below the maximum supported
frequency for SDR104.
 1.1 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.18.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.18.2.3 22-Sep-2015  skrll Sync with HEAD
 1.18.2.2 06-Jun-2015  skrll Sync with HEAD
 1.18.2.1 30-May-2015  skrll file tegra_carreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 21-Jun-2021  christos branches: 1.10.2;
fix proplib deprecation
 1.9 24-Apr-2021  thorpej branches: 1.9.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.6 13-Oct-2019  skrll branches: 1.6.8;
Restore %# for PRIxBUSADDR
 1.5 13-Oct-2019  skrll Use PRIxBUSADDR
 1.4 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.3 22-Dec-2015  jmcneill branches: 1.3.16; 1.3.18; 1.3.20;
Switch Tegra over to fdt based clocks and reset controls.
 1.2 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.1 01-Aug-2015  jmcneill branches: 1.1.2;
Add driver for Tegra HDMI CEC controller.
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 22-Sep-2015  skrll Sync with HEAD
 1.1.2.1 01-Aug-2015  skrll file tegra_cec.c was added on branch nick-nhusb on 2015-09-22 12:05:38 +0000
 1.3.20.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.20.1 10-Jun-2019  christos Sync with HEAD
 1.3.18.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3.16.2 03-Dec-2017  jdolecek update from HEAD
 1.3.16.1 22-Dec-2015  jdolecek file tegra_cec.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.6.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.9.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.10.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 01-Aug-2015  jmcneill branches: 1.1.2; 1.1.18;
Add driver for Tegra HDMI CEC controller.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 01-Aug-2015  jdolecek file tegra_cecreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 22-Sep-2015  skrll Sync with HEAD
 1.1.2.1 01-Aug-2015  skrll file tegra_cecreg.h was added on branch nick-nhusb on 2015-09-22 12:05:38 +0000
 1.1 22-Dec-2015  jmcneill branches: 1.1.2; 1.1.18;
Switch Tegra over to fdt based clocks and reset controls.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 22-Dec-2015  jdolecek file tegra_clock.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 22-Dec-2015  skrll file tegra_clock.h was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.16 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.15 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.14 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.13 28-Sep-2020  jmcneill branches: 1.13.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.12 13-Oct-2019  skrll Restore %# for PRIxBUSADDR
 1.11 13-Oct-2019  skrll Use PRIxBUSADDR
 1.10 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.9 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.8 02-Jun-2017  jmcneill branches: 1.8.8; 1.8.10; 1.8.12;
Allow platform code to specify the UART frequency for consinit
 1.7 29-May-2017  jmcneill Move console initialization out of platform code into the console drivers
themselves.
 1.6 25-May-2017  jmcneill Match nvidia,tegra210-uart and nvidia,tegra20-uart compat strings.
 1.5 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.4 16-Dec-2015  jmcneill use of_getprop_uint32
 1.3 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2 03-May-2015  jmcneill UART clock source is PLLP. Set com type to COM_TYPE_TEGRA.
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_com.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.8.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.12.1 10-Jun-2019  christos Sync with HEAD
 1.8.10.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.8.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.8.8.2 03-Dec-2017  jdolecek update from HEAD
 1.8.8.1 02-Jun-2017  jdolecek file tegra_com.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.13.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 22-Apr-2017  jmcneill branches: 1.5.10;
Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.4 21-Nov-2016  ozaki-r Sweep unnecessary xcall.h inclusions
 1.3 22-Dec-2015  jmcneill branches: 1.3.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.2 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.1 13-May-2015  jmcneill branches: 1.1.2;
Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 05-Dec-2016  skrll Sync with HEAD
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 13-May-2015  skrll file tegra_cpufreq.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.3.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.3.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.10.2 03-Dec-2017  jdolecek update from HEAD
 1.5.10.1 22-Apr-2017  jdolecek file tegra_cpufreq.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.4 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.3 23-Jul-2015  jmcneill add Tegra124 HDMI support
 1.2 08-Jul-2015  jmcneill expose EDID to userland
 1.1 18-May-2015  jmcneill branches: 1.1.2;
Work in progress HDMI / framebuffer support for Tegra K1.
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 22-Sep-2015  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 18-May-2015  skrll file tegra_dc.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.5 14-Nov-2015  jmcneill branches: 1.5.16;
Hardware cursor support.
 1.4 10-Nov-2015  jmcneill Add vblank support
 1.3 23-Jul-2015  skrll More defines
 1.2 23-Jul-2015  jmcneill add Tegra124 HDMI support
 1.1 18-May-2015  jmcneill branches: 1.1.2;
Work in progress HDMI / framebuffer support for Tegra K1.
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 22-Sep-2015  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 18-May-2015  skrll file tegra_dcreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.5.16.2 03-Dec-2017  jdolecek update from HEAD
 1.5.16.1 14-Nov-2015  jdolecek file tegra_dcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.16 21-Apr-2022  andvar s/subesquent/subsequent/ in copy pasted comments.
 1.15 23-Feb-2022  skrll API naming consistency. NFC.
 1.14 19-Dec-2021  riastradh drm: Do the attach task dance for tegra drm.
 1.13 19-Dec-2021  riastradh drm: Make tegra drm build again.
 1.12 19-Dec-2021  riastradh drm_dev_alloc now returns ERR_PTR, check for that.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Aug-2018  riastradh branches: 1.10.12;
Update tegra drm and nouveau to compile with new drmkms.

Compile-tested only.
 1.9 28-Dec-2017  jmcneill branches: 1.9.2; 1.9.4;
Initialize drm_device bus and dma space tags
 1.8 26-Dec-2017  jmcneill Use DRM GEM/CMA helper.
 1.7 16-Apr-2017  jmcneill branches: 1.7.10;
Add support for multiple clock domains in clk API.
 1.6 30-Jan-2016  riastradh branches: 1.6.2; 1.6.4;
Always initialize error.

Found by joerg.
 1.5 22-Dec-2015  jmcneill branches: 1.5.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.4 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.3 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.2 10-Nov-2015  jmcneill Add vblank support
 1.1 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.5.2.4 28-Aug-2017  skrll Sync with HEAD
 1.5.2.3 19-Mar-2016  skrll Sync with HEAD
 1.5.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.2.1 22-Dec-2015  skrll file tegra_drm.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.6.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.7.10.2 03-Dec-2017  jdolecek update from HEAD
 1.7.10.1 16-Apr-2017  jdolecek file tegra_drm.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.9.4.1 10-Jun-2019  christos Sync with HEAD
 1.9.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 19-Dec-2021  riastradh drm: Do the attach task dance for tegra drm.
 1.10 19-Dec-2021  riastradh drm: Make tegra drm build again.
 1.9 27-Aug-2018  riastradh Update tegra drm and nouveau to compile with new drmkms.

Compile-tested only.
 1.8 26-Dec-2017  jmcneill branches: 1.8.2; 1.8.4;
Use DRM GEM/CMA helper.
 1.7 17-Dec-2016  maya branches: 1.7.14;
Fix regression introduced by myself with the addition of da_fb_linebytes

tegra_fb was not adjusted so da_fb_linebytes was used uninitialized

add tfa_fb_linebytes and match radeonfb/nouveaufb code in how we set it
switch to using an initializer to hopefully avoid future errors

this change doesn't need to be pulled up, as tegra_fb.c is absent
in netbsd-7
 1.6 22-Dec-2015  jmcneill branches: 1.6.2; 1.6.4;
Switch Tegra over to fdt based clocks and reset controls.
 1.5 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.4 14-Nov-2015  jmcneill Hardware cursor support.
 1.3 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.2 10-Nov-2015  jmcneill Add vblank support
 1.1 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.6.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.2.3 05-Feb-2017  skrll Sync with HEAD
 1.6.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.2.1 22-Dec-2015  skrll file tegra_drm.h was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.7.14.2 03-Dec-2017  jdolecek update from HEAD
 1.7.14.1 17-Dec-2016  jdolecek file tegra_drm.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.8.4.1 10-Jun-2019  christos Sync with HEAD
 1.8.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10 19-Dec-2021  riastradh drm: Make tegra drm build again.
 1.9 07-Aug-2021  thorpej 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 24-Sep-2018  skrll branches: 1.7.14;
Call drm_fb_helper_prepare in tegra_drm_fb_init as required.

I can boot a kernel with this

jetsontk1# dmesg | grep fb
[ 1.0000580] tegrafb0 at tegradrm0
[ 1.0000580] tegrafb0: framebuffer at 0x9bc00000, size 1024x768, depth 32, stride 4096
[ 1.0000580] wsdisplay0 at tegrafb0 kbdmux 1
jetsontk1#
 1.6 26-Dec-2017  jmcneill branches: 1.6.2; 1.6.4;
Use DRM GEM/CMA helper.
 1.5 01-Jun-2017  chs branches: 1.5.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.4 17-Dec-2016  maya Fix regression introduced by myself with the addition of da_fb_linebytes

tegra_fb was not adjusted so da_fb_linebytes was used uninitialized

add tfa_fb_linebytes and match radeonfb/nouveaufb code in how we set it
switch to using an initializer to hopefully avoid future errors

this change doesn't need to be pulled up, as tegra_fb.c is absent
in netbsd-7
 1.3 16-Nov-2015  jmcneill branches: 1.3.2; 1.3.4;
use XRGB8888 for framebuffer
 1.2 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.1 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.3.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.3.2.4 28-Aug-2017  skrll Sync with HEAD
 1.3.2.3 05-Feb-2017  skrll Sync with HEAD
 1.3.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.2.1 16-Nov-2015  skrll file tegra_drm_fb.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.5.8.2 03-Dec-2017  jdolecek update from HEAD
 1.5.8.1 01-Jun-2017  jdolecek file tegra_drm_fb.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.6.4.1 10-Jun-2019  christos Sync with HEAD
 1.6.2.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.7.14.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.8.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 26-Dec-2017  jmcneill Use DRM GEM/CMA helper.
 1.3 01-Jun-2017  chs branches: 1.3.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.2 16-Nov-2015  jmcneill branches: 1.2.2;
initialize allocated gem object memory to 0
 1.1 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.2.2.3 28-Aug-2017  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 16-Nov-2015  skrll file tegra_drm_gem.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.3.8.2 03-Dec-2017  jdolecek update from HEAD
 1.3.8.1 01-Jun-2017  jdolecek file tegra_drm_gem.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.21 19-Dec-2021  riastradh drm: Make tegra drm build again.
 1.20 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.19 13-Oct-2019  skrll branches: 1.19.8;
Trailing whitespace
 1.18 07-Jul-2019  jmcneill Register userspace interfaces for our connector
 1.17 27-Aug-2018  riastradh Update tegra drm and nouveau to compile with new drmkms.

Compile-tested only.
 1.16 26-Dec-2017  jmcneill branches: 1.16.2; 1.16.4;
Use DRM GEM/CMA helper.
 1.15 01-Jun-2017  chs branches: 1.15.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.14 26-Apr-2017  jmcneill Ignore dc parent clock from devicetree and use hdmi parent for dc.
 1.13 16-Apr-2017  jmcneill Get DC clock parent from devicetree
 1.12 23-Dec-2015  jmcneill branches: 1.12.2; 1.12.4; 1.12.6;
explicitly set high cursor/winbuf address bits when setting modes
 1.11 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.10 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.9 16-Nov-2015  jmcneill commit window changes when updating base
 1.8 15-Nov-2015  jmcneill If we are going to be doing read/modify/write in triple-buffered mode, make sure we don't read back the buffered values and not the active ones
 1.7 14-Nov-2015  jmcneill expose HDMI from HDMI VSDB as physical-address device property when available
 1.6 14-Nov-2015  jmcneill Hardware cursor support.
 1.5 12-Nov-2015  jmcneill Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.4 10-Nov-2015  jmcneill Add vblank support
 1.3 10-Nov-2015  jmcneill support disabling the HDMI output
 1.2 10-Nov-2015  jmcneill allow either crtc to be used with hdmi encoder
 1.1 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.12.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.12.4.1 26-Apr-2017  pgoyette Sync with HEAD
 1.12.2.3 28-Aug-2017  skrll Sync with HEAD
 1.12.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.12.2.1 23-Dec-2015  skrll file tegra_drm_mode.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.15.8.2 03-Dec-2017  jdolecek update from HEAD
 1.15.8.1 01-Jun-2017  jdolecek file tegra_drm_mode.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.16.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.4.1 10-Jun-2019  christos Sync with HEAD
 1.16.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.19.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.20 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19 24-Apr-2021  thorpej branches: 1.19.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.18 27-Jan-2021  thorpej branches: 1.18.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.16 09-Apr-2018  jakllsch branches: 1.16.14;
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.15 25-May-2017  jmcneill branches: 1.15.8; 1.15.10;
Match nvidia,tegra210-ehci and nvidia,tegra30-ehci compat strings.
 1.14 23-May-2016  jmcneill IST_MPSAFE is not a valid flag for fdtbus_intr_establish; use
FDT_INTR_MPSAFE instead.
 1.13 23-Apr-2016  skrll 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.12 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.11 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.10 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.9 21-Oct-2015  jmcneill Split out USB PHY support out of the ehci glue and into a separate driver.
 1.8 21-Oct-2015  jmcneill reduce the number of magic numbers in phy setup, pull settings from device properties instead.
 1.7 22-May-2015  skrll Whitespace.
 1.6 18-May-2015  skrll Use the right IO handle to get HOSTPC. Also, mask out LS and HS from
reported status just-in-case and misc tidyup.

HS, FS and LS now all probe correctly.
 1.5 18-May-2015  skrll Re-enable EHCIF_ETTF and provide a sc_vendor_port_status to get port
speed from HOSTSC1

My FS usb stick works with this change.
 1.4 09-May-2015  jmcneill Tegra USB PHY support
 1.3 09-May-2015  jmcneill if vbus gpio pin is provided, use it to enable vdd
 1.2 26-Apr-2015  jmcneill ehci registers start at +0x100 from USB base address
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.7 28-Aug-2017  skrll Sync with HEAD
 1.1.2.6 29-May-2016  skrll Sync with HEAD
 1.1.2.5 16-Feb-2016  skrll ehci_intr is MPSAFE now
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_ehci.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.15.10.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.15.8.2 03-Dec-2017  jdolecek update from HEAD
 1.15.8.1 25-May-2017  jdolecek file tegra_ehci.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.16.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.18.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.19.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 21-Oct-2015  jmcneill Split out USB PHY support out of the ehci glue and into a separate driver.
 1.2 18-May-2015  skrll branches: 1.2.2;
Re-enable EHCIF_ETTF and provide a sc_vendor_port_status to get port
speed from HOSTSC1

My FS usb stick works with this change.
 1.1 09-May-2015  jmcneill Tegra USB PHY support
 1.2.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 18-May-2015  skrll file tegra_ehcireg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.6 19-Dec-2021  riastradh drm: Do the attach task dance for tegra drm.
 1.5 19-Dec-2021  riastradh drm: Make tegra drm build again.
 1.4 26-Dec-2017  jmcneill Use DRM GEM/CMA helper.
 1.3 17-Dec-2016  maya branches: 1.3.14;
Fix regression introduced by myself with the addition of da_fb_linebytes

tegra_fb was not adjusted so da_fb_linebytes was used uninitialized

add tfa_fb_linebytes and match radeonfb/nouveaufb code in how we set it
switch to using an initializer to hopefully avoid future errors

this change doesn't need to be pulled up, as tegra_fb.c is absent
in netbsd-7
 1.2 12-Nov-2015  jmcneill branches: 1.2.2; 1.2.4;
Use GEM for memory management. Fixes a couple issues while here:
- No longer needs to allocate 35MB (!) for framebuffer console.
- Allows xrandr to switch to modes larger than the framebuffer console.
- Removes hack that redirected mmap calls to wsdisplay0
 1.1 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.2.4.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.2.2.3 05-Feb-2017  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 12-Nov-2015  skrll file tegra_fb.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.3.14.2 03-Dec-2017  jdolecek update from HEAD
 1.3.14.1 17-Dec-2016  jdolecek file tegra_fb.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.6 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.5 22-Apr-2017  jmcneill Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.4 16-Apr-2017  jmcneill Remove list of init devices
 1.3 15-Apr-2017  jmcneill Replace early init node name list with a list of compatible strings.
 1.2 22-Dec-2015  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
Switch Tegra over to fdt based clocks and reset controls.
 1.1 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.4.1 26-Apr-2017  pgoyette Sync with HEAD
 1.2.2.3 28-Aug-2017  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 22-Dec-2015  skrll file tegra_fdt.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 13-Oct-2019  skrll branches: 1.8.8;
Restore %# for PRIxBUSADDR
 1.7 13-Oct-2019  skrll Use PRIxBUSADDR
 1.6 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.5 25-May-2017  jmcneill branches: 1.5.8; 1.5.10; 1.5.12;
Match nvidia,tegra210-efuse compat string.
 1.4 22-Dec-2015  jmcneill branches: 1.4.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.3 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2 21-Nov-2015  jmcneill Apply initial fuse offset in tegra_fuse_read instead of in each reg def
 1.1 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.4.2.3 28-Aug-2017  skrll Sync with HEAD
 1.4.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4.2.1 22-Dec-2015  skrll file tegra_fuse.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.5.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.12.1 10-Jun-2019  christos Sync with HEAD
 1.5.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.5.8.2 03-Dec-2017  jdolecek update from HEAD
 1.5.8.1 25-May-2017  jdolecek file tegra_fuse.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.8.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 11-Nov-2015  jmcneill not used by tegradrm
 1.2 23-Jul-2015  jmcneill add Tegra124 HDMI support
 1.1 18-May-2015  jmcneill branches: 1.1.2;
Work in progress HDMI / framebuffer support for Tegra K1.
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 22-Sep-2015  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 18-May-2015  skrll file tegra_genfb.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 27-Jan-2021  thorpej branches: 1.12.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 13-Oct-2019  skrll branches: 1.11.8;
Restore %# for PRIxBUSADDR
 1.10 13-Oct-2019  skrll Use PRIxBUSADDR
 1.9 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.8 25-May-2017  jmcneill branches: 1.8.8; 1.8.10; 1.8.12;
Match nvidia,tegra210-gpio and nvidia,tegra30-gpio compat strings.
 1.7 13-Mar-2016  christos PR/50963: David Binderman: Use kmem_zalloc() so all members are initialized.
 1.6 22-Dec-2015  jmcneill Add fdtbus_gpio_{read,write}_raw, which tells the controller not to take
polarity into account. Tegra GPIO pin data includes pin polarity, but so
does a regulator-fixed node, so the end result was that the enable value
was being swapped twice. Change fregulator to use the raw APIs, and adapt
Tegra and Exynos GPIO drivers to support this flag.
 1.5 14-Dec-2015  jmcneill handle GPIO_ACTIVE_LOW flag
 1.4 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.3 09-May-2015  jmcneill branches: 1.3.2;
tegra_gpio_acquire: if a pin is required and not in GPIO mode, switch configuration instead of bailing out
 1.2 02-May-2015  jmcneill simplify gpio kpi
 1.1 02-May-2015  jmcneill add GPIO support
 1.3.2.5 28-Aug-2017  skrll Sync with HEAD
 1.3.2.4 19-Mar-2016  skrll Sync with HEAD
 1.3.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.2.2 06-Jun-2015  skrll Sync with HEAD
 1.3.2.1 09-May-2015  skrll file tegra_gpio.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.8.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.12.1 10-Jun-2019  christos Sync with HEAD
 1.8.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.8.8.2 03-Dec-2017  jdolecek update from HEAD
 1.8.8.1 25-May-2017  jdolecek file tegra_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 02-May-2015  jmcneill branches: 1.1.2; 1.1.18;
add GPIO support
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 02-May-2015  jdolecek file tegra_gpioreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 02-May-2015  skrll file tegra_gpioreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.15 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.14 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.13 13-Oct-2019  skrll branches: 1.13.8;
Restore %# for PRIxBUSADDR
 1.12 13-Oct-2019  skrll Use PRIxBUSADDR
 1.11 25-Jul-2019  jmcneill Replace the HDAUDIO_32BIT_ACCESS option with a runtime option. Set it for
tegra_hdaudio, but not for the pci attachment. Add hdaudio@pci to GENERIC64
 1.10 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.9 27-Sep-2017  jmcneill branches: 1.9.2; 1.9.4; 1.9.6;
Tegra210 HDA support.
 1.8 16-Apr-2017  jmcneill Add support for multiple clock domains in clk API.
 1.7 23-Dec-2015  jmcneill branches: 1.7.2; 1.7.4;
HDAUDIO_FLAG_NO_STREAM_RESET hack no longer required
 1.6 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.5 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.4 26-Jul-2015  jmcneill set HDAUDIO_FLAG_NO_STREAM_RESET quirk
 1.3 10-May-2015  jmcneill Tegra HD audio support (untested as it is for HDMI output)
 1.2 26-Apr-2015  jmcneill print "HDA" instead of "SATA" at attach
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.6 28-Aug-2017  skrll Sync with HEAD
 1.1.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.4 22-Sep-2015  skrll Sync with HEAD
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_hdaudio.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.7.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.7.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.9.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.6.1 10-Jun-2019  christos Sync with HEAD
 1.9.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.9.2.2 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 27-Sep-2017  jdolecek file tegra_hdaudio.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.13.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 10-May-2015  jmcneill branches: 1.1.2; 1.1.18;
Tegra HD audio support (untested as it is for HDMI output)
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 10-May-2015  jdolecek file tegra_hdaudioreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 10-May-2015  skrll file tegra_hdaudioreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.11 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.10 19-Oct-2015  jmcneill allow "hdmi.forcemode=dvi" kernel option to force HDMI transmitter into DVI mode
 1.9 31-Jul-2015  jmcneill extract physical address from HDMI VDSB and make it available as the "physical-address" device property
 1.8 26-Jul-2015  jmcneill fix a few typos in the audio infoframe we build
 1.7 25-Jul-2015  jmcneill remove debug printfs, dont force hdmi mode
 1.6 25-Jul-2015  jmcneill Add HDMI audio support
 1.5 23-Jul-2015  jmcneill no need for exact match on tmds mode, just use the closest match
 1.4 23-Jul-2015  jmcneill add Tegra124 HDMI support
 1.3 08-Jul-2015  jmcneill expose EDID to userland
 1.2 18-May-2015  jmcneill branches: 1.2.2;
Make sure HDMI I/O is not in deep power down mode
 1.1 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.2.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.3 22-Sep-2015  skrll Sync with HEAD
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 18-May-2015  skrll file tegra_hdmi.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.6 05-Dec-2021  msaitoh s/stauts/status/
 1.5 10-Nov-2015  jmcneill branches: 1.5.16;
support disabling the HDMI output
 1.4 25-Jul-2015  jmcneill Add HDMI audio support
 1.3 23-Jul-2015  skrll More defines
 1.2 23-Jul-2015  jmcneill add Tegra124 HDMI support
 1.1 18-May-2015  jmcneill branches: 1.1.2;
Work in progress HDMI / framebuffer support for Tegra K1.
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 22-Sep-2015  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 18-May-2015  skrll file tegra_hdmireg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.5.16.2 03-Dec-2017  jdolecek update from HEAD
 1.5.16.1 10-Nov-2015  jdolecek file tegra_hdmireg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.2 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.1 18-May-2015  jmcneill branches: 1.1.2;
Power-on Host1x subsystem
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 18-May-2015  skrll file tegra_host1x.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.28 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.27 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.26 27-Jan-2021  thorpej branches: 1.26.4; 1.26.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.25 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.24 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.23 22-Dec-2019  thorpej branches: 1.23.8;
Use a separate lock (not the i2c bus lock) to synchronize with the
interrupt handler. This in all liklihood fixes a deadlock bug that
necessitated forcing I2C_F_POLL in tegra_i2c_exec() (someone who has
the hardware should test removing that line).

Also includes the changes for:

Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.22 25-Sep-2018  jmcneill Disallow 0-byte transfers and suppress timeout messages
 1.21 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.20 05-Aug-2018  skrll Use PRIxBUSADDR and remove unnecessary cast
 1.19 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.18 01-Jul-2018  jmcneill Use fdtbus_attach_i2cbus
 1.17 09-May-2018  thorpej branches: 1.17.2;
If we don't get informed (via device properties) of child I2C devices,
don't assign an empty array to iba.iba_child_devices, as it will prevent
indirect configuration of the I2C bus from occurring.

Tested on Raspberry Pi (bcm2835), identical logical fix replicated
(and compile-tested) elsewhere.

PR port-arm/53171
 1.16 25-May-2017  jmcneill branches: 1.16.8; 1.16.10;
Match nvidia,tegra210-i2c and nvidia,tegra114-i2c compat strings.
 1.15 08-Aug-2016  jakllsch Send repeated start after command phase if there is any data phase
transfer, not just if the data phase a read operation.
 1.14 08-Aug-2016  jakllsch Adjust data pointer using current, rather than upcoming, transfer length.
 1.13 14-Feb-2016  chs zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.12 22-Dec-2015  jmcneill tegra_car_* and tegra_i2c_dvc_write are no more
 1.11 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.10 16-Dec-2015  jmcneill use of_getprop_uint32
 1.9 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.8 12-Nov-2015  jmcneill Standard mode for I2C needs a source divider of 20, not 2.
 1.7 11-Nov-2015  jmcneill only send repeat start if we are doing write-then-read
 1.6 11-Nov-2015  jmcneill fix i2c periph clock, send repeat start for write-then-read xfers
 1.5 31-May-2015  jmcneill branches: 1.5.2;
add external function for writing to dvc (I2C5) devices
 1.4 17-May-2015  jmcneill initialize FIFO TX/RX trigger levels, wait for MSTR_CONFIG_LOAD to clear after setting it
 1.3 16-May-2015  jmcneill fix source clock divisor, set MSTR_CONFIG_LOAD after updating config, reset controller on errors, read from rx fifo before waiting for xfer to complete
 1.2 16-May-2015  jmcneill Support transfers > 4-bytes long by reading and writing using the
controller's packet-based interface instead of non-packet ("normal") mode.
 1.1 10-May-2015  jmcneill Tegra I2C driver
 1.5.2.6 28-Aug-2017  skrll Sync with HEAD
 1.5.2.5 05-Oct-2016  skrll Sync with HEAD
 1.5.2.4 19-Mar-2016  skrll Sync with HEAD
 1.5.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.2.2 06-Jun-2015  skrll Sync with HEAD
 1.5.2.1 31-May-2015  skrll file tegra_i2c.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.16.10.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.16.10.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.16.10.2 28-Jul-2018  pgoyette Sync with HEAD
 1.16.10.1 21-May-2018  pgoyette Sync with HEAD
 1.16.8.2 03-Dec-2017  jdolecek update from HEAD
 1.16.8.1 25-May-2017  jdolecek file tegra_i2c.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.17.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.2.1 10-Jun-2019  christos Sync with HEAD
 1.23.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.23.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.26.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.26.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.2 16-May-2015  jmcneill branches: 1.2.2; 1.2.18;
Support transfers > 4-bytes long by reading and writing using the
controller's packet-based interface instead of non-packet ("normal") mode.
 1.1 10-May-2015  jmcneill Tegra I2C driver
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 16-May-2015  jdolecek file tegra_i2creg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 16-May-2015  skrll file tegra_i2creg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.12 30-May-2017  jmcneill branches: 1.12.8;
Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.11 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.10 18-Nov-2015  jakllsch Complete the interrupt definitions list from the Tertiary Interrupt
Controller range of the Tegra K1.
 1.9 22-Oct-2015  jmcneill add newline after group of intr defs, no functional change
 1.8 17-Oct-2015  jmcneill add SOR and GPU interrupt numbers
 1.7 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.6 30-May-2015  jmcneill Tegra K1 Watchdog support.
 1.5 17-May-2015  jmcneill add HDMI, DISPLAYA, DISPLAYB irqs
 1.4 10-May-2015  jmcneill Tegra I2C driver
 1.3 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
bump max sources to 256
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.6 28-Aug-2017  skrll Sync with HEAD
 1.2.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.4 22-Sep-2015  skrll Sync with HEAD
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_intr.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.12.8.2 03-Dec-2017  jdolecek update from HEAD
 1.12.8.1 30-May-2017  jdolecek file tegra_intr.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.22 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.21 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.20 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.19 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.18 18-Nov-2015  jakllsch Note the interrupt for Tegra MC in the locators list.
 1.17 09-Nov-2015  jmcneill Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b000000, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.
 1.16 30-Oct-2015  jmcneill initialize phy for the third EHCI controller
 1.15 21-Oct-2015  jmcneill Split out USB PHY support out of the ehci glue and into a separate driver.
 1.14 17-Oct-2015  jmcneill Add bus glue for attaching nouveau DRM
 1.13 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.12 30-May-2015  jmcneill Tegra K1 Watchdog support.
 1.11 18-May-2015  jmcneill Power-on Host1x subsystem
 1.10 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.9 15-May-2015  jmcneill Tegra XUSB PADCTL driver
 1.8 10-May-2015  jmcneill Tegra I2C driver
 1.7 07-May-2015  jmcneill add Tegra MPIO / Pinmux driver
 1.6 05-May-2015  jmcneill Tegra K1 RTC driver.
 1.5 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.4 02-May-2015  jmcneill add GPIO support
 1.3 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.4 22-Sep-2015  skrll Sync with HEAD
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_io.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.6 26-Jan-2019  thorpej branches: 1.6.12;
Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.5 26-May-2017  jmcneill branches: 1.5.8; 1.5.10; 1.5.12;
Match nvidia,tegra210-ictlr compat string.
 1.4 22-Apr-2017  jmcneill Explicitly initialize interrupt controllers and since we pass through to
GIC, don't include "LIC" in interrupt string.
 1.3 05-Jan-2016  marty branches: 1.3.2;
FDT: Interrupts -- add support for interrupt maps

The mct on exynos uses an interrupt map so we add support now. Devices
represent their interrupts either through a combination of interrupt-parent
and interrupts properties, where the 'interrupts' property is an array of
one or more interrupt specifiers; or through a combination of an
interrupt-parent that points to an interrupt-map, where the interrupt-map
contains 2 or more entries consisting of an index, a pointer to an
interrupt-controller, and a specifier for that controller.

This code adds the ability to walk the interrupt-map and return a specifier.
Unfortunately, the addition requires changing the interface to the
interrupt-controllers' _establish and _intstr functions, so this check in
contains a rototill of the three existing fdt interrupt controllers to use
the new interface.
 1.2 16-Dec-2015  jmcneill branches: 1.2.2;
use of_getprop_uint32
 1.1 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 19-Mar-2016  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 16-Dec-2015  skrll file tegra_lic.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.3.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.5.12.1 10-Jun-2019  christos Sync with HEAD
 1.5.10.1 26-Jan-2019  pgoyette Sync with HEAD
 1.5.8.2 03-Dec-2017  jdolecek update from HEAD
 1.5.8.1 26-May-2017  jdolecek file tegra_lic.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.6.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.10 13-Oct-2019  skrll branches: 1.10.8;
Restore %# for PRIxBUSADDR
 1.9 13-Oct-2019  skrll Use PRIxBUSADDR
 1.8 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.7 21-Apr-2017  jmcneill branches: 1.7.10; 1.7.12; 1.7.14;
Get the physical memory layout from the /memory node instead of reading
from the memory controller registers.
 1.6 12-Apr-2017  jmcneill Make tegra_mc_intr static to match prototype
 1.5 13-Dec-2015  jmcneill branches: 1.5.2; 1.5.4;
Use fdt for device enumeration.
 1.4 22-Nov-2015  jmcneill replace inline mc_read/write with MC_READ/WRITE macros, install intr handler with IST_MPSAFE flag
 1.3 21-Nov-2015  jakllsch Add error interrupt handler to for Tegra MC.
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_mc.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.5.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.5.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.7.14.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.14.1 10-Jun-2019  christos Sync with HEAD
 1.7.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.7.10.2 03-Dec-2017  jdolecek update from HEAD
 1.7.10.1 21-Apr-2017  jdolecek file tegra_mc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.10.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 22-Jan-2017  jakllsch branches: 1.3.12;
Add some SMMU registers and bit definitions.
 1.2 21-Nov-2015  jakllsch branches: 1.2.2; 1.2.4;
Add a bunch of hopefully-useful Tegra MC register bits.
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.4 05-Feb-2017  skrll Sync with HEAD
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_mcreg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.2.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3.12.2 03-Dec-2017  jdolecek update from HEAD
 1.3.12.1 22-Jan-2017  jdolecek file tegra_mcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.4 22-Sep-2017  jmcneill Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.3 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2 08-May-2015  jmcneill branches: 1.2.2;
update PM field in set_config
 1.1 07-May-2015  jmcneill add Tegra MPIO / Pinmux driver
 1.2.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 08-May-2015  skrll file tegra_mpio.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.1 07-May-2015  jmcneill branches: 1.1.2; 1.1.18;
add Tegra MPIO / Pinmux driver
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 07-May-2015  jdolecek file tegra_mpioreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 07-May-2015  skrll file tegra_mpioreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.17 19-Dec-2021  riastradh drm_dev_alloc now returns ERR_PTR, check for that.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.16 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.14 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.13 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.12 01-Nov-2018  skrll branches: 1.12.12;
Fix non-DIAGNOSTIC build
 1.11 27-Aug-2018  riastradh Update tegra drm and nouveau to compile with new drmkms.

Compile-tested only.
 1.10 30-May-2017  jmcneill branches: 1.10.8; 1.10.10; 1.10.12;
Use an FDT-based ARM_INTR_IMPL for Tegra.
 1.9 22-Dec-2015  jmcneill branches: 1.9.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.8 13-Dec-2015  jmcneill attach nouveau to fdt
 1.7 27-Oct-2015  riastradh Eliminate Linux struct pci_dev::dev, struct platform_device::dev.
 1.6 18-Oct-2015  jmcneill support passing nouveau.config= and nouveau.debug= on the kernel cmdline
 1.5 18-Oct-2015  jmcneill fill in bus space tag, dma tag for drm device too
 1.4 18-Oct-2015  jmcneill defer DRM initialization until after the root file-system is loaded, so we can read necessary firmware files
 1.3 18-Oct-2015  jmcneill provide dma tag and copy of our struct device (eww)
 1.2 18-Oct-2015  jmcneill dont drop to Debugger on error
 1.1 17-Oct-2015  jmcneill Add bus glue for attaching nouveau DRM
 1.9.2.3 28-Aug-2017  skrll Sync with HEAD
 1.9.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.9.2.1 22-Dec-2015  skrll file tegra_nouveau.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.10.12.1 10-Jun-2019  christos Sync with HEAD
 1.10.10.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.10.10.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.10.8.2 03-Dec-2017  jdolecek update from HEAD
 1.10.8.1 30-May-2017  jdolecek file tegra_nouveau.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.12.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.40 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.39 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38 12-May-2021  thorpej branches: 1.38.4;
Pass along our device handle to the PCI bus instance we attach.
 1.37 24-Apr-2021  thorpej branches: 1.37.2; 1.37.4;
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.36 27-Jan-2021  thorpej branches: 1.36.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.35 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.34 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.33 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than
matching against multiple sets of compatinbility strings.
 1.32 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.31 07-Jul-2020  thorpej branches: 1.31.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.30 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.29 07-Jan-2020  skrll Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())
 1.28 07-Jan-2020  skrll KNF
 1.27 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.26 12-Mar-2019  jakllsch branches: 1.26.4;
Fix paste-o in an error path diagnostic message.
 1.25 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.24 01-Apr-2018  ryo branches: 1.24.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.23 19-Oct-2017  skrll branches: 1.23.2; 1.23.4;
Don't call tegra_pcie_reset_port for now - it makes tk1 re @ pci not work
 1.22 27-Sep-2017  jmcneill enable PHYs
 1.21 26-Sep-2017  jmcneill More PCIe / XUSBPAD initialization goo for Tegra210.
 1.20 25-Sep-2017  jmcneill Enable pcie on tegra210
 1.19 20-Jul-2017  jmcneill Don't match tegra210, this doesn't work yet.
 1.18 26-May-2017  jmcneill Match nvidia,tegra210-pcie compat string.
 1.17 16-Apr-2017  jmcneill Fix previous; pci_intr_setattr takes a pci_intr_handle_t not the driver's
opaque handle.
 1.16 16-Apr-2017  jmcneill Add support for PCI_INTR_MPSAFE
 1.15 17-Aug-2016  jakllsch branches: 1.15.2;
Change tegra_pcie_conf_hook() to only give us the defaults without
enabled bus mastering. Previously both bus mastering and ROM decode
were enabled at pci_configure_bus() time. Both bus mastering and ROM
decode potentially have undesireable side effects. These can best be
managed by drivers familiar with their hardware.
 1.14 13-Dec-2015  jmcneill branches: 1.14.2;
Use fdt for device enumeration.
 1.13 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.12 17-Nov-2015  jakllsch Add PCI Extended Configuration support for tegrapcie(4).

Similar to the acpimcfg code, this only maps the extended configuration
space into KVA for known busses.
 1.11 17-Nov-2015  jakllsch Do not clear the PCIe interrupt until we've allowed its cause to become
deasserted. This halves the PCIe interrupt rate.
 1.10 14-Nov-2015  jakllsch Jetson TK1 u-boot sets up PCI IO space in an impossible-to-use
configuration. As we're already allocating resources on the PCI
bus, set up our own mapping of PCI address spaces into the ARM
address space. We rely on a potential overlap of address space
windows to allow us to use the same bus_space_tag for PCI Memory
and IO spaces.

The PCI attachment of the onboard re(4) uses PCI IO space in
preference to PCI Memory space for register accessses. As IO space
was impossible to use, we had to avoid IO space. This is now no
longer the case, so set up and enable IO space for PCI devices.

Also, map ROM BARs.
 1.9 14-Nov-2015  jakllsch Correct TEGRA_PCIE_A[123] window definitions. Replace existing
usages thereof (and related bus space handles, etc.) with more
appropriate names.
 1.8 14-Nov-2015  jakllsch We don't need to use any particular value, but use the actual interrupt
number for the PCI_INTERRUPT_LINE.
 1.7 13-Nov-2015  jakllsch Limit configuration space access to the non-emulated busses to legacy
PCI_CONF_SIZE. Extended configuration access is possible, we just have
to implement it without wasting up to 256MiB of KVA.
 1.6 13-Nov-2015  jakllsch validate emulated bus 0 configuration space access more carefully
 1.5 13-Nov-2015  jakllsch drop white space on empty line
 1.4 15-Oct-2015  jmcneill explicitly disable PCIe MSI as we dont support it yet
 1.3 02-Oct-2015  msaitoh 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.2 03-May-2015  jmcneill branches: 1.2.2;
coherent dma tag doesnt quite work
 1.1 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.2.2.5 28-Aug-2017  skrll Sync with HEAD
 1.2.2.4 05-Oct-2016  skrll Sync with HEAD
 1.2.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.2 06-Jun-2015  skrll Sync with HEAD
 1.2.2.1 03-May-2015  skrll file tegra_pcie.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.14.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.15.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.23.4.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.23.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.23.2.2 03-Dec-2017  jdolecek update from HEAD
 1.23.2.1 19-Oct-2017  jdolecek file tegra_pcie.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.24.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.24.2.1 10-Jun-2019  christos Sync with HEAD
 1.26.4.1 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.31.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.36.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.37.4.1 31-May-2021  cjep sync with head
 1.37.2.1 13-May-2021  thorpej Sync with HEAD.
 1.38.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 26-Sep-2017  jmcneill branches: 1.4.2;
More PCIe / XUSBPAD initialization goo for Tegra210.
 1.3 14-Nov-2015  jakllsch add more AFI BAR register offsets
 1.2 15-Oct-2015  jmcneill explicitly disable PCIe MSI as we dont support it yet
 1.1 03-May-2015  jmcneill branches: 1.1.2;
Add Tegra K1 PCIE support.
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 03-May-2015  skrll file tegra_pciereg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 26-Sep-2017  jdolecek file tegra_pciereg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 13-Oct-2019  skrll branches: 1.6.8;
Restore %# for PRIxBUSADDR
 1.5 13-Oct-2019  skrll Use PRIxBUSADDR
 1.4 01-Oct-2019  jmcneill Add support for devices with separate "init" and "default" pinctrl states.
 1.3 28-Sep-2019  skrll Update tegra_pinmux to support all bindings (pins and pin groups)

Update tegra210_pinmux.c with all defined pins and groups.
 1.2 16-Jul-2018  christos branches: 1.2.4;
Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.1 22-Sep-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.1.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 22-Sep-2017  jdolecek file tegra_pinmux.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.2.4.2 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.2.4.1 28-Sep-2019  martin Pull up following revision(s) (requested by skrll in ticket #263):

sys/arch/arm/nvidia/tegra_pinmux.h: revision 1.2
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.3
sys/arch/arm/nvidia/tegra210_pinmux.c: revision 1.2

Update tegra_pinmux to support all bindings (pins and pin groups)
Update tegra210_pinmux.c with all defined pins and groups.
 1.6.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 28-Sep-2019  skrll Update tegra_pinmux to support all bindings (pins and pin groups)

Update tegra210_pinmux.c with all defined pins and groups.
 1.1 22-Sep-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.1.10.1 28-Sep-2019  martin Pull up following revision(s) (requested by skrll in ticket #263):

sys/arch/arm/nvidia/tegra_pinmux.h: revision 1.2
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.3
sys/arch/arm/nvidia/tegra210_pinmux.c: revision 1.2

Update tegra_pinmux to support all bindings (pins and pin groups)
Update tegra210_pinmux.c with all defined pins and groups.
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 22-Sep-2017  jdolecek file tegra_pinmux.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.30 04-Oct-2025  thorpej Use device_{get,set}prop_bool() for "is_console".
 1.29 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.28 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.27 24-Apr-2021  thorpej 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.26 04-Feb-2021  thorpej branches: 1.26.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.25 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.24 28-Sep-2020  jmcneill branches: 1.24.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.23 21-Aug-2020  uwe #ifdef consistency.
 1.22 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.21 20-Jun-2020  skrll Convert to new proplib api
 1.20 03-Jan-2019  jmcneill Add a link set for cpu enable methods.
 1.19 15-Dec-2018  jmcneill Add missing call to arm_fdt_cpu_mpstart, fixes SMP on Tegra X1
 1.18 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.17 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.16 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.15 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.14 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.13 08-Jul-2018  jmcneill Use psci_fdt_bootstrap for MP spinup on Tegra210.
 1.12 07-Jul-2018  jmcneill Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).
 1.11 01-Apr-2018  ryo branches: 1.11.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.10 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.9 19-Dec-2017  skrll branches: 1.9.2;
Trailing whitespace
 1.8 22-Oct-2017  skrll branches: 1.8.2;
Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
 1.7 20-Jul-2017  jmcneill branches: 1.7.2;
Get rid of tegra_chip_id/tegra_chip_name and rely on FDT for this info.
 1.6 02-Jun-2017  jmcneill Allow platform code to specify the UART frequency for consinit
 1.5 02-Jun-2017  jmcneill FDT-ize "delay" by having fdt_machdep provide the delay() function and
move the implementations into the platform code.
 1.4 30-May-2017  jmcneill Fix VERBOSE_INIT_ARM build with TEGRA kernel.
 1.3 29-May-2017  jmcneill Rename armv7fdt to armfdt now that bus space + dma tags are filled in by
platform code.
 1.2 29-May-2017  jmcneill Move console initialization out of platform code into the console drivers
themselves.
 1.1 28-May-2017  jmcneill Add a facility for platform-specific callbacks and use it to remove most
of the Tegra-specific code from tegra_machdep.c.

Platform code matches on the compatible property of the root ("/") DT node
and allows for chip-specific implementations of the following:

- devmap: Return a 0-terminated list of static device map entries.
- bootstrap: Early initialization of platform-specific facilities.
- early_putchar: Provides an implementation of putchar for use in early
debug messages.
- device_register: Platform-specific device register callback.
- reset: Platform-specific CPU reset implementation.
- consinit: Platform-specific console init implementation.
 1.7.2.2 28-Aug-2017  skrll Sync with HEAD
 1.7.2.1 20-Jul-2017  skrll file tegra_platform.c was added on branch nick-nhusb on 2017-08-28 17:51:31 +0000
 1.8.2.2 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 22-Oct-2017  jdolecek file tegra_platform.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.9.2.9 18-Jan-2019  pgoyette Synch with HEAD
 1.9.2.8 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.9.2.7 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.9.2.6 20-Oct-2018  pgoyette Sync with head
 1.9.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.9.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.9.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.9.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.9.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.11.2.1 10-Jun-2019  christos Sync with HEAD
 1.24.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.26.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.1 01-Apr-2018  ryo branches: 1.1.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 01-Apr-2018  pgoyette file tegra_platform.h was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.16 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 13-Oct-2019  skrll branches: 1.15.8;
Restore %# for PRIxBUSADDR
 1.14 13-Oct-2019  skrll Use PRIxBUSADDR
 1.13 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.12 01-Apr-2018  ryo branches: 1.12.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.11 20-Jul-2017  jmcneill branches: 1.11.2; 1.11.4;
Get rid of tegra_chip_id/tegra_chip_name and rely on FDT for this info.
 1.10 25-May-2017  jmcneill Match nvidia,tegra210-pmc compat string.
 1.9 25-May-2017  jmcneill Correct an issue introduced in r1.7 that prevented unclamping power for
non-GPU partitions. While here, apply the GPU power workaround to Tegra210
as well.
 1.8 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.7 17-Oct-2015  jmcneill GPU power is controlled by a different register on Tegra124, handle this in tegra_pmc_remove_clamping
 1.6 25-May-2015  jmcneill wait for PWRGATE_TOGGLE.START to clear before submitting a new request
 1.5 18-May-2015  jmcneill Make sure HDMI I/O is not in deep power down mode
 1.4 15-May-2015  jmcneill more Tegra SATA init
 1.3 26-Apr-2015  jmcneill add Tegra124 MP support
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.5 28-Aug-2017  skrll Sync with HEAD
 1.2.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_pmc.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.11.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.11.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.11.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 20-Jul-2017  jdolecek file tegra_pmc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.12.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.2.1 10-Jun-2019  christos Sync with HEAD
 1.15.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 17-Oct-2015  jmcneill branches: 1.5.16;
GPU power is controlled by a different register on Tegra124, handle this in tegra_pmc_remove_clamping
 1.4 18-May-2015  jmcneill Make sure HDMI I/O is not in deep power down mode
 1.3 15-May-2015  jmcneill more Tegra SATA init
 1.2 26-Apr-2015  jmcneill add Tegra124 MP support
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_pmcreg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.5.16.2 03-Dec-2017  jdolecek update from HEAD
 1.5.16.1 17-Oct-2015  jdolecek file tegra_pmcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.25 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.24 21-Jul-2017  jmcneill branches: 1.24.2; 1.24.4;
Add support for NVIDIA Tegra X1.
 1.23 30-May-2017  jmcneill Fix VERBOSE_INIT_ARM build with TEGRA kernel.
 1.22 21-Apr-2017  jmcneill Get the physical memory layout from the /memory node instead of reading
from the memory controller registers.
 1.21 26-Mar-2016  skrll branches: 1.21.2;
Restore HOST1X and AHB_A2 to pmap_devmap to give pmap less work to do
 1.20 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.19 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.18 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.17 14-Nov-2015  jakllsch Jetson TK1 u-boot sets up PCI IO space in an impossible-to-use
configuration. As we're already allocating resources on the PCI
bus, set up our own mapping of PCI address spaces into the ARM
address space. We rely on a potential overlap of address space
windows to allow us to use the same bus_space_tag for PCI Memory
and IO spaces.

The PCI attachment of the onboard re(4) uses PCI IO space in
preference to PCI Memory space for register accessses. As IO space
was impossible to use, we had to avoid IO space. This is now no
longer the case, so set up and enable IO space for PCI devices.

Also, map ROM BARs.
 1.16 14-Nov-2015  jakllsch Correct TEGRA_PCIE_A[123] window definitions. Replace existing
usages thereof (and related bus space handles, etc.) with more
appropriate names.
 1.15 14-Nov-2015  jakllsch Increment TEGRA_PCIE_SIZE

It's a size, not a last-valid-offset.
 1.14 17-Oct-2015  jmcneill add GPU, SOR, and DPAUX offsets
 1.13 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.12 30-May-2015  jmcneill Tegra K1 Watchdog support.
 1.11 18-May-2015  jmcneill Power-on Host1x subsystem
 1.10 17-May-2015  jmcneill add graphics host offsets
 1.9 10-May-2015  jmcneill Tegra I2C driver
 1.8 07-May-2015  jmcneill add Tegra MPIO / Pinmux driver
 1.7 03-May-2015  jmcneill UART clock source is PLLP. Set com type to COM_TYPE_TEGRA.
 1.6 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.5 02-May-2015  jmcneill add GPIO support
 1.4 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.3 26-Apr-2015  jmcneill add Tegra124 MP support
 1.2 26-Apr-2015  jmcneill add AHB_A2 to devmap, print SCTLR value in initarm
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.7 28-Aug-2017  skrll Sync with HEAD
 1.1.2.6 22-Apr-2016  skrll Sync with HEAD
 1.1.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.4 22-Sep-2015  skrll Sync with HEAD
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_reg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.21.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.24.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.24.2.2 03-Dec-2017  jdolecek update from HEAD
 1.24.2.1 21-Jul-2017  jdolecek file tegra_reg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.10 08-Sep-2025  thorpej Garbage-collect fdtbus_todr_attach(); todr_attach() does all the
necessary work now.

kern/59630
 1.9 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.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 13-Oct-2019  skrll branches: 1.7.8;
Restore %# for PRIxBUSADDR
 1.6 13-Oct-2019  skrll Use PRIxBUSADDR
 1.5 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.4 25-May-2017  jmcneill branches: 1.4.8; 1.4.10; 1.4.12;
Match nvidia,tegra210-rtc and nvidia,tegra20-rtc compat strings.
 1.3 22-Apr-2017  jmcneill Use fdtbus_todr_attach
 1.2 13-Dec-2015  jmcneill branches: 1.2.2;
Use fdt for device enumeration.
 1.1 05-May-2015  jmcneill branches: 1.1.2;
Tegra K1 RTC driver.
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 05-May-2015  skrll file tegra_rtc.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.2.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.4.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.12.1 10-Jun-2019  christos Sync with HEAD
 1.4.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4.8.2 03-Dec-2017  jdolecek update from HEAD
 1.4.8.1 25-May-2017  jdolecek file tegra_rtc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.7.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 05-May-2015  jmcneill branches: 1.1.2; 1.1.18;
Tegra K1 RTC driver.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 05-May-2015  jdolecek file tegra_rtcreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 05-May-2015  skrll file tegra_rtcreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.32 06-Feb-2022  jmcneill sdhc: Retire SDHC_FLAG_USE_ADMA2 flag.

ADMA2 support in sdhc is mature now, so no need for it to be opt-in.
 1.31 06-Feb-2022  jmcneill sdhc: tegra: Set SDHC_FLAG_BROKEN_ADMA2_ZEROLEN quirk flag.

The Tegra SDHCI implementation apparently treats ADMA2 descriptors with
length of 0 incorrectly.
 1.30 22-Jan-2022  skrll Ensure bus_dmatag_subregion is called with an inclusive max_addr
everywhere.
 1.29 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.28 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.27 14-Sep-2020  skrll branches: 1.27.2;
Trailing whitespace.
 1.26 01-Mar-2020  skrll bus_dmatag_subregion isn't supported on (compiled into) arm so ifdef its
use in previous.
 1.25 15-Feb-2020  skrll Need to limit the DMA range for tx1. Assume 32bit DMA everywhere for now.
 1.24 13-Oct-2019  skrll branches: 1.24.2;
Restore %# for PRIxBUSADDR
 1.23 13-Oct-2019  skrll Use PRIxBUSADDR
 1.22 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.21 21-Jul-2017  jmcneill branches: 1.21.2; 1.21.4; 1.21.6;
Disable UHS modes if signaling voltage regulator is unavailable.
 1.20 25-May-2017  jmcneill Match nvidia,tegra210-sdhci compat string.
 1.19 22-Apr-2017  jmcneill If the "vqmmc-supply" regulator is present, use it to set signal voltage.
 1.18 22-Apr-2017  jmcneill Set parent clock rate to 100MHz when SDR104 is disabled
 1.17 16-Apr-2017  jmcneill Disable SDR104 until the Tegra K1 custom tuning method is implemented.
This is required to work around errata that describes periodic data CRC
errors after autotuning has completed.
 1.16 11-Apr-2017  jmcneill Set SDHC_FLAG_NO_HS_BIT for Tegra sdhc. No noticeable impact on performance
and it seems to get rid of the spurious data transfer timeouts.
 1.15 22-Dec-2015  jmcneill branches: 1.15.2; 1.15.4;
Switch Tegra over to fdt based clocks and reset controls.
 1.14 16-Dec-2015  jmcneill use of_getprop_uint32
 1.13 15-Dec-2015  jmcneill fdtbus_gpio_read handles pin polarity, so fix inverted test in tegra_sdhc_card_detect
 1.12 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.11 03-Aug-2015  jmcneill set SDHC_FLAG_POLL_CARD_DET when we have a card detect pin
 1.10 02-Aug-2015  jmcneill set ref clk to 204MHz so we can take advantage of UHS-I modes
 1.9 29-Jul-2015  jmcneill enable ADMA2 data transfer mode
 1.8 23-Jul-2015  jmcneill use SDHC_FLAG_NO_TIMEOUT
 1.7 23-Jul-2015  jmcneill Support fractional dividers. This lets us use 48MHz for SDMMC HS mode
instead of 45.333MHz.
 1.6 30-May-2015  jmcneill dont set SDHC_FLAG_NO_HS_BIT flag
 1.5 03-May-2015  jmcneill since we dont support SDR104 yet, dont try to optimize it; instead, optimize for HS mode, which brings us up from 34 MHz to 45.333 MHz
 1.4 03-May-2015  jmcneill set SDHC_FLAG_SINGLE_POWER_WRITE
 1.3 02-May-2015  jmcneill hook up power, card detect, write protect gpios
 1.2 02-May-2015  jmcneill SDMMC clock input is PLLP (408 MHz). Set input divisor to 2 to get a
204 MHz input for the SDHC, which is just below the maximum supported
frequency for SDR104.
 1.1 29-Mar-2015  jmcneill branches: 1.1.2;
NVIDIA Tegra K1 support, work in progress.
 1.1.2.6 28-Aug-2017  skrll Sync with HEAD
 1.1.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.4 22-Sep-2015  skrll Sync with HEAD
 1.1.2.3 06-Jun-2015  skrll Sync with HEAD
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 29-Mar-2015  skrll file tegra_sdhc.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.15.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.15.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.21.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.6.1 10-Jun-2019  christos Sync with HEAD
 1.21.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.21.2.2 03-Dec-2017  jdolecek update from HEAD
 1.21.2.1 21-Jul-2017  jdolecek file tegra_sdhc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.24.2.1 29-Feb-2020  ad Sync with head.
 1.27.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 24-Sep-2018  jmcneill Remove two unused bs handles
 1.15 01-Apr-2018  ryo branches: 1.15.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.14 20-Jul-2017  jmcneill branches: 1.14.2; 1.14.4;
Get rid of tegra_chip_id/tegra_chip_name and rely on FDT for this info.
 1.13 28-May-2017  jmcneill Remove unused tegra_dma_tag
 1.12 27-May-2017  jmcneill GC unused tegra_dma_bootstrap function.
 1.11 25-May-2017  jmcneill Chip detection and MP spinup code for Tegra210
 1.10 22-Apr-2017  jmcneill Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.9 26-Mar-2016  skrll branches: 1.9.2;
Restore HOST1X and AHB_A2 to pmap_devmap to give pmap less work to do
 1.8 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.7 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.6 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.5 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.4 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.3 26-Apr-2015  jmcneill add Tegra124 MP support
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.6 28-Aug-2017  skrll Sync with HEAD
 1.2.2.5 22-Apr-2016  skrll Sync with HEAD
 1.2.2.4 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_soc.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.9.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.14.4.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.14.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.14.2.2 03-Dec-2017  jdolecek update from HEAD
 1.14.2.1 20-Jul-2017  jdolecek file tegra_soc.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.15.2.1 10-Jun-2019  christos Sync with HEAD
 1.13 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.12 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.11 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.10 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.9 13-Oct-2019  skrll branches: 1.9.8;
Restore %# for PRIxBUSADDR
 1.8 13-Oct-2019  skrll Use PRIxBUSADDR
 1.7 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.6 21-Jul-2017  jmcneill branches: 1.6.2; 1.6.4; 1.6.6;
Fix of_search_compatible usage
 1.5 20-Jul-2017  jmcneill Get rid of tegra_chip_id/tegra_chip_name and rely on FDT for this info.
 1.4 16-Apr-2017  jmcneill Add support for multiple clock domains in clk API.
 1.3 22-Dec-2015  jmcneill branches: 1.3.2; 1.3.4; 1.3.6;
Switch Tegra over to fdt based clocks and reset controls.
 1.2 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.1 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.3.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.3.4.1 26-Apr-2017  pgoyette Sync with HEAD
 1.3.2.3 28-Aug-2017  skrll Sync with HEAD
 1.3.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.2.1 22-Dec-2015  skrll file tegra_soctherm.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.6.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.6.1 10-Jun-2019  christos Sync with HEAD
 1.6.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 21-Jul-2017  jdolecek file tegra_soctherm.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.9.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 21-Nov-2015  jmcneill branches: 1.1.2; 1.1.18;
Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 21-Nov-2015  jdolecek file tegra_socthermreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Nov-2015  skrll file tegra_socthermreg.h was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.2 29-Mar-2015  jmcneill Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 13-Oct-2019  skrll branches: 1.11.8;
Restore %# for PRIxBUSADDR
 1.10 13-Oct-2019  skrll Use PRIxBUSADDR
 1.9 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.8 01-Apr-2018  ryo branches: 1.8.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.7 02-Jun-2017  jmcneill branches: 1.7.8; 1.7.10;
FDT-ize "delay" by having fdt_machdep provide the delay() function and
move the implementations into the platform code.
 1.6 25-May-2017  jmcneill Match nvidia,tegra210-timer and nvidia,tegra20-timer compat strings.
 1.5 16-Apr-2017  jmcneill Add support for multiple clock domains in clk API.
 1.4 24-Dec-2015  jmcneill branches: 1.4.2; 1.4.4;
use "watchdog" clock if not defined in fdt
 1.3 22-Dec-2015  jmcneill Switch Tegra over to fdt based clocks and reset controls.
 1.2 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.1 30-May-2015  jmcneill branches: 1.1.2;
Tegra K1 Watchdog support.
 1.1.2.4 28-Aug-2017  skrll Sync with HEAD
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 30-May-2015  skrll file tegra_timer.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.4.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.7.10.2 28-Jul-2018  pgoyette Sync with HEAD
 1.7.10.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.7.8.2 03-Dec-2017  jdolecek update from HEAD
 1.7.8.1 02-Jun-2017  jdolecek file tegra_timer.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.8.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 22-Dec-2015  jmcneill branches: 1.2.16;
Switch Tegra over to fdt based clocks and reset controls.
 1.1 30-May-2015  jmcneill branches: 1.1.2;
Tegra K1 Watchdog support.
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 30-May-2015  skrll file tegra_timerreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 22-Dec-2015  jdolecek file tegra_timerreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 13-Oct-2019  skrll branches: 1.10.8;
Restore %# for PRIxBUSADDR
 1.9 13-Oct-2019  skrll Use PRIxBUSADDR
 1.8 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.7 25-May-2017  jmcneill branches: 1.7.8; 1.7.10; 1.7.12;
Match nvidia,tegra210-usb-phy and nvidia,tegra30-usb-phy compat strings.
 1.6 08-Mar-2016  skrll Use the nvidia,has-utmi-pad-registers property.

From Jared.
 1.5 22-Dec-2015  jmcneill branches: 1.5.2;
Switch Tegra over to fdt based clocks and reset controls.
 1.4 16-Dec-2015  jmcneill use of_getprop_uint32
 1.3 13-Dec-2015  jmcneill Use fdt for device enumeration.
 1.2 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.1 21-Oct-2015  jmcneill Split out USB PHY support out of the ehci glue and into a separate driver.
 1.5.2.4 28-Aug-2017  skrll Sync with HEAD
 1.5.2.3 19-Mar-2016  skrll Sync with HEAD
 1.5.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.2.1 22-Dec-2015  skrll file tegra_usbphy.c was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.7.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.12.1 10-Jun-2019  christos Sync with HEAD
 1.7.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.7.8.2 03-Dec-2017  jdolecek update from HEAD
 1.7.8.1 25-May-2017  jdolecek file tegra_usbphy.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.10.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 22-Jan-2017  jakllsch branches: 1.2.12;
Add TEGRA_EHCI_PHY_VBUS_WAKEUP_ID_REG and bit definitions.
 1.1 21-Oct-2015  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Split out USB PHY support out of the ehci glue and into a separate driver.
 1.1.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.1.4.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.2.3 05-Feb-2017  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 21-Oct-2015  skrll file tegra_usbreg.h was added on branch nick-nhusb on 2015-12-27 12:09:31 +0000
 1.2.12.2 03-Dec-2017  jdolecek update from HEAD
 1.2.12.1 22-Jan-2017  jdolecek file tegra_usbreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.46 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.45 14-Dec-2018  skrll Support SATA on TEGRA210

Thanks to jmcneill for help with this.
 1.44 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.43 07-Jul-2018  jmcneill Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).
 1.42 24-Sep-2017  jmcneill branches: 1.42.2; 1.42.4; 1.42.6;
More XUSB init. A USB3 memory stick seems to work now.
 1.41 22-Sep-2017  jmcneill Replace unused mpio driver with a more generic interface for pinmux, and
add Tegra210 pinmux support.
 1.40 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.39 20-Jul-2017  jmcneill Get rid of tegra_chip_id/tegra_chip_name and rely on FDT for this info.
 1.38 02-Jun-2017  jmcneill FDT-ize "delay" by having fdt_machdep provide the delay() function and
move the implementations into the platform code.
 1.37 28-May-2017  jmcneill Enumerate CPUs, GIC, and generic timer using FDT data instead of relying
on hard-coded tables in mainbus.
 1.36 27-May-2017  jmcneill tegra_dma_bootstrap is no more
 1.35 25-May-2017  jmcneill Chip detection and MP spinup code for Tegra210
 1.34 25-May-2017  jmcneill Add Tegra210 chip ID.
 1.33 22-Apr-2017  jmcneill Get rid of tegra_cpuinit after scanning fdt and attach the cpufreq support
to the /cpus node. Use regulator API instead of poking directly at the I2C
controller to set voltages.
 1.32 21-Apr-2017  jmcneill Get the physical memory layout from the /memory node instead of reading
from the memory controller registers.
 1.31 14-Apr-2017  jmcneill Only route USB ports to XHCI controller after the firmware is loaded
successfully. This gives us working USB (via USB2 controllers) until the
tegra-firmware package is installed.
 1.30 26-Mar-2016  skrll branches: 1.30.2; 1.30.4;
G/C old structs
 1.29 22-Dec-2015  jmcneill tegra_car_* and tegra_i2c_dvc_write are no more
 1.28 21-Nov-2015  jmcneill Add SOC_THERM temperature sensor driver:

# envstat -d tegrasoctherm0
Current CritMax WarnMax WarnMin CritMin Unit
CPU0: 27.500 degC
CPU1: 27.500 degC
CPU2: 29.500 degC
CPU3: 29.000 degC
MEM0: 26.500 degC
MEM1: 27.000 degC
GPU: 27.000 degC
PLLX: 28.000 degC
 1.27 21-Nov-2015  jmcneill Add FUSE driver, use it to determine maximum CPU frequency for the board.
Retire CPUFREQ_BOOT option and always use highest available CPU frequency.
 1.26 19-Nov-2015  jmcneill Remove HOST1X and AHB_A2 from pmap_devmap
 1.25 17-Oct-2015  jmcneill add support for enabling the GPU
 1.24 01-Aug-2015  jmcneill Add driver for Tegra HDMI CEC controller.
 1.23 23-Jul-2015  jmcneill Support fractional dividers. This lets us use 48MHz for SDMMC HS mode
instead of 45.333MHz.
 1.22 08-Jul-2015  jmcneill expose EDID to userland
 1.21 31-May-2015  jmcneill add external function for writing to dvc (I2C5) devices
 1.20 30-May-2015  jmcneill Tegra K1 Watchdog support.
 1.19 18-May-2015  jmcneill Make sure HDMI I/O is not in deep power down mode
 1.18 18-May-2015  jmcneill Power-on Host1x subsystem
 1.17 18-May-2015  jmcneill Work in progress HDMI / framebuffer support for Tegra K1.
 1.16 15-May-2015  jmcneill more Tegra SATA init
 1.15 13-May-2015  jmcneill Tegra K1 CPU frequency scaling support.

jetsontk1# sysctl machdep.cpu
machdep.cpu.frequency.target = 2292
machdep.cpu.frequency.current = 2292
machdep.cpu.frequency.available = 2292 2100 1896 1692 1500 1296 1092 900 696
 1.14 10-May-2015  jmcneill Tegra I2C driver
 1.13 10-May-2015  jmcneill Tegra SATA ungating support
 1.12 10-May-2015  jmcneill Tegra HD audio support (untested as it is for HDMI output)
 1.11 09-May-2015  jmcneill Tegra USB PHY support
 1.10 09-May-2015  jmcneill add tegra_car_pllu_rate
 1.9 07-May-2015  jmcneill add Tegra MPIO / Pinmux driver
 1.8 03-May-2015  jmcneill add pllc and uart rate funcs
 1.7 03-May-2015  jmcneill Add Tegra K1 PCIE support.
 1.6 02-May-2015  jmcneill simplify gpio kpi
 1.5 02-May-2015  jmcneill add GPIO support
 1.4 28-Apr-2015  jmcneill Add a basic driver for the Clock and Reset controller, use it to determine
CPU frequency.
 1.3 26-Apr-2015  jmcneill add Tegra124 MP support
 1.2 29-Mar-2015  jmcneill branches: 1.2.2;
Use shared armv7_generic_space
 1.1 29-Mar-2015  jmcneill NVIDIA Tegra K1 support, work in progress.
 1.2.2.7 28-Aug-2017  skrll Sync with HEAD
 1.2.2.6 22-Apr-2016  skrll Sync with HEAD
 1.2.2.5 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.4 22-Sep-2015  skrll Sync with HEAD
 1.2.2.3 06-Jun-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 29-Mar-2015  skrll file tegra_var.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.30.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.30.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.42.6.1 10-Jun-2019  christos Sync with HEAD
 1.42.4.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.42.4.2 20-Oct-2018  pgoyette Sync with head
 1.42.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.42.2.2 03-Dec-2017  jdolecek update from HEAD
 1.42.2.1 24-Sep-2017  jdolecek file tegra_var.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.3 29-Aug-2020  jakllsch tegra_xusb: fix xusb static firmware build

To work around objcopy and ld now being unable to create a EABI5 object
from a binary, use the assembler directive .incbin in inline assembly
to pull in the firmware blob.

This also probably makes TEGRA210_XUSB_BIN_STATIC actually work.
 1.2 19-Sep-2017  jmcneill branches: 1.2.2;
The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.1 26-Sep-2016  jakllsch branches: 1.1.2; 1.1.4;
Add xhci(4) attachment glue and firmware handler for Tegra K1 "XUSB"
xHCI controller. Adjustments to tegraxusbpad(4) will be needed
to connect the controller to actual USB ports.
 1.1.4.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.4.1 26-Sep-2016  pgoyette file tegra_xusb-fw.mk was added on branch pgoyette-localcount on 2016-11-04 14:48:58 +0000
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 26-Sep-2016  skrll file tegra_xusb-fw.mk was added on branch nick-nhusb on 2016-10-05 20:55:25 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 19-Sep-2017  jdolecek file tegra_xusb-fw.mk was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.28 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.27 24-Apr-2021  thorpej branches: 1.27.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.26 27-Jan-2021  thorpej branches: 1.26.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.25 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.24 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.23 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.22 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.21 15-Oct-2020  jmcneill branches: 1.21.2;
Initialise xhci_softc sc_ios
 1.20 29-Aug-2020  jakllsch tegra_xusb: fix xusb static firmware build

To work around objcopy and ld now being unable to create a EABI5 object
from a binary, use the assembler directive .incbin in inline assembly
to pull in the firmware blob.

This also probably makes TEGRA210_XUSB_BIN_STATIC actually work.
 1.19 13-Oct-2019  skrll Restore %# for PRIxBUSADDR
 1.18 13-Oct-2019  skrll Use PRIxBUSADDR
 1.17 08-Jan-2019  jakllsch Make TEGRA124_XUSB_BIN_STATIC and TEGRA210_XUSB_BIN_STATIC compile again.
 1.16 14-Dec-2018  skrll Provide TEGRA210 supplies.
 1.15 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.14 01-Jul-2018  jmcneill Build fix
 1.13 29-Jun-2018  msaitoh Detect USB 3.1.
 1.12 26-Sep-2017  jmcneill branches: 1.12.2; 1.12.4; 1.12.6;
More PCIe / XUSBPAD initialization goo for Tegra210.
 1.11 25-Sep-2017  jmcneill USB works on Tegra X1 now.
 1.10 24-Sep-2017  jmcneill Enable XUSB power rails at attach
 1.9 22-Sep-2017  jmcneill Enable regulators at attach
 1.8 21-Sep-2017  jmcneill Enable xusb on tegra210
 1.7 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.6 28-Apr-2017  jmcneill branches: 1.6.2;
Hide the debug output unless either TEGRA_XUSB_DEBUG is defined or
tegra_xusb_debug is set to 1.
 1.5 16-Apr-2017  jmcneill branches: 1.5.2;
Add support for multiple clock domains in clk API.
 1.4 14-Apr-2017  jmcneill Only route USB ports to XHCI controller after the firmware is loaded
successfully. This gives us working USB (via USB2 controllers) until the
tegra-firmware package is installed.
 1.3 27-Feb-2017  skrll Attach the usb2 bus - missed in merge from nick-nhusb
 1.2 03-Jan-2017  skrll branches: 1.2.2;
Do some more error checking.

PR/51551
 1.1 26-Sep-2016  jakllsch branches: 1.1.2; 1.1.4;
Add xhci(4) attachment glue and firmware handler for Tegra K1 "XUSB"
xHCI controller. Adjustments to tegraxusbpad(4) will be needed
to connect the controller to actual USB ports.
 1.1.4.5 26-Apr-2017  pgoyette Sync with HEAD
 1.1.4.4 20-Mar-2017  pgoyette Sync with HEAD
 1.1.4.3 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.4.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.4.1 26-Sep-2016  pgoyette file tegra_xusb.c was added on branch pgoyette-localcount on 2016-11-04 14:48:58 +0000
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 05-Feb-2017  skrll Sync with HEAD
 1.1.2.3 02-Jan-2017  skrll Parse the extended capabilies to and log each controller port to SS/HS
bus root hub ports.

Create/attach the two buses and adapt the xhci_roothub_ctrl to deal with
both buses and sets of roothub ports.

XXX the roothub ub_devices entry needs work to interact with usbdevs(1)
XXX correctly
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 26-Sep-2016  skrll file tegra_xusb.c was added on branch nick-nhusb on 2016-10-05 20:55:25 +0000
 1.2.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.5.2.1 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.6.2.1 16-Nov-2019  martin Pull up the following revisions, requested by msaitoh in ticket #1443:

sys/arch/arm/nvidia/tegra_xusb.c 1.13-1.14 via patch
sys/dev/pci/xhci_pci.c 1.13
sys/dev/usb/usb.c 1.169
sys/dev/usb/usbdivar.h 1.116
sys/dev/usb/xhci.c 1.93, 1.95, 1.97
sys/dev/usb/xhcireg.h 1.11-1.12

Detect USB 3.1
 1.12.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.6.1 10-Jun-2019  christos Sync with HEAD
 1.12.4.3 18-Jan-2019  pgoyette Synch with HEAD
 1.12.4.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.12.2.2 03-Dec-2017  jdolecek update from HEAD
 1.12.2.1 26-Sep-2017  jdolecek file tegra_xusb.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.21.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.26.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.27.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 19-Sep-2017  jmcneill branches: 1.6.2;
The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.5 14-Apr-2017  jmcneill Only route USB ports to XHCI controller after the firmware is loaded
successfully. This gives us working USB (via USB2 controllers) until the
tegra-firmware package is installed.
 1.4 11-Apr-2017  jmcneill Hide debug messages with TEGRA_XUSBPAD_DEBUG
 1.3 21-Jan-2017  skrll Pull across from nick-nhusb. This really should be fixed to use the
appropriate FDT info. At this point this is more likely to get fixed in
HEAD than on the branch.
 1.2 13-Dec-2015  jmcneill branches: 1.2.2; 1.2.4;
Use fdt for device enumeration.
 1.1 15-May-2015  jmcneill branches: 1.1.2;
Tegra XUSB PADCTL driver
 1.1.2.5 28-Aug-2017  skrll Sync with HEAD
 1.1.2.4 01-Nov-2016  jakllsch Tegra K1 XUSB pad setup for Jetson TK1.
Needs generalization and further cleanup.
 1.1.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 15-May-2015  skrll file tegra_xusbpad.c was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.2.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.2.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.2.2 03-Dec-2017  jdolecek update from HEAD
 1.6.2.1 19-Sep-2017  jdolecek file tegra_xusbpad.c was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1 19-Sep-2017  jmcneill branches: 1.1.2;
The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 19-Sep-2017  jdolecek file tegra_xusbpad.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.3 19-Sep-2017  jmcneill The xusbpad driver is tegra 124 specific so split it out into a separate
driver. Add (not yet working) tegra 210 support to the xusb driver.
 1.2 26-Sep-2016  jakllsch Add register definitions that will be necessary for future
tegraxusbpadctl(4) changes.
 1.1 15-May-2015  jmcneill branches: 1.1.2; 1.1.4;
Tegra XUSB PADCTL driver
 1.1.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.2.3 05-Oct-2016  skrll Sync with HEAD
 1.1.2.2 06-Jun-2015  skrll Sync with HEAD
 1.1.2.1 15-May-2015  skrll file tegra_xusbpadreg.h was added on branch nick-nhusb on 2015-06-06 14:39:56 +0000
 1.1 26-Sep-2016  jakllsch branches: 1.1.2; 1.1.4; 1.1.18;
Add xhci(4) attachment glue and firmware handler for Tegra K1 "XUSB"
xHCI controller. Adjustments to tegraxusbpad(4) will be needed
to connect the controller to actual USB ports.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 26-Sep-2016  jdolecek file tegra_xusbreg.h was added on branch tls-maxphys on 2017-12-03 11:35:54 +0000
 1.1.4.2 04-Nov-2016  pgoyette Sync with HEAD
 1.1.4.1 26-Sep-2016  pgoyette file tegra_xusbreg.h was added on branch pgoyette-localcount on 2016-11-04 14:48:58 +0000
 1.1.2.2 05-Oct-2016  skrll Sync with HEAD
 1.1.2.1 26-Sep-2016  skrll file tegra_xusbreg.h was added on branch nick-nhusb on 2016-10-05 20:55:25 +0000
 1.4 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.3 04-May-2023  bouyer i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.2 20-Jul-2022  riastradh branches: 1.2.4;
drm: Use CPPFLAGS.drmkms in all local drm drivers too.

This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file files.imx was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2.4.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.8 04-Oct-2025  thorpej Use device_{get,set}prop_bool() for rgmii-related properties.
 1.7 27-Dec-2022  mrg don't use uninitialised data. should fix PR#57135's crash.

XXX: pullup-10
 1.6 27-Jan-2021  thorpej branches: 1.6.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file if_enet_imx.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.6.18.1 29-Dec-2022  martin Pull up following revision(s) (requested by mrg in ticket #29):

sys/arch/arm/nxp/if_enet_imx.c: revision 1.7

don't use uninitialised data. should fix PR#57135's crash.
 1.5 01-Sep-2024  skrll Trailing whitespace
 1.4 04-May-2023  bouyer branches: 1.4.6;
i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.3 14-Apr-2023  bouyer In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc
Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c

NFCI
 1.2 27-Sep-2022  skrll branches: 1.2.4;
Remove unnecessary sys/malloc.h include
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ccm.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2.4.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.4.6.1 02-Aug-2025  perseant Sync with HEAD
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 04-May-2023  bouyer i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.1 23-Dec-2020  skrll branches: 1.1.2; 1.1.20;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.20.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ccmreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.3 04-May-2023  bouyer i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.2 14-Apr-2023  bouyer In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc
Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c

NFCI
 1.1 23-Dec-2020  skrll branches: 1.1.2; 1.1.20;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.20.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ccmvar.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.8 01-Sep-2024  skrll Catch up with latest DTS and other fixes from Rui-Xiang Guo on port-arm.
 1.7 01-Sep-2024  skrll Trailing whitespace
 1.6 04-May-2023  bouyer branches: 1.6.6;
i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.5 14-Apr-2023  bouyer In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc
Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c

NFCI
 1.4 27-Sep-2022  skrll branches: 1.4.4;
Remove unnecessary sys/malloc.h include
 1.3 30-Jan-2021  skrll Pretty print
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_clk.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4.4.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.6.6.1 02-Aug-2025  perseant Sync with HEAD
 1.4 19-Dec-2021  riastradh catch up with newer drm_encoder_init prototype


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.3 19-Dec-2021  riastradh drmP.h is no more


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_dwhdmi.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.3 27-Jan-2021  thorpej branches: 1.3.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_gpc.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.3.18.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_gpcreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 19-Jan-2025  skrll Match fsl,imx6dl-iomuxc for the RIoTboard i.MX6S

From Rui-Xiang Guo on port-arm
 1.3 04-May-2023  bouyer branches: 1.3.6;
Add i.mx6sx compatible entries to drivers that should work as is.
 1.2 27-Jan-2021  thorpej branches: 1.2.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_iomux.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2.18.2 02-Feb-2025  martin Pull up following revision(s) (requested by skrll in ticket #1042):

sys/arch/arm/nxp/imx6_iomux.c: revision 1.4

Match fsl,imx6dl-iomuxc for the RIoTboard i.MX6S

From Rui-Xiang Guo on port-arm
 1.2.18.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.3.6.1 02-Aug-2025  perseant Sync with HEAD
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_iomuxreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ocotp.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ocotpreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_ocotpvar.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.7 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.6 27-Jan-2021  thorpej branches: 1.6.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_pcie.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.6.18.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.10 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.9 24-May-2023  bouyer introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.
 1.8 04-May-2023  bouyer i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.
 1.7 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.6 24-Apr-2021  thorpej branches: 1.6.16;
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 05-Feb-2021  skrll branches: 1.5.2;
Fix build
 1.4 04-Feb-2021  thorpej Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.3 29-Jan-2021  rin Fix build without MULTIPROCESSOR.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_platform.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.5.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.6.16.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_platform.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_pwm.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 04-May-2023  bouyer i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.
 1.1 23-Dec-2020  skrll branches: 1.1.2; 1.1.20;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.20.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_reg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.9 10-Sep-2025  thorpej It is not necessary to pass the phandle separately to fdtbus_spi_*(); it
can be retrieved from the device_t.
 1.8 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.7 27-Jan-2021  thorpej branches: 1.7.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.2 23-Dec-2020  skrll branches: 1.2.2;
Attachment pretty print
 1.1 23-Dec-2020  skrll Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.2.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.2.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.2.2.1 23-Dec-2020  thorpej file imx6_spi.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.7.18.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_srcreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.8 04-May-2023  bouyer The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.
Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.
In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.7 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.6 07-Aug-2021  thorpej branches: 1.6.6;
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 30-Jan-2021  skrll branches: 1.4.2;
Don't print undefined interrupt value
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_usb.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4.2.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.4.2.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.5.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6.6.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.3 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.2 27-Jan-2021  thorpej branches: 1.2.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_usbphy.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2.18.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_usbphyreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6_usbreg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 01-Sep-2024  skrll Trailing whitespace
 1.3 05-May-2023  bouyer branches: 1.3.2; 1.3.8;
remove commented out entries, leftover from the imx6q ccm code.
 1.2 05-May-2023  bouyer Fix typo, preventing i2c4 from attaching
 1.1 04-May-2023  bouyer i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
 1.3.8.1 02-Aug-2025  perseant Sync with HEAD
 1.3.2.2 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.3.2.1 05-May-2023  martin file imx6sx_clk.c was added on branch netbsd-10 on 2023-05-28 10:14:35 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx6var.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx7_gpc.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx7d_ccm.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx7d_ccm.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx8mq_ccm.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx8mq_ccm.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.3 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.2 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx8mq_usbphy.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 06-Feb-2022  andvar fix various typos in comments, log messages and documentation.
mainly s/aparently/apparently/ and s/implmented/implemented/.
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ahcisata.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ahcisatareg.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm.h was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_composite.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_div.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_extclk.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_fixed.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_fixed_factor.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_gate.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_mux.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_ccm_pll.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_com.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.2 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_gpio.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.4 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.3 22-Jul-2022  thorpej Normalize how motoi2c controllers are attached.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_i2c.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.8 04-May-2023  bouyer Add i.mx6sx compatible entries to drivers that should work as is.
 1.7 06-Feb-2022  jmcneill branches: 1.7.4;
sdhc: Retire SDHC_FLAG_USE_ADMA2 flag.

ADMA2 support in sdhc is mature now, so no need for it to be opt-in.
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_sdhc.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.7.4.1 28-May-2023  martin Pull up following revision(s) (requested by bouyer in ticket #182):

sys/arch/arm/nxp/imx6_platform.c: revision 1.8 (via patch)
sys/arch/arm/nxp/imx6_platform.c: revision 1.9 (via patch)
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.2
sys/arch/arm/nxp/imx6_ccmvar.h: revision 1.3
distrib/sets/lists/dtb/ad.earmv7hf: revision 1.10
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.1
sys/arch/arm/nxp/imx6_ccm.c: revision 1.3
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.2
sys/arch/arm/nxp/imx6_ccm.c: revision 1.4
sys/arch/arm/nxp/imx6sx_clk.c: revision 1.3
sys/arch/arm/nxp/imx6_spi.c: revision 1.8
sys/arch/arm/nxp/imx_sdhc.c: revision 1.8
sys/arch/arm/imx/imxusb.c: revision 1.19
sys/arch/arm/nxp/imx6_usb.c: revision 1.7
sys/arch/arm/nxp/imx6_usb.c: revision 1.8
sys/arch/arm/nxp/files.imx: revision 1.3
sys/arch/arm/nxp/imx6_clk.c: revision 1.5
sys/arch/arm/nxp/imx6_clk.c: revision 1.6
sys/arch/arm/nxp/imx6_reg.h: revision 1.2
sys/arch/arm/nxp/imx6_gpc.c: revision 1.4
sys/arch/arm/imx/imx23_usb.c: revision 1.6
sys/dtb/arm/Makefile: revision 1.6
sys/arch/arm/imx/imxusbvar.h: revision 1.7
sys/arch/evbarm/conf/GENERIC: revision 1.119
sys/arch/arm/nxp/imx6_ccmreg.h: revision 1.2
sys/arch/arm/nxp/imx6_iomux.c: revision 1.3
sys/arch/arm/nxp/imx6_usbphy.c: revision 1.3
sys/arch/arm/nxp/imx6_pcie.c: revision 1.7

In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc

Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c
NFCI

i.mx6sx CPU support in the CCM module: the clock tree si different from
the i.mx6q
- move i.mx6q-specific functions and data to imx6_clk.c
- add i.mx6sx specific imx6sx_clk.c
- add a imx6sxccm device
i.mx6sx platform support:
- the i.mx6sx has a third AIPS, so KERNEL_IO_IOREG map has to be larger
- the uart clock is at 24Mhz instead of 80.

Add i.mx6sx compatible entries to drivers that should work as is.

Fix typo, preventing i2c4 from attaching
remove commented out entries, leftover from the imx6q ccm code.
introduce imx6sx_platform_bootstrap(), which calls imx_platform_bootstrap()
and then checks for an "arm,cortex-a9-twd-timer" compatible entry in the
fdt. If not present, create one so that a9ptmr will attach.
We need this entry as this is the only timer we support for this platform,
but the upstream imx6sx.dtsi is missing the entry for it (and all A9 CPUs
have it anyway).

Thanks to Jared McNeill for advices and review.

Also build dtb files for CONFIG_SOC_IMX6SX


experimental IMX6SX support:
- add options SOC_IMX6SX
- add imx6sxccm device
tested on a UDOO Neo Full board.

known to work:
- uart (console)
- sdmmc0
- ethernet (enet0)
known to not work:
- USB (device not detected).

needs a modified device tree at this time (add arm,cortex-a9-twd-timer entry
copied from the imx6qdl dtsi); for unkown reason the imx6sx.dtsi file lacks
an entry for the a9ptmr although it is present in the soc (and, from what I
understood, in all cortex A9 SoCs).

Add imx6sx dtb files

The i.mx6sx has 2 OTG and one host-only USB controller, while the 6q has
only one OTG.

Add a "uintptr_t data" argument to all sc_*_md_hook callbacks, which
gets the sc_md_hook_data value when called.

In imx6_usb.c use this to pass the number of OTG controllers to the callbacks.
imx6_usb_init() can then properly call init_otg() or init_h1() for unit 1.

In imx6_usb_attach(), test if there is a vbus-supply property in the fdt,
and enable the regulator if present.

Now the USB port of the UDOO Neo works.
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imx_snvs.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.5 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 12-May-2021  thorpej branches: 1.3.4;
Pass along our device handle to the PCI bus instance we attach.
 1.2 24-Apr-2021  thorpej branches: 1.2.2; 1.2.4;
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.1 23-Dec-2020  skrll branches: 1.1.2; 1.1.4;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.4.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imxpcie.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.2.4.1 31-May-2021  cjep sync with head
 1.2.2.1 13-May-2021  thorpej Sync with HEAD.
 1.3.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 23-Dec-2020  skrll branches: 1.1.2;
Tidyup the i.MX SoC support by

- Moving the FDTised code to sys/arch/arm/nxp to match the
sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
- Secure Non-Volatile Storage
- watchdog driver
- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
boards
 1.1.2.3 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.1 23-Dec-2020  thorpej file imxwdog.c was added on branch thorpej-futex on 2021-01-03 16:34:52 +0000
 1.1 06-Feb-2002  thorpej branches: 1.1.2; 1.1.14;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 06-Feb-2002  jdolecek file files.ofw was added on branch kqueue on 2002-06-23 17:34:55 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file files.ofw was added on branch nathanw_sa on 2002-02-28 04:07:41 +0000
 1.1 06-Feb-2002  thorpej branches: 1.1.2; 1.1.14;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 06-Feb-2002  jdolecek file files.ofwgencfg was added on branch kqueue on 2002-06-23 17:34:55 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file files.ofwgencfg was added on branch nathanw_sa on 2002-02-28 04:07:41 +0000
 1.17 21-Nov-2020  skrll Adjust egister usage so that r4 and r5 are preserved as cur{cpu,lwp}
respectively as required by the change to make ASTs operate per-LWP
rather than per-CPU. DO_AST_AND_RESTORE_ALIGNMENT_FAULTS expects this.

Remove the call to dosoftints while I'm here as it's dont in DO_AST...

XXX untested
 1.16 21-Nov-2020  skrll Trailing whitespace
 1.15 02-Dec-2013  joerg branches: 1.15.42;
Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.14 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.13 29-Aug-2012  matt branches: 1.13.2; 1.13.4;
Avoid using r7 (which is being reserved for a different purpose).
 1.12 20-Dec-2010  matt branches: 1.12.8;
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;
Truly kill current_intr_depth once and for all.
 1.9 17-Oct-2007  garbled branches: 1.9.2; 1.9.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 13-Aug-2007  tsutsui branches: 1.8.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.7 09-Mar-2007  thorpej branches: 1.7.2; 1.7.8; 1.7.10; 1.7.14; 1.7.16; 1.7.18; 1.7.20;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.6 08-Mar-2007  matt Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
 1.5 27-Sep-2006  manu branches: 1.5.4;
- Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 05-Nov-2003  scw branches: 1.3.16;
Enable/Restore alignment fault state on interrupt handler entry/exit.
 1.2 14-Oct-2002  bjh21 branches: 1.2.8;
Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.1 06-Feb-2002  thorpej branches: 1.1.2; 1.1.14;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 06-Feb-2002  jdolecek file ofw_irq.S was added on branch kqueue on 2002-06-23 17:34:55 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file ofw_irq.S was added on branch nathanw_sa on 2002-02-28 04:07:41 +0000
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.3 21-Jan-2008  yamt sync with head
 1.3.16.2 03-Sep-2007  yamt sync with head.
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.22.1 22-Oct-2006  yamt sync with head
 1.4.20.1 18-Nov-2006  ad Sync with head.
 1.5.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.20.3 20-Jan-2008  chris Sync to HEAD.
 1.7.20.2 01-Jan-2008  chris Sync with HEAD.
 1.7.20.1 18-Aug-2007  chris Sync with HEAD
 1.7.18.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.7.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.7.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.7.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.7.10.1 03-Oct-2007  garbled Sync with HEAD
 1.7.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.7.2.1 20-Aug-2007  ad Sync with HEAD.
 1.8.2.4 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.8.2.3 09-Jan-2008  matt sync with HEAD
 1.8.2.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.8.2.1 06-Nov-2007  matt sync with HEAD
 1.9.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.2.1 18-Feb-2008  mjf 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.12.8.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.12.8.1 30-Oct-2012  yamt sync with head
 1.13.4.2 18-May-2014  rmind sync with head
 1.13.4.1 28-Aug-2013  rmind sync with head
 1.13.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.23 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.22 10-Nov-2019  chs branches: 1.22.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.21 21-Sep-2014  christos branches: 1.21.20;
fix leak.
 1.20 20-Jun-2014  joerg branches: 1.20.2;
intrcnt and _intrnames are unused.
 1.19 27-Oct-2012  chs branches: 1.19.10;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 20-Dec-2010  matt branches: 1.18.8; 1.18.18;
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.17 18-Mar-2009  cegger branches: 1.17.4;
Ansify function definitions w/o arguments. Generated with sed.
 1.16 16-Mar-2009  dsl ANSIfy functions with function-pointer arguments
 1.15 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.14 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.13 06-Jan-2008  matt branches: 1.13.10; 1.13.18; 1.13.24;
Truly kill current_intr_depth once and for all.
 1.12 17-Oct-2007  garbled branches: 1.12.2; 1.12.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.11 13-Aug-2007  tsutsui branches: 1.11.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.10 08-Mar-2007  matt branches: 1.10.2; 1.10.10; 1.10.14; 1.10.16; 1.10.18; 1.10.20;
Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
 1.9 19-Feb-2007  matt Don't do softinit_init from irq_init.
 1.8 18-Feb-2007  matt Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
 1.7 18-Feb-2007  matt Call softintr_init()
 1.6 11-May-2006  yamt branches: 1.6.14;
remove irqblock[] as no one uses it. reviewed by Ben Harris.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.6; 1.5.8; 1.5.10; 1.5.12;
merge ktrace-lwp.
 1.4 29-Aug-2004  thorpej branches: 1.4.12;
Add a local prototype for a called-from-asm function.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 27-Sep-2002  provos branches: 1.2.8;
remove trailing \n in panic(). approved perry.
 1.1 06-Feb-2002  thorpej branches: 1.1.2; 1.1.14;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.14.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 06-Feb-2002  jdolecek file ofw_irqhandler.c was added on branch kqueue on 2002-06-23 17:34:55 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file ofw_irqhandler.c was added on branch nathanw_sa on 2002-02-28 04:07:41 +0000
 1.2.8.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.2 03-Sep-2004  skrll Sync with HEAD
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.12.4 21-Jan-2008  yamt sync with head
 1.4.12.3 03-Sep-2007  yamt sync with head.
 1.4.12.2 26-Feb-2007  yamt sync with head.
 1.4.12.1 21-Jun-2006  yamt sync with head.
 1.5.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.5.10.1 11-May-2006  elad sync with head
 1.5.8.1 24-May-2006  yamt sync with head.
 1.5.6.1 01-Jun-2006  kardel Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.14.2 12-Mar-2007  rmind Sync with HEAD.
 1.6.14.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.10.20.3 20-Jan-2008  chris Sync to HEAD.
 1.10.20.2 01-Jan-2008  chris Sync with HEAD.
 1.10.20.1 18-Aug-2007  chris Sync with HEAD
 1.10.18.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.10.16.2 28-Feb-2008  rjs Sync with HEAD.
 1.10.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.10.14.1 15-Aug-2007  skrll Sync with HEAD.
 1.10.10.1 03-Oct-2007  garbled Sync with HEAD
 1.10.2.1 20-Aug-2007  ad Sync with HEAD.
 1.11.2.2 09-Jan-2008  matt sync with HEAD
 1.11.2.1 06-Nov-2007  matt sync with HEAD
 1.12.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.10.1 04-May-2009  yamt sync with head.
 1.17.4.1 05-Mar-2011  rmind sync with head
 1.18.18.3 03-Dec-2017  jdolecek update from HEAD
 1.18.18.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.8.1 30-Oct-2012  yamt sync with head
 1.19.10.1 10-Aug-2014  tls Rebase.
 1.20.2.1 10-Nov-2014  snj Pull up following revision(s) (requested by maxv in ticket #195):
sys/arch/arm/iomd/iomd_irqhandler.c: revision 1.21
sys/arch/arm/ofw/ofw_irqhandler.c: revision 1.21
sys/arch/atari/atari/intr.c: revision 1.24-1.25
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.14
sys/arch/hpcmips/tx/tx39icu.c: revision 1.34
sys/arch/shark/isa/isa_irqhandler.c: revision 1.27
sys/arch/sparc/sparc/machdep.c: revision 1.327
sys/arch/sparc64/dev/psycho.c: revision 1.119
sys/arch/sparc64/dev/schizo.c: revision 1.32
sys/arch/sparc64/sparc64/machdep.c: revision 1.279
sys/arch/sun68k/sun68k/bus.c: revision 1.22
sys/arch/x86/x86/ipmi.c: revision 1.58
sys/arch/xen/xen/privcmd.c: revision 1.46-1.49
Fix several memory leaks.
 1.21.20.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.10 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.9 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.8 20-Jan-2008  joerg branches: 1.8.10; 1.8.18; 1.8.24;
Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 1.7 08-Mar-2007  matt branches: 1.7.16; 1.7.20; 1.7.22; 1.7.28; 1.7.34;
Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
 1.6 11-Dec-2005  christos branches: 1.6.26;
merge ktrace-lwp.
 1.5 29-Aug-2004  thorpej branches: 1.5.12;
Make this compile again.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 27-Sep-2002  provos branches: 1.3.8;
remove trailing \n in panic(). approved perry.
 1.2 02-May-2002  mycroft branches: 1.2.6;
Fix off-by-one error in delay().
 1.1 06-Feb-2002  thorpej branches: 1.1.2;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file ofwgencfg_clock.c was added on branch nathanw_sa on 2002-02-28 04:07:42 +0000
 1.2.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 02-May-2002  jdolecek file ofwgencfg_clock.c was added on branch kqueue on 2002-06-23 17:34:55 +0000
 1.3.8.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.2 03-Sep-2004  skrll Sync with HEAD
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.2 21-Jan-2008  yamt sync with head
 1.5.12.1 03-Sep-2007  yamt sync with head.
 1.6.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.34.1 20-Jan-2008  bouyer Sync with HEAD
 1.7.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.22.1 23-Mar-2008  matt sync with HEAD
 1.7.20.1 27-Jan-2008  chris Sync to HEAD.
 1.7.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.8.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.10.1 04-May-2009  yamt sync with head.
 1.20 16-Jul-2019  skrll Consistently use vaddr_t as initarm and friends return type.

Makes no difference to binaries except for aarch64 where it's required
 1.19 27-Oct-2012  chs branches: 1.19.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 06-Jun-2011  matt branches: 1.18.2; 1.18.12;
Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup.
 1.17 14-Mar-2009  dsl branches: 1.17.4; 1.17.10;
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.16 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.15 30-Nov-2008  martin branches: 1.15.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
 1.14 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.13 29-Aug-2008  matt branches: 1.13.2;
Remove non-__ELF__ snippets.
 1.12 19-Jan-2008  chris branches: 1.12.6; 1.12.10; 1.12.12; 1.12.16;
Remove arm support for IPKDB.

It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
 1.11 08-Mar-2007  matt branches: 1.11.16; 1.11.20; 1.11.22; 1.11.28; 1.11.34;
Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
 1.10 26-Oct-2006  bjh21 branches: 1.10.4;
Change the type of initarm() on OFW-based ARM systems to match other non-hpcarm
ports. This seems sensible since all of them call it from the same locore.S.
This makes NetBSD/shark GENERIC compile.
 1.9 24-Oct-2006  bjh21 parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
 1.8 11-Dec-2005  christos branches: 1.8.20; 1.8.22;
merge ktrace-lwp.
 1.7 15-Jul-2003  lukem branches: 1.7.16;
__KERNEL_RCSID()
 1.6 26-Apr-2003  ragge branches: 1.6.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
 1.5 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.4 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 03-Apr-2002  thorpej branches: 1.2.6;
Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
address of the vector page (which MUST be valid when the function
is called) and a bitmask of vectors the kernel is going to take
over, and performs all vector page initialization, including setting
the V bit in the CPU Control register ("relocate vectors to high
address"), if necessary.
 1.1 06-Feb-2002  thorpej branches: 1.1.2;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file ofwgencfg_machdep.c was added on branch nathanw_sa on 2002-02-28 04:07:42 +0000
 1.2.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 03-Apr-2002  jdolecek file ofwgencfg_machdep.c was added on branch kqueue on 2002-06-23 17:34:56 +0000
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.3 21-Jan-2008  yamt sync with head
 1.7.16.2 03-Sep-2007  yamt sync with head.
 1.7.16.1 30-Dec-2006  yamt sync with head.
 1.8.22.1 10-Dec-2006  yamt sync with head.
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.10.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.11.34.1 20-Jan-2008  bouyer Sync with HEAD
 1.11.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.22.1 23-Mar-2008  matt sync with HEAD
 1.11.20.1 20-Jan-2008  chris Sync to HEAD.
 1.11.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.12.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12.16.1 19-Oct-2008  haad Sync with HEAD.
 1.12.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.12.10.1 04-May-2009  yamt sync with head.
 1.12.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.12.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.13.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.13.2.1 19-Jan-2009  skrll Sync with HEAD.
 1.15.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.17.4.1 12-Jun-2011  rmind sync with head
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1 30-Oct-2012  yamt sync with head
 1.19.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11 07-Feb-2021  martin Rename argument "bootspec" to avoid shadowing a global
 1.10 31-Jan-2012  matt branches: 1.10.60;
Use a typedef to cleanup OF_set_callback.
 1.9 17-Jul-2011  joerg branches: 1.9.2; 1.9.6;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.8 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.7 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.6 28-Feb-2007  macallan branches: 1.6.46; 1.6.54; 1.6.60;
add OF_setprop()
 1.5 11-Dec-2005  christos branches: 1.5.26;
merge ktrace-lwp.
 1.4 03-Jun-2005  scw branches: 1.4.2;
Appease -Wcast-qual
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 05-Oct-2002  chs branches: 1.2.8;
add missing protos.
 1.1 06-Feb-2002  thorpej branches: 1.1.2; 1.1.14;
* Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
renaming to arch/shark.
 1.1.14.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.14.1 06-Feb-2002  jdolecek file openfirm.c was added on branch kqueue on 2002-06-23 17:34:56 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 06-Feb-2002  nathanw file openfirm.c was added on branch nathanw_sa on 2002-02-28 04:07:42 +0000
 1.2.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.4.2.1 03-Sep-2007  yamt sync with head.
 1.5.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.6.60.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.54.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.46.1 04-May-2009  yamt sync with head.
 1.9.6.1 18-Feb-2012  mrg merge to -current.
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.10.60.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 07-Aug-2021  jmcneill arm: PCI: Add support for Arm PCI Config Space Access Firmware Interface

This adds basic support for the PCI Config Access interface defined in
Arm DEN0115.
 1.1 21-Oct-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for PCI MSI using ARM GICv2m.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 21-Oct-2018  christos file files.pci was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.1.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.1 21-Oct-2018  pgoyette file files.pci was added on branch pgoyette-compat on 2018-11-26 01:52:19 +0000
 1.10 30-Jun-2024  jmcneill arm: pci: Fix ITS ID lookup for MSIs.

pci_get_frameid expects a BDF requestor ID as input, not a Device ID.
Fixes MSI/MSI-X support on Ampere Altra systems.
 1.9 13-Feb-2020  skrll branches: 1.9.24; 1.9.30;
spaces -> <tab>
 1.8 13-Feb-2020  jmcneill Add support for multiple GICv3 ITS domains.
 1.7 03-Aug-2019  jmcneill branches: 1.7.2;
Properly honour max_type arg to pci_intr_alloc
 1.6 25-Jul-2019  jmcneill branches: 1.6.2;
Support pci_intr_release for INTx interrupts
 1.5 01-Dec-2018  skrll branches: 1.5.4;
Fix MSIX allocation in pci_intr_alloc
 1.4 27-Nov-2018  jdolecek make pci_intr_alloc() try also MSI-X by default (with NULL count);
there are boards/emulators which only have MSI-X and no MSI, and
so far there is no evidence there are devices which support both
and don't work in MSI-X mode

this change is supposed to reduce amount of needed cut&paste code in drivers

discussed briefly with jmcneill@
 1.3 16-Nov-2018  jmcneill branches: 1.3.2;
Add intr_establish_xname support to arm and expose it to intrctl
 1.2 31-Oct-2018  jmcneill Add MSI-X support.
 1.1 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.3.2.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.1 16-Nov-2018  pgoyette file pci_msi_machdep.c was added on branch pgoyette-compat on 2018-11-26 01:52:19 +0000
 1.5.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 01-Dec-2018  christos file pci_msi_machdep.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.6.2.1 04-Aug-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #18):

sys/arch/arm/pci/pci_msi_machdep.c: revision 1.7

Properly honour max_type arg to pci_intr_alloc
 1.7.2.1 29-Feb-2020  ad Sync with head.
 1.9.30.1 01-Jul-2024  perseant Sync with HEAD.
 1.9.24.1 03-Jul-2024  martin Pull up following revision(s) (requested by jmcneill in ticket #735):

sys/dev/pci/pci_resource.c: revision 1.5
sys/arch/arm/pci/pci_msi_machdep.c: revision 1.10
sys/arch/aarch64/include/vmparam.h: revision 1.21
sys/dev/acpi/acpi_resource.c: revision 1.43

pci_resource: Make unexpected bus numbers in bridges non-fatal.

Firmware bugs happen. Log a warning and continue instead of panicing.
acpi: Ignore producer/consumer bit for fixed memory resources.

The requirement to honour the producer/consumer bit in fixed memory
resource descriptors was dropped at some point in a revision to the ACPI
2.0 specification because too many firmware implementations got it wrong.

aarch64: Bump VM_PHYSSEG_MAX to match DRAM_BANKS / FDT_MEMORY_RANGES.

On aarch64 there is a single free list, so VM_PHYSSEG_MAX needs to be
the same as FDT_MEMORY_RANGES (which needs to be the same as DRAM_BANKS).

Future cleanup should be done to fold these into a single define.

arm: pci: Fix ITS ID lookup for MSIs.
pci_get_frameid expects a BDF requestor ID as input, not a Device ID.

Fixes MSI/MSI-X support on Ampere Altra systems.
 1.4 27-Nov-2021  skrll Remove unnecessary #include
 1.3 16-Nov-2018  jmcneill branches: 1.3.2; 1.3.6;
Add intr_establish_xname support to arm and expose it to intrctl
 1.2 31-Oct-2018  jmcneill Add MSI-X support.
 1.1 21-Oct-2018  jmcneill Add support for PCI MSI using ARM GICv2m.
 1.3.6.2 10-Jun-2019  christos Sync with HEAD
 1.3.6.1 16-Nov-2018  christos file pci_msi_machdep.h was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.3.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.1 16-Nov-2018  pgoyette file pci_msi_machdep.h was added on branch pgoyette-compat on 2018-11-26 01:52:19 +0000
 1.1 07-Aug-2021  jmcneill arm: PCI: Add support for Arm PCI Config Space Access Firmware Interface

This adds basic support for the PCI Config Access interface defined in
Arm DEN0115.
 1.1 07-Aug-2021  jmcneill arm: PCI: Add support for Arm PCI Config Space Access Firmware Interface

This adds basic support for the PCI Config Access interface defined in
Arm DEN0115.
 1.4 20-Nov-2013  kiyohara Support __HAVE_PIC_SET_PRIORITY for Armada XP.
 1.3 03-Oct-2013  skrll Update to reflect the move of armadaxpreg.h
 1.2 29-May-2013  rkujawa branches: 1.2.2; 1.2.4;
Add CVS IDs where appropriate.
 1.1 29-May-2013  rkujawa Add support for Armada XP PIC.

Obtained from Marvell, Semihalf.
 1.2.4.1 18-May-2014  rmind sync with head
 1.2.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.2 23-Jun-2013  tls resync from head
 1.2.2.1 29-May-2013  tls file armadaxp_splfuncs.c was added on branch tls-maxphys on 2013-06-23 06:20:01 +0000
 1.6 20-Nov-2013  kiyohara Support __HAVE_PIC_SET_PRIORITY for Armada XP.
 1.5 29-May-2013  rkujawa branches: 1.5.2;
Add support for Armada XP PIC.

Obtained from Marvell, Semihalf.
 1.4 01-Sep-2012  matt branches: 1.4.2;
Add PIC hooks for MP and for the ARM Generic Interrupt Controller.
 1.3 11-Mar-2011  bsh branches: 1.3.4; 1.3.12;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.2 27-Apr-2008  matt branches: 1.2.18; 1.2.22; 1.2.28;
Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file files.pic was initially added on branch matt-armv6.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.3 28-Jan-2008  matt Update to new vmlocking world.
 1.1.2.2 08-Jan-2008  matt Add pic for omap2. Switch to standard MI intr_* calls.
 1.1.2.1 29-Aug-2007  matt Commit W-I-P new generic interrupt controller code similar in idea
to the one in ppcoea-renovation.
 1.2.28.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.22.1 21-Apr-2011  rmind sync with head
 1.2.18.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.4.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.3.4.1 30-Oct-2012  yamt sync with head
 1.4.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 23-Jun-2013  tls resync from head
 1.5.2.1 18-May-2014  rmind sync with head
 1.85 30-Oct-2022  riastradh arm/pic: Sprinkle dtrace probes on interrupt handlers like x86.
 1.84 29-Oct-2022  riastradh arm/pic: Use a local variable to reduce #ifdef scope.

Avoids straddling a conditional this way.
 1.83 28-Jul-2022  riastradh arm/pic: Mark definitions static to match declarations.
 1.82 28-Jul-2022  riastradh arm/pic: Assert ci_cpl doesn't lower across interrupt handler.
 1.81 28-Jul-2022  skrll Catch up with the per lwp astpending (rather than per cpu) flag in the
preemption code. NFC as preemption (still) isn't enabled.
 1.80 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.79 02-Jan-2022  riastradh arm: No #if DIAGNOSTIC needed any more.

Compiler can (and gcc does) flush call to strlen when the result is
unused, so no performance impact here.
 1.78 21-Dec-2021  skrll Fix a bug where pic_establish_intr would fail to call pic_establish_irq
if a free pic__iplsources slot was found, i.e. an interrupt handler at
the same ipl had been disestablished previously.
 1.77 21-Dec-2021  skrll G/C pic_iplsource
 1.76 21-Dec-2021  skrll KNF
 1.75 31-Oct-2021  skrll Only perform pic_unblock_percpu if all of the following are true
- mp_online, i.e. APs are running.
- is_mpsafe, i.e. the interrupt handler is MP safe
- is_percpu, i.e. the interrupt actually requires it!

The last one (is_percpu) is true for GIC PPI+SGI only.
 1.74 31-Oct-2021  skrll Assert we can sleep in pic_add
 1.73 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.72 26-Sep-2021  jmcneill If an SGI or PPI is established after interrupts are enabled, make sure
we unblock the source on _all_ CPUs and not just the CPU that is
establishing the interrupt.
 1.71 08-Aug-2021  skrll Re-apply

Move 'struct pic_pending' from percpu to struct cpu_info. Saves a few
instructions in splx.

There is(/was) no need to use atomic operations on the percpu / cpu_info
members, so don't.

Finally removng the use of percpu should help avoid problems with "late"
attaching cpus.
 1.70 27-Mar-2021  jmcneill Revert recent pic optimizations until I have more time to work on this.
 1.69 21-Feb-2021  jmcneill branches: 1.69.2;
Inline pic_set_priority and use cpu_dosoftints_ci when available.
 1.68 21-Feb-2021  skrll Fixup with __HAVE_PREEMPTION code which is currently unused
 1.67 20-Feb-2021  jmcneill Inline "pic_do_pending_ints" in splx and check ci_pending_ipls to optimize
the common case (hw priority, no cascaded interrupts pending).

This also removes the need for the "pic_pending_used" flag, and should fix
booting on Raspberry Pi 3.
 1.66 20-Feb-2021  jmcneill Move 'struct pic_pending' from percpu to struct cpu_info. Saves a few
instructions in splx.
 1.65 16-Feb-2021  jmcneill pic: avoid pic_do_pending_ints if pic_mark_pending_* has never been called
 1.64 15-Feb-2021  jmcneill splx: use pic_set_priority_psw in interrupts disabled case to skip a few
more daif accesses.
 1.63 15-Feb-2021  jmcneill pic: reduce the number of daif accesses in pic_do_pending_ints

The caller has already provided daif state. No need to keep updating
daif via pic_set_priority if it's already in the state we need (interrupts
disabled).
 1.62 07-Feb-2021  jmcneill Use ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie()/cpsid() in
places where we don't care about the cpsie() return value.
 1.61 01-Nov-2020  jmcneill branches: 1.61.2;
intr_ipi_send: assert that kcp is either NULL or contains exactly one CPU
 1.60 26-Oct-2020  skrll Improve a comment
 1.59 26-Oct-2020  skrll KNF
 1.58 25-Oct-2020  skrll KASSERT -> KASSERTMSG
 1.57 27-Jul-2020  skrll Trailing whitespace
 1.56 01-Feb-2020  riastradh KNF
 1.55 01-Feb-2020  riastradh Reduce some ifdefs.
 1.54 01-Feb-2020  riastradh pic_pending_zero is unnecessary; percpu_alloc already zeroes.
 1.53 01-Feb-2020  riastradh Switch arm pic allocation and initialization to percpu_create.
 1.52 24-Dec-2019  skrll branches: 1.52.2;
Update pic_add to allocate and return an irqbase if passed
PIC_IRQBASE_ALLOC.
 1.51 24-Dec-2019  skrll Make pic_sourcebase static
 1.50 23-Dec-2019  jmcneill Add reference counts to intr_mask/intr_unmask as calls can be nested, spotted by thorpej
 1.49 23-Dec-2019  jmcneill Implement acpi_md_intr_mask and acpi_md_intr_unmask
 1.48 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.47 13-Nov-2018  jmcneill Fix intrctl for pics with non-0 irqbase
 1.46 11-Nov-2018  jmcneill Add support for intrctl(8).
 1.45 12-Oct-2018  jmcneill Implement intr_string(9)
 1.44 15-Jul-2018  jmcneill Add support for setting and getting interrupt affinity.
 1.43 09-Jul-2018  ryo fix false positive KASSERT.
the case that secondary processors failed to hatch, and not attached.

when "cpu1 at cpus0: disabled (unresponsive)"
 1.42 01-Apr-2018  ryo branches: 1.42.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.41 12-Oct-2017  skrll branches: 1.41.2;
Trailing whitespace
 1.40 21-Sep-2017  skrll spaces to TAB
 1.39 29-Aug-2017  nisimura decouple pic_ipi_kpreempt() from DDB
 1.38 25-Aug-2017  jmcneill The assertion at the bottom of intr_ipi_send is invalid for UP configs; add
a text for arm_cpu_max == 1
 1.37 01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.36 11-Oct-2015  mlelstv unblock interrupts also when reusing a previously freed irq slot.
 1.35 18-Apr-2015  skrll Serialise work in pic_add.
 1.34 15-Apr-2015  matt Add separate IPI routines for IPI_AST and IPI_KPREEMPT.
 1.33 14-Apr-2015  jmcneill __HAVE_PREEEMPTION -> __HAVE_PREEMPTION
 1.32 12-Apr-2015  matt Don't send IPIs to ourselves if sending to everyone.
 1.31 12-Apr-2015  matt Don't need pic_ipi_sender anymore.
 1.30 12-Apr-2015  matt Use right kcpuset call.
 1.29 11-Apr-2015  matt Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
 1.28 08-Apr-2015  matt Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
 1.27 08-Apr-2015  matt Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
 1.26 29-Mar-2015  matt Add aarch64 support (mostly remapping I32_bit and F32_bit onto aarch64 bits).
 1.25 08-Nov-2014  skrll branches: 1.25.2;
Include opt_multiprocessor.h
 1.24 29-Oct-2014  skrll In the MULTIPROCESSOR case mark all interrupt handlers not at IPL_VM as
mpsafe, so the kernel_lock is only taken at IPL_VM as per spl(9).
 1.23 13-Oct-2014  skrll Comment out a printf that was confusing entering ddb output.
 1.22 19-May-2014  rmind branches: 1.22.2;
Implement MI IPI interface with cross-call support.
 1.21 13-Mar-2014  matt branches: 1.21.2;
Support MPSAFE interrupts.
 1.20 03-Mar-2014  matt Add a mpsafe flag to the intrsource
 1.19 28-Jan-2014  martin Mark a diagnostic-only variable
 1.18 08-Dec-2013  skrll Mark rv as unused (for now)
 1.17 07-Sep-2013  matt Use KASSERTMSG
 1.16 19-Aug-2013  skrll Whitespace
 1.15 30-Oct-2012  msaitoh branches: 1.15.2; 1.15.6;
Fix a bug that incorrect arg is passed to pic_block_irqs() on disestablish.
Fixes PR#45371 by Yuichiro Goto.
 1.14 01-Sep-2012  matt branches: 1.14.2;
Add #ifdef DIAGNOSTIC / #endif
 1.13 01-Sep-2012  matt Add PIC hooks for MP and for the ARM Generic Interrupt Controller.
 1.12 20-Jul-2012  matt Fix botched change to use right value for ipl. Thanks jak
 1.11 14-Jul-2012  matt Add hooks for __HAVE_PIC_SET_PRIORITY which allows updating of a hardware
(PIC) priority based on current IPL.
 1.10 07-Jul-2012  skrll Convert a KASSERT to a KASSERTMSG
 1.9 04-Jul-2012  skrll Add a KASSERT
 1.8 11-Mar-2011  bsh branches: 1.8.4; 1.8.10; 1.8.12;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.7 01-Feb-2011  jakllsch Increment ci->ci_intr_depth for the duration of pic_do_pending_ints().
Fixes locking catastrophy commonly noticed with mvsata(4) on evbarm.
 1.6 31-Aug-2010  kiyohara branches: 1.6.2; 1.6.4;
Fix lost interrupt. (2/2)
+ It is likely to lose sight of interrupt when the interrupt of irq_base
that is smaller than the same at the level is generated if PIC_MAXSOURCES
is 33 or more.
 1.5 31-Aug-2010  kiyohara Fix lost interrupt. (1/2)
+ Change blocked_irqs that dispach if change pending_irqs in the loop.
 1.4 30-Dec-2008  matt branches: 1.4.4; 1.4.6;
Use atomic ops to manipulate the bitmasks.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.16;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file pic.c was initially added on branch matt-armv6.
 1.1.24.3 09-Oct-2010  yamt sync with head
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.13 23-Mar-2008  matt sync with HEAD
 1.1.2.12 01-Mar-2008  matt fix off-by-error.
pass irq_base to pic_find_pending_irqs_by_ipl
 1.1.2.11 29-Feb-2008  matt fix another swapped argument
 1.1.2.10 29-Feb-2008  matt Fix swapped args to pic_find_pending_irqs_by_ipl
 1.1.2.9 29-Feb-2008  matt set pic->pic_id to the slot # when we add it.
 1.1.2.8 29-Feb-2008  matt Make sure we established the interrupts we thought we did.
 1.1.2.7 29-Feb-2008  matt Rework establish_irq to take an intrsource.
Enable an interrupt after establishing it.
 1.1.2.6 28-Jan-2008  matt Update to new vmlocking world.
 1.1.2.5 06-Nov-2007  matt add spl* routines and prototypes.
add intr_establish/intr_disestablish
 1.1.2.4 12-Sep-2007  matt Add commented out debug code to pic_add.
 1.1.2.3 11-Sep-2007  matt Another round of pic code. Includes spl* code.
 1.1.2.2 30-Aug-2007  matt More W-I-P
 1.1.2.1 29-Aug-2007  matt Commit W-I-P new generic interrupt controller code similar in idea
to the one in ppcoea-renovation.
 1.3.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.6.2 21-Apr-2011  rmind sync with head
 1.4.6.1 05-Mar-2011  rmind sync with head
 1.4.4.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.6.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.12.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.8.10.1 19-Nov-2012  riz Pull up following revision(s) (requested by msaitoh in ticket #656):
sys/arch/arm/pic/pic.c: revision 1.15
Fix a bug that incorrect arg is passed to pic_block_irqs() on disestablish.
Fixes PR#45371 by Yuichiro Goto.
 1.8.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.8.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.8.4.1 30-Oct-2012  yamt sync with head
 1.14.2.3 03-Dec-2017  jdolecek update from HEAD
 1.14.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.6.1 10-May-2013  khorben Allow interrupt handlers to be temporarily disabled or enabled again,
including from within interrupt context: returning non-zero keeps the
handler enabled (as previously), while returning zero disables the
interrupt until a call to intr_enable().

This is necessary with the TPS65950 companion chip because:
- it interrupts on the main code (via IRQ_SYS_nIRQ0)
- interrupt handling requires I2C traffic (to access registers)
- interrupt-based interaction is necessary with this chip (keypad, GPIO...)

XXX Affects other ARM devices using the ARM PIC code, additional code
review is required to address them.
 1.15.2.2 18-May-2014  rmind sync with head
 1.15.2.1 28-Aug-2013  rmind sync with head
 1.21.2.1 10-Aug-2014  tls Rebase.
 1.22.2.3 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.22.2.2 10-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #209):
sys/arch/arm/pic/pic.c: revision 1.25
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.312
sys/arch/arm/arm32/bus_dma.c: revision 1.89
sys/arch/arm/arm32/pmap.c: revision 1.313
sys/arch/arm/arm32/pmap.c: revision 1.314
sys/arch/arm/arm32/pmap.c: revision 1.315
sys/arch/arm/arm32/pmap.c: revision 1.316
Include opt_multiprocessor.h
When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
Post a dmb before invalidating the cache in the post-{read,write}
operations to ensure that any/all cachelines brought in via speculation
are really flushed.
Ensure all memory operations are complete by before wfi. For example, the
cpu could have just been in uvm_pageidlezero.
In pmap_fault_fixup re-instate the TLB flush for the shared L1 case that
occurs for non-ARM_MMU_EXTENDED kernels.
This fixes rump/rumpkern/t_sp:stress_killer on rpi which is currently
non-ARM_MMU_EXTENDED
Remove an unnecessary flush that sneaked in as part of break-before-make
change.
Remove an XXXNH comment.
Update PTE_SYNC_CURRENT to add a dsb for armv7 - part of the
break-before-make fix.
 1.22.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.25.2.4 28-Aug-2017  skrll Sync with HEAD
 1.25.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.2.2 06-Jun-2015  skrll Sync with HEAD
 1.25.2.1 06-Apr-2015  skrll Sync with HEAD
 1.41.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.41.2.3 20-Oct-2018  pgoyette Sync with head
 1.41.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.41.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.42.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.42.2.1 10-Jun-2019  christos Sync with HEAD
 1.52.2.1 29-Feb-2020  ad Sync with head.
 1.61.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.69.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.24 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.23 25-Jun-2022  jmcneill pic: splx performance improvement

Skip disabling interrupts and check for pending hard interrupts if old
ipl was < IPL_VM.
 1.22 20-Sep-2021  jmcneill Make _splraise/_spllower/splx functions available to modules again.
 1.21 10-Aug-2021  jmcneill arm: pic: allow overriding _splraise/_spllower/splx
 1.20 27-Mar-2021  jmcneill Revert recent pic optimizations until I have more time to work on this.
 1.19 01-Mar-2021  jmcneill branches: 1.19.2;
Add DISABLE_INTERRUPT_SAVE(), like DISABLE_INTERRUPT() but also returns
the previous state.

Use DISABLE_INTERRUPT_SAVE()/ENABLE_INTERRUPT() in pic_splfuncs instead
of cpsid()/cpsie(). The difference here is the caller no longer specifies
which bits to disable and enable; on arm32 we continue to use I32_bit and
on aarch64 we now consistently toggle both IRQ and FIQ state.
 1.18 22-Feb-2021  jmcneill Make the splx fast path smaller.
 1.17 21-Feb-2021  jmcneill Inline pic_set_priority and use cpu_dosoftints_ci when available.
 1.16 20-Feb-2021  jmcneill Only disable/enable interrupts if processing pending interrupts, and
inline pic_set_pending_psw.
 1.15 20-Feb-2021  jmcneill Adjust ci_intr_depth when processing pending ints
 1.14 20-Feb-2021  jmcneill Inline "pic_do_pending_ints" in splx and check ci_pending_ipls to optimize
the common case (hw priority, no cascaded interrupts pending).

This also removes the need for the "pic_pending_used" flag, and should fix
booting on Raspberry Pi 3.
 1.13 16-Feb-2021  jmcneill pic: avoid pic_do_pending_ints if pic_mark_pending_* has never been called
 1.12 15-Feb-2021  jmcneill splx: use pic_set_priority_psw in interrupts disabled case to skip a few
more daif accesses.
 1.11 15-Feb-2021  jmcneill splx: restore priority even if interrupts are disabled
 1.10 15-Feb-2021  jmcneill splx: only dispatch hard interrupts if interrupts are enabled
 1.9 15-Feb-2021  jmcneill splx: only dispatch softints if interrupts are enabled
 1.8 01-Apr-2018  ryo branches: 1.8.14;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.7 02-Apr-2015  matt branches: 1.7.16;
#include <sys/lwp.h>
 1.6 29-Mar-2015  matt Add aarch64 support (mostly remapping I32_bit and F32_bit onto aarch64 bits).
 1.5 16-Apr-2014  matt branches: 1.5.4;
Do softints after restoring interrupts
 1.4 01-Sep-2012  matt branches: 1.4.2; 1.4.4; 1.4.12; 1.4.14;
Add PIC hooks for MP and for the ARM Generic Interrupt Controller.
 1.3 14-Jul-2012  matt Add hooks for __HAVE_PIC_SET_PRIORITY which allows updating of a hardware
(PIC) priority based on current IPL.
 1.2 28-May-2011  jakllsch branches: 1.2.4; 1.2.6; 1.2.14;
Restore ci_intr_depth increment for duration of pic_do_pending_ints() lost
when this code was moved.
 1.1 11-Mar-2011  bsh branches: 1.1.2;
split arch/arm/pic/pic.c so that we can implement more efficient version of splfoo() while using pic framework.
 1.1.2.3 31-May-2011  rmind sync with head
 1.1.2.2 21-Apr-2011  rmind sync with head
 1.1.2.1 11-Mar-2011  rmind file pic_splfuncs.c was added on branch rmind-uvmplock on 2011-04-21 01:40:53 +0000
 1.2.14.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 30-Oct-2012  yamt sync with head
 1.2.4.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.4.1 28-May-2011  jruoho file pic_splfuncs.c was added on branch jruoho-x86intr on 2011-06-06 09:05:06 +0000
 1.4.14.1 10-Aug-2014  tls Rebase.
 1.4.12.2 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.4.12.1 01-Sep-2012  matt file pic_splfuncs.c was added on branch matt-nb5-mips64 on 2014-02-15 16:18:37 +0000
 1.4.4.1 18-May-2014  rmind sync with head
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 06-Apr-2015  skrll Sync with HEAD
 1.7.16.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.8.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.19.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.38 25-Jun-2022  jmcneill Remove GIC_SPLFUNCS.
 1.37 26-Sep-2021  jmcneill If an SGI or PPI is established after interrupts are enabled, make sure
we unblock the source on _all_ CPUs and not just the CPU that is
establishing the interrupt.
 1.36 20-Sep-2021  jmcneill Make _splraise/_spllower/splx functions available to modules again.
 1.35 10-Aug-2021  jmcneill arm: pic: allow overriding _splraise/_spllower/splx
 1.34 27-Mar-2021  jmcneill Revert recent pic optimizations until I have more time to work on this.
 1.33 27-Feb-2021  jmcneill branches: 1.33.2;
machine/cpufunc.h -> arm/cpufunc.h for the benefit of non-evbarm ports
 1.32 26-Feb-2021  jmcneill Unfortunately we need to disable interrupts in pic_set_priority to keep
hardware and ci_cpl in sync.
 1.31 21-Feb-2021  jmcneill Inline pic_set_priority and use cpu_dosoftints_ci when available.
 1.30 20-Feb-2021  jmcneill Inline "pic_do_pending_ints" in splx and check ci_pending_ipls to optimize
the common case (hw priority, no cascaded interrupts pending).

This also removes the need for the "pic_pending_used" flag, and should fix
booting on Raspberry Pi 3.
 1.29 20-Feb-2021  jmcneill remove "pic_do_pending_int() prototype; no matching function
 1.28 16-Feb-2021  skrll Provide a pic_set_priority_psw in the case that __HAVE_PIC_SET_PRIORITY
is not defined.
 1.27 15-Feb-2021  jmcneill splx: use pic_set_priority_psw in interrupts disabled case to skip a few
more daif accesses.
 1.26 24-Dec-2019  skrll branches: 1.26.8;
Update pic_add to allocate and return an irqbase if passed
PIC_IRQBASE_ALLOC.
 1.25 23-Dec-2019  jmcneill Add reference counts to intr_mask/intr_unmask as calls can be nested, spotted by thorpej
 1.24 23-Dec-2019  jmcneill Implement acpi_md_intr_mask and acpi_md_intr_unmask
 1.23 27-Mar-2019  ryo enlarge pic_name[] from 14 to 16. bcm2835_intr.c@1.20 used to the limit.
(sizeof struct pic_softc was not changed. it's just same as padding)
 1.22 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.21 09-Nov-2018  jmcneill Increase size of is_irq and pic_irqbase
 1.20 12-Oct-2018  jmcneill Implement intr_string(9)
 1.19 08-Sep-2018  jmcneill Increase the size of is_irq from 8- to 16-bits to allow for > 256 IRQs per pic.
 1.18 16-Jul-2018  jmcneill I added is_affinity to intrsource in the previous commit but it is not used. Remove it.
 1.17 15-Jul-2018  jmcneill Add support for setting and getting interrupt affinity.
 1.16 07-Jul-2015  matt branches: 1.16.16; 1.16.18;
Protect #include "opt_multiprocessor.h" with _KERNEL_OPT
 1.15 15-Apr-2015  matt Add separate IPI routines for IPI_AST and IPI_KPREEMPT.
 1.14 11-Apr-2015  matt Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
 1.13 09-Apr-2015  matt Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
 1.12 08-Apr-2015  matt Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
 1.11 29-Oct-2014  skrll branches: 1.11.2;
Sprinkle #include "opt_multiprocessor.h"
 1.10 19-May-2014  rmind branches: 1.10.2;
Implement MI IPI interface with cross-call support.
 1.9 13-Mar-2014  matt branches: 1.9.2;
Support MPSAFE interrupts.
 1.8 03-Mar-2014  matt Add a mpsafe flag to the intrsource
 1.7 01-Sep-2012  matt branches: 1.7.2; 1.7.4; 1.7.8;
Add PIC hooks for MP and for the ARM Generic Interrupt Controller.
 1.6 14-Jul-2012  matt Add hooks for __HAVE_PIC_SET_PRIORITY which allows updating of a hardware
(PIC) priority based on current IPL.
 1.5 15-Nov-2010  bsh branches: 1.5.8; 1.5.16;
fix compile error about missing evcnt definition.
picvar.h is now included very early because of uebayashi's change to sys/param.h.
 1.4 30-Dec-2008  matt branches: 1.4.4; 1.4.6;
Use atomic ops to manipulate the bitmasks.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.16;
Remove clause 3 and 4 from TNF licenses
 1.2 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2; 1.1.20; 1.1.22; 1.1.24;
file picvar.h was initially added on branch matt-armv6.
 1.1.24.2 04-May-2009  yamt sync with head.
 1.1.24.1 16-May-2008  yamt sync with head.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.6 29-Feb-2008  matt Rework establish_irq to take an intrsource.
Enable an interrupt after establishing it.
 1.1.2.5 28-Jan-2008  matt Update to new vmlocking world.
 1.1.2.4 06-Nov-2007  matt add spl* routines and prototypes.
add intr_establish/intr_disestablish
 1.1.2.3 11-Sep-2007  matt Another round of pic code. Includes spl* code.
 1.1.2.2 30-Aug-2007  matt More W-I-P
 1.1.2.1 29-Aug-2007  matt Commit W-I-P new generic interrupt controller code similar in idea
to the one in ppcoea-renovation.
 1.3.16.1 15-Feb-2014  matt Merge armv7 support from HEAD, specifically support for the BCM5301X
and BCM56340 evbarm kernels.
 1.3.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.6.1 05-Mar-2011  rmind sync with head
 1.4.4.1 15-Nov-2010  uebayasi Sync with HEAD.
 1.5.16.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.5.8.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.8.1 30-Oct-2012  yamt sync with head
 1.7.8.1 10-May-2013  khorben Allow interrupt handlers to be temporarily disabled or enabled again,
including from within interrupt context: returning non-zero keeps the
handler enabled (as previously), while returning zero disables the
interrupt until a call to intr_enable().

This is necessary with the TPS65950 companion chip because:
- it interrupts on the main code (via IRQ_SYS_nIRQ0)
- interrupt handling requires I2C traffic (to access registers)
- interrupt-based interaction is necessary with this chip (keypad, GPIO...)

XXX Affects other ARM devices using the ARM PIC code, additional code
review is required to address them.
 1.7.4.1 18-May-2014  rmind sync with head
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.2.2 30-Jul-2015  martin Pull up following revision(s) (requested by skrll in ticket #890):
sys/arch/arm/pic/pic.c: revision 1.27-1.32
sys/arch/arm/omap/omap5430_intr.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_obio.c: revision 1.25
sys/arch/arm/cortex/gic.c: revision 1.18
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.15
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.61
sys/arch/arm/broadcom/bcm2835_intr.h: revision 1.2
sys/arch/arm/marvell/mvsoc_intr.h: revision 1.5
sys/arch/arm/broadcom/bcm2835_intr.c: revision 1.8-1.10
sys/arch/arm/pic/picvar.h: revision 1.12-1.14
sys/arch/arm/omap/omap4430_intr.h: revision 1.3

Don't clear CI_ASTPENDING in exception return, do it in ast() instead.
Add basic support for __HAVE_PREEMPTION.
Use atomic ops for ci_astpending if __HAVE_PREEMPTION is defined.
Use kpreempt_disable/kpreempt_enable
Add __HAVE_PIC_HAVE_PENDING_INTRS and define it if __HAVE_PIC_SET_PRIORITY
is undefined (also define in mvsoc_intr.h since their use of the latter is
peculiar). This new define controls whether the pending interrupt logic is
compiled. The GIC doesn't use pending interrupts since it uses the priority
level on the GIC to control delivery of interrupts, thus there can never
be a pending interrupt. The kernel shrinks about 4KB with the removal of
the pending interupt support,
Only if we __HAVE_PIC_PENDING_INTRS do we need the variables to track them.
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.
Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to. For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu. There is no global interrupt state anymore.
Use right kcpuset call.
Don't need pic_ipi_sender anymore.
Don't send IPIs to ourselves if sending to everyone.
RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
Use a bit per IPI type in local mailbox 0 registers. Ok matt@
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
 1.10.2.1 09-Nov-2014  martin Pull up following revision(s) (requested by skrll in ticket #188):
sys/arch/arm/include/arm32/pmap.h: revision 1.136
sys/arch/arm/include/armreg.h: revision 1.100
sys/arch/arm/cortex/gic.c: revision 1.11
sys/arch/arm/arm32/db_interface.c: revision 1.54
sys/arch/arm/include/armreg.h: revision 1.101
sys/arch/arm/cortex/gic.c: revision 1.12
sys/arch/arm/arm32/arm32_machdep.c: revision 1.107
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.19
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.20
sys/arch/evbarm/conf/BPI: revision 1.5
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.21
sys/arch/arm/arm32/pmap.c: revision 1.306
sys/arch/arm/arm32/db_machdep.c: revision 1.22
sys/arch/arm/arm32/arm32_tlb.c: revision 1.3
sys/arch/arm/arm/undefined.c: revision 1.55
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.22
sys/arch/arm/arm32/pmap.c: revision 1.307
sys/arch/arm/arm32/arm32_tlb.c: revision 1.4
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.23
sys/arch/arm/arm32/arm32_tlb.c: revision 1.5
sys/arch/evbarm/conf/BPI: revision 1.8
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.24
sys/arch/arm/arm32/arm32_tlb.c: revision 1.6
sys/arch/arm/arm32/arm32_tlb.c: revision 1.7
sys/arch/evbarm/conf/CUBIETRUCK: revision 1.5
sys/arch/arm/pic/pic.c: revision 1.23
sys/arch/arm/pic/pic.c: revision 1.24
sys/arch/arm/pic/picvar.h: revision 1.11
sys/arch/arm/arm/cpufunc_asm_armv7.S: revision 1.20
sys/arch/arm/mainbus/cpu_mainbus.c: revision 1.16
sys/arch/arm/arm32/pmap.c: revision 1.298
sys/arch/arm/arm/cpufunc_asm_arm11.S: revision 1.17
sys/arch/arm/arm/cpufunc_asm_pj4b.S: revision 1.5
sys/arch/arm/arm32/pmap.c: revision 1.310
sys/arch/arm/arm32/pmap.c: revision 1.311
sys/arch/arm/arm32/arm32_kvminit.c: revision 1.32
sys/arch/arm/cortex/a9_mpsubr.S: revision 1.19
sys/arch/arm/arm32/arm32_boot.c: revision 1.10
sys/arch/arm/arm/ast.c: revision 1.25
sys/arch/arm/include/armreg.h: revision 1.98
sys/uvm/pmap/pmap_tlb.c: revision 1.10
sys/arch/arm/arm32/arm32_boot.c: revision 1.8
sys/arch/arm/arm32/arm32_boot.c: revision 1.9
sys/arch/arm/arm/arm_machdep.c: revision 1.43
Various ARM MP fixes.
 1.11.2.2 22-Sep-2015  skrll Sync with HEAD
 1.11.2.1 06-Jun-2015  skrll Sync with HEAD
 1.16.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16.18.1 10-Jun-2019  christos Sync with HEAD
 1.16.16.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.16.16.3 20-Oct-2018  pgoyette Sync with head
 1.16.16.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.16.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.26.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.33.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 29-Aug-2007  matt branches: 1.1.2;
file softintr.c was initially added on branch matt-armv6.
 1.1.2.2 28-Jan-2008  matt Update to new vmlocking world.
 1.1.2.1 29-Aug-2007  matt Commit W-I-P new generic interrupt controller code similar in idea
to the one in ppcoea-renovation.
 1.1 29-Aug-2007  matt branches: 1.1.2;
file softintr.h was initially added on branch matt-armv6.
 1.1.2.3 28-Jan-2008  matt Update to new vmlocking world.
 1.1.2.2 30-Aug-2007  matt More W-I-P
 1.1.2.1 29-Aug-2007  matt Commit W-I-P new generic interrupt controller code similar in idea
to the one in ppcoea-renovation.
 1.31 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.30 03-Jun-2025  rjs Add driver for Rockchip USB-C PHY, mostly from OpenBSD.

Only implements USB3 for now, not DP.
 1.29 19-Nov-2022  yamt branches: 1.29.8;
arm/rockchip: fix build w/o MULTIPROCESSOR
 1.28 23-Aug-2022  ryo add eqos(4) for RK3588
 1.27 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.26 20-Jul-2022  riastradh drm: Use CPPFLAGS.drmkms in all local drm drivers too.

This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
 1.25 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.24 17-May-2020  riastradh Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.23 19-Dec-2019  jakllsch add Rockchip (RK3399) glue for Analogix DisplayPort core
 1.22 16-Nov-2019  jmcneill Add driver for Rockchip I2S/PCM controller.
 1.21 09-Nov-2019  jmcneill WIP display driver for Rockchip RK3399
 1.20 05-Aug-2019  tnn rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.
 1.19 01-May-2019  jmcneill branches: 1.19.2;
Add support for RK3399 PWM controller.
 1.18 26-Apr-2019  mrg implement TSADC driver for rockchip RK3328 and RK3399. so far, only
tested on RK3399 but the RK3328 looks mostly the same and has a good
chance of working too.

add clock entries for "clk_tsadc" and "pclk_tsadc" to cru.

exports "CPU" and "GPU" temp sensors. these currently limited to 5
degC resolution but can be reduced to sub 1 degC resolution with some
interpolation.

todo list:

- handle setting various temp values
- add interpolation between the 5degC intervals in sample data
- handle DT trips/temp value defaults
- interrupts aren't triggered (test by lowering warn/crit values),
and once they work, make the interrupt do something
- test on RK3328, and port to other rockchips (will require moving
some part into per-chipset sections, such as code<->temp tables)


thanks to jmcneill for help.
 1.17 10-Mar-2019  jmcneill Add support for Rockchip eMMC PHY
 1.16 07-Mar-2019  jakllsch Add RK3399 PCIe host bridge support.

Not enabled yet due to occasional hangs during boot, and needing
__BUS_SPACE_HAS_PROBING_METHODS enabled.

Uses slightly non-standard DT bindings to avoid suboptimality of the
Linux binding. This allows for much more flexibility and efficency
in allotment of the limited apertures into PCI spaces.
 1.15 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.14 01-Jul-2018  jmcneill Add driver for Rockchip I2C controller.
 1.13 16-Jun-2018  jmcneill branches: 1.13.2;
Add initial support for Rockchip RK3328 SoC.
 1.12 08-Feb-2018  jmcneill branches: 1.12.2;
Move Rockchip port to the attic. It is not very useful.
 1.11 29-Mar-2015  jmcneill branches: 1.11.2; 1.11.18;
Use shared armv7_generic_space
 1.10 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.9 04-Jan-2015  jmcneill Add Rockchip ethernet driver, untested.
 1.8 03-Jan-2015  jmcneill attach devices marked "crit 1" first
 1.7 02-Jan-2015  jmcneill Add driver for RK3188 64-bit timer.
 1.6 02-Jan-2015  jmcneill Add RK3188/RK3188+ CPU frequency setting support.
 1.5 30-Dec-2014  jmcneill Actually set slave addr / reg. Wait for start irq after sending start before
transferring data. Add RKIIC_DEBUG kernel option.
 1.4 30-Dec-2014  jmcneill add I2C driver
 1.3 27-Dec-2014  jmcneill More clock fixes, debugging.
 1.2 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.11.18.2 03-Dec-2017  jdolecek update from HEAD
 1.11.18.1 29-Mar-2015  jdolecek file files.rockchip was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.11.2.2 06-Apr-2015  skrll Sync with HEAD
 1.11.2.1 29-Mar-2015  skrll file files.rockchip was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.12.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.12.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.12.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.13.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.13.2.1 10-Jun-2019  christos Sync with HEAD
 1.19.2.4 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.19.2.3 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.19.2.2 20-Nov-2019  martin Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?
 1.19.2.1 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.29.8.1 02-Aug-2025  perseant Sync with HEAD
 1.20 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.19 02-Apr-2015  jmcneill branches: 1.19.2; 1.19.18;
print chip name
 1.18 29-Mar-2015  jmcneill Use shared armv7_generic_space
 1.17 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.16 13-Jan-2015  jmcneill From FUKAUMI Naoki <naobsd@gmail.com>:

sdmmc0 is unstable at 48MHz with default 4mA on some boards.
12mA is stable, it's used in Rockchip Linux 3.0 kernel too.
 1.15 05-Jan-2015  jmcneill add GRF bus space handle to obio_attach_args, from FUKAUMI Naoki <fun@naobsd.org>
 1.14 04-Jan-2015  jmcneill enable USB ethernet on Minix Neo X7
 1.13 04-Jan-2015  jmcneill print dpll, update phy init
 1.12 04-Jan-2015  jmcneill RK3188 iomux/gpio setup for emac
 1.11 03-Jan-2015  jmcneill attach devices marked "crit 1" first
 1.10 02-Jan-2015  jmcneill back out r1.8, its fine (and preferred) to write value before direction reg
 1.9 02-Jan-2015  jmcneill Add RK3188/RK3188+ CPU frequency setting support.
 1.8 01-Jan-2015  jmcneill obio_init_gpio: set pin direction to output before writing data
 1.7 01-Jan-2015  jmcneill IT66121 HDMI transmitter GPIO setup
 1.6 01-Jan-2015  jmcneill RK3188 I2C iomux init
 1.5 30-Dec-2014  jmcneill add I2C driver
 1.4 30-Dec-2014  jmcneill MMC0/VBUS GPIO changes for Radxa Rock, from FUKAUMI Naoki <fun@naobsd.org>.

XXX Need to find a way to handle board-specific configurations.
 1.3 27-Dec-2014  jmcneill More clock fixes, debugging.
 1.2 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.19.18.2 03-Dec-2017  jdolecek update from HEAD
 1.19.18.1 02-Apr-2015  jdolecek file obio.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.19.2.2 06-Apr-2015  skrll Sync with HEAD
 1.19.2.1 02-Apr-2015  skrll file obio.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.4 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.3 28-Mar-2015  jmcneill branches: 1.3.2; 1.3.18;
IST_EDGE -> IST_LEVEL
 1.2 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.3.18.2 03-Dec-2017  jdolecek update from HEAD
 1.3.18.1 28-Mar-2015  jdolecek file obio_com.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.3.2.2 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 28-Mar-2015  skrll file obio_com.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.2 13-Nov-2021  jmcneill Write back and invalidate cache before starting secondary CPUs.
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.5 13-Nov-2021  jmcneill Add support for RK3288 temperature sensors.
 1.4 13-Nov-2021  jmcneill Add pwm and spi clocks
 1.3 13-Nov-2021  jmcneill Fix width of aclk_cpu_pre divider field
 1.2 13-Nov-2021  jmcneill rk3288: add watchdog and rng clocks
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.2 12-Nov-2021  jmcneill Fix register accesses to PMU registers. Unlike the GRF ones, a RMW cycle
is required to update settings here.
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.1 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.10 24-Apr-2023  mrg enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.

(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.9 12-Nov-2021  jmcneill branches: 1.9.4;
arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.8 15-May-2021  mrg add SPI support to rk3328, tested on rock64.

simply adding the SPI clocks (and pwm while here) and enabling
the config match was sufficient, though my first rock64 seems
to have a deal SPI now (does not probe in u-boot or netbsd.)
 1.7 27-Jan-2021  thorpej branches: 1.7.4; 1.7.6;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 31-Dec-2020  mrg begin to make rock64 audio work.

- set status for "analog_sound" to enabled.
- add clocks for the i2s and spdif nodes.
- match "rockchip,rk3066-i2s", "rockchip,rk3188-i2s",
and "rockchip,rk3288-i2s".

this gets i2s and ausoc to attach, but no audio(4) yet.

to complete this probably also needs a codec driver (appears
to be rk3328 specific, unlike eg pinebookpro's es8316), and
support for "audio-graph-card" type sound cards.
 1.5 15-May-2019  mrg branches: 1.5.10;
support RK3328 tsadc:

- add clk_24m, clk_tsadc and pclk_tsadc rk3328 clocks
- rk3328 data<->temp conversion table is is wrong. the actual values
seen are 4096 - <expected>, and the linux driver has these values
in the inverted value directly
- the above means the rk3328 is increasing data for increasing temp,
and the min/max values are also inverted and swapped
- move auto-period into the rk_data
- rk3328 only has one sensor, deal with this
- rename rk_data_table as rk_data, and also s/rdt/rd/

thanks to jmcneill who helped clean up clocks confusion, and pointed
out the linux driver values matched my own inverted data experience.
 1.4 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.3 01-Jul-2018  jmcneill Add i2c clocks.
 1.2 16-Jun-2018  jmcneill branches: 1.2.2; 1.2.4;
Replace register numbers with defines, fixing a bunch of typos in the process.
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 16-Jun-2018  pgoyette file rk3328_cru.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.5.10.2 03-Apr-2021  thorpej Sync with HEAD.
 1.5.10.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.7.6.1 31-May-2021  cjep sync with head
 1.7.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.9.4.1 02-May-2023  martin Pull up following revision(s) (requested by mrg in ticket #154):

sys/arch/arm/dts/rk3328-crypto.dtsi: revision 1.1
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.8
sys/arch/arm/rockchip/rk3328_cru.c: revision 1.10
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.11

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.
(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.2 31-Dec-2020  jmcneill Fix definition of RK3328_HCLK_I2S1_8CH
 1.1 16-Jun-2018  jmcneill branches: 1.1.2; 1.1.16;
Add initial support for Rockchip RK3328 SoC.
 1.1.16.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk3328_cru.h was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 01-Oct-2019  jmcneill branches: 1.3.8;
Add support for devices with separate "init" and "default" pinctrl states.
 1.2 23-Jan-2019  thorpej branches: 1.2.4; 1.2.6;
Implement subroutines for parsing out some of the generic properties
specified in the pinctrl bindings, and adapt Meson, Rockchip, and
Allwinner pinctrl back-ends to use them.

Ok jmcneill@
 1.1 12-Aug-2018  jmcneill branches: 1.1.2;
Add support for Rockchip RK3399 SoC.
 1.1.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3328_iomux.c was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.2.6.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 23-Jan-2019  christos file rk3328_iomux.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.3.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 16-Jun-2018  jmcneill branches: 1.1.2;
Add initial support for Rockchip RK3328 SoC.
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk3328_platform.h was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.27 03-Jun-2025  rjs Add GPU clocks.
 1.26 03-Jun-2025  rjs Add driver for Rockchip USB-C PHY, mostly from OpenBSD.

Only implements USB3 for now, not DP.
 1.25 23-Aug-2022  ryo branches: 1.25.10;
- change struct rk_cru_arm and RK_CPU macros to allow mux and div registers to be specified independently.
Allow more div-regs to be specified in the future.
- commonize RK*_PLL() macro.
 1.24 23-Aug-2022  ryo Make .reg1 and .reg2 of struct rk_cru_cpu_rate into array, and change the type of those to bus_size_t and uint32_t.
Array size may increase in the future.
 1.23 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.22 20-May-2021  msaitoh Fix signed integer overflow found by kUBSan. OK'd by jmcneill.

The output was:
UBSan: Undefined Behavior in ../../../../arch/arm/rockchip/rk3399_cru.c:
284:13, signed integer overflow: 594000000 - -2086967296 cannot be
represented in type 'int'
 1.21 27-Jan-2021  thorpej branches: 1.21.4; 1.21.6;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.20 17-May-2020  riastradh branches: 1.20.2;
Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.19 04-Jan-2020  jmcneill Add 2000 MHz to available armclkb rates
 1.18 18-Dec-2019  jakllsch rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.

The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.

gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.

Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
 1.17 17-Dec-2019  jakllsch rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
 1.16 29-Nov-2019  jakllsch add RK3399 DisplayPort clocks
 1.15 29-Nov-2019  jakllsch add RK3399 eDP clocks
 1.14 29-Nov-2019  jakllsch fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
 1.13 16-Nov-2019  jmcneill Add support for I2S clocks.
 1.12 10-Nov-2019  jmcneill Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.
 1.11 09-Nov-2019  jmcneill Add HDMI and VOP clocks
 1.10 19-Oct-2019  tnn rk3399: add definition for the watchdog timer clock gate

The watchdog timer clock gate is a bit special because it's a secure
gate that can only be accessed from EL3. We still need a dummy gate
definition for it so that dwcwdt(4) can infer the frequency via the
parent clock. The gate is enabled by default by U-Boot.
 1.9 04-Aug-2019  tnn rk3399_cru: add definitions for SPI clocks
 1.8 09-Jun-2019  jmcneill branches: 1.8.2; 1.8.4;
Init bpll in a way that brings the big cluster's PLL out of "slow mode".
While here, fix a few typos in the cpul's rate table.
 1.7 26-Apr-2019  mrg implement TSADC driver for rockchip RK3328 and RK3399. so far, only
tested on RK3399 but the RK3328 looks mostly the same and has a good
chance of working too.

add clock entries for "clk_tsadc" and "pclk_tsadc" to cru.

exports "CPU" and "GPU" temp sensors. these currently limited to 5
degC resolution but can be reduced to sub 1 degC resolution with some
interpolation.

todo list:

- handle setting various temp values
- add interpolation between the 5degC intervals in sample data
- handle DT trips/temp value defaults
- interrupts aren't triggered (test by lowering warn/crit values),
and once they work, make the interrupt do something
- test on RK3328, and port to other rockchips (will require moving
some part into per-chipset sections, such as code<->temp tables)


thanks to jmcneill for help.
 1.6 13-Mar-2019  jmcneill Fix aclk_emmc register offset, set RK_COMPOSITE_ROUND_DOWN for SD/EMMC clocks, and add a few more emmc clock nodes
 1.5 10-Mar-2019  jmcneill Add eMMC clocks
 1.4 11-Nov-2018  jakllsch Add clock information for RK3399 PCIe
 1.3 01-Sep-2018  jmcneill branches: 1.3.2;
Add support for RK3399 CPU clocks.
 1.2 12-Aug-2018  jmcneill Add I2C clocks
 1.1 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.3.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.2.1 01-Sep-2018  pgoyette file rk3399_cru.c was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.8.4.4 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.8.4.3 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.8.4.2 20-Nov-2019  martin Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?
 1.8.4.1 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.8.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.2.2 10-Jun-2019  christos Sync with HEAD
 1.8.2.1 09-Jun-2019  christos file rk3399_cru.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.20.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.21.6.1 31-May-2021  cjep sync with head
 1.21.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.25.10.1 02-Aug-2025  perseant Sync with HEAD
 1.1 12-Aug-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for Rockchip RK3399 SoC.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 12-Aug-2018  christos file rk3399_cru.h was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3399_cru.h was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 13-May-2021  msaitoh branches: 1.12.4;
Use unsigned to avoid undefined behavior in GRF_GPIO_P_{CTL,WRITE_EN}.
Found by kUBSan.
 1.11 24-Apr-2021  thorpej branches: 1.11.2; 1.11.4;
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 27-Jan-2021  thorpej branches: 1.10.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 01-Oct-2019  jmcneill branches: 1.6.8;
Add support for devices with separate "init" and "default" pinctrl states.
 1.5 20-Aug-2019  tnn rk3399_iomux: add some #ifdef'd out code to enable the on-chip debug port
 1.4 30-Apr-2019  jmcneill branches: 1.4.2; 1.4.4;
Fix mux register offset
 1.3 30-Apr-2019  jmcneill Pull type value mappings are different for each pin, and not based on the bank number.
 1.2 23-Jan-2019  thorpej Implement subroutines for parsing out some of the generic properties
specified in the pinctrl bindings, and adapt Meson, Rockchip, and
Allwinner pinctrl back-ends to use them.

Ok jmcneill@
 1.1 12-Aug-2018  jmcneill branches: 1.1.2;
Add support for Rockchip RK3399 SoC.
 1.1.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3399_iomux.c was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.4.4.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.4.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.2.2 10-Jun-2019  christos Sync with HEAD
 1.4.2.1 30-Apr-2019  christos file rk3399_iomux.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.6.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.11.4.1 31-May-2021  cjep sync with head
 1.11.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.12.4.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.23 21-Nov-2024  skrll Wrap a long line.
 1.22 02-Feb-2024  andvar branches: 1.22.2;
fix various typos in comments.
 1.21 27-Dec-2023  skrll Trailing whitespace
 1.20 26-Mar-2023  andvar fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
 1.19 15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.18 02-Oct-2021  mrg default RK3399 PCIe to 1.x.

sometime in mid-2019, rockchip disabled PCIe 2.x referrencing a
non-public errata in linux and the dts, both of which were changed
to default to only PCIe 1.x (in code, and in DT.) see:

https://lore.kernel.org/all/1481881357-1793-1-git-send-email-shawn.lin@rock-chips.com/

we haven't observed any specific problems, but we've also tested
far fewer cards than linux. there are other issues such as what
happens for a PCI abort depending on which CPU triggers it we do
not currently handle either.

tested on rockpro64 with nvme & ahcisata, and pinebook pro nvme.

still allows DT to set back to '2' if the user so desires.
 1.17 06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.16 03-Sep-2021  mrg rk3399 pcie: pay attention to the "bus-scan-delay-ms" property.

our existing pinebookpro DTS, but not the other rk3399 ones, have
this property set to "1000" (it's the same in linux 5.14 DTS.)

as there are already static 100ms + upto 1000ms, count how many
are done, and only delay more to complete one second.

this allows reverting this device-specific change:

http://mail-index.netbsd.org/source-changes/2021/06/23/msg130402.html

and makes other sorts of storage cards more likely to work as well.

tested on rockpro64.

XXX: consider moving dts setting into rk3399.dtsi.

ok jmcneill jak


inspired by https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/0013-rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch
 1.15 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.14 15-Jan-2021  jmcneill Add 'const char *xname' param to fdtbus_intr_establish_byname
 1.13 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.12 11-Oct-2020  tnn branches: 1.12.2;
rk3399_pci: support for PCI express switches / bridges / multiple buses

There were two isses that prevented this from working:

1. We must use type 1 configuration cycles when accessing bus 2 and
beyond, but type 0 configuration cycles for bus 0 and 1.

2. The hardware address decoder cannot be used to decode the bus portion
of the ECAM address. Due to the physical SoC address of the remote device
region not having sufficient alignment the wrong bus address would go out
on the wire. Also the mapped region is too small to address busses
beyond bus31.

Fix: Reduce the number of ECAM translated bits to dev+func only.
For each configuration space access, acquire an exclusive lock
and reprogram the translator with the correct bus number and access type.
Config space is accessed sufficiently infrequent for this to not cause
any performance problems.
 1.11 08-Oct-2020  tnn rk3399_pcie: do reset timing according to PCI Express Base Specification

Don't do link training or configuration space accesses within the time
allowed by the standard for the downstream card to come out of reset
after deasserting PERST#.

This fixes detection issues seen with a dual port wm(4) NIC,
an ASMedia SATA card and also Pericom bridges (but they need more work
to be useful).
 1.10 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.9 28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.8 07-Dec-2019  jmcneill Use bus_space_{peek,poke}_4 for pci conf reg access.
 1.7 29-Nov-2019  jmcneill Do not crash if the optional vpcie3v3-supply property is missing or the
regulator can not be found.
 1.6 23-Jun-2019  jmcneill branches: 1.6.2;
Enable MSI and MSI-X
 1.5 19-Jun-2019  mrg fix access to any busses that may appear beyond the bus the 4x slot see.
only the root bus and the slot's bus are limited to device = 0.
 1.4 15-Jun-2019  jmcneill Make this work.
 1.3 12-Jun-2019  jmcneill Use ranges from the device tree.
 1.2 12-Jun-2019  jmcneill Enable RK3399 PCIe.
 1.1 07-Mar-2019  jakllsch branches: 1.1.4;
Add RK3399 PCIe host bridge support.

Not enabled yet due to occasional hangs during boot, and needing
__BUS_SPACE_HAS_PROBING_METHODS enabled.

Uses slightly non-standard DT bindings to avoid suboptimality of the
Linux binding. This allows for much more flexibility and efficency
in allotment of the limited apertures into PCI spaces.
 1.1.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 07-Mar-2019  christos file rk3399_pcie.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.6.2.3 29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.6.2.2 09-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #529):

sys/arch/evbarm/conf/std.generic64: revision 1.12
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.8

Define __BUS_SPACE_HAS_PROBING_METHODS
Use bus_space_{peek,poke}_4 for pci conf reg access.
 1.6.2.1 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #498):

sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.7

Do not crash if the optional vpcie3v3-supply property is missing or the
regulator can not be found.
 1.12.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.22.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 19-Nov-2024  skrll Trailing whitespace
 1.4 27-Jan-2021  thorpej branches: 1.4.24;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 17-Nov-2020  ryo don't expose 'compatible[]'
 1.2 17-Jun-2020  thorpej branches: 1.2.2;
<sys/extent.h> not needed here.
 1.1 07-Mar-2019  jakllsch branches: 1.1.4;
Add RK3399 PCIe host bridge support.

Not enabled yet due to occasional hangs during boot, and needing
__BUS_SPACE_HAS_PROBING_METHODS enabled.

Uses slightly non-standard DT bindings to avoid suboptimality of the
Linux binding. This allows for much more flexibility and efficency
in allotment of the limited apertures into PCI spaces.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 07-Mar-2019  christos file rk3399_pcie_phy.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.2.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.2.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4.24.1 02-Aug-2025  perseant Sync with HEAD
 1.1 12-Aug-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for Rockchip RK3399 SoC.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 12-Aug-2018  christos file rk3399_platform.h was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3399_platform.h was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 01-May-2019  jmcneill branches: 1.3.2; 1.3.12;
Add support for RK3399 PWM controller.
 1.2 12-Aug-2018  jmcneill branches: 1.2.2;
Add I2C clocks
 1.1 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.2.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.1 12-Aug-2018  pgoyette file rk3399_pmucru.c was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 01-May-2019  christos file rk3399_pmucru.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.1 12-Aug-2018  jmcneill branches: 1.1.2; 1.1.6;
Add support for Rockchip RK3399 SoC.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 12-Aug-2018  christos file rk3399_pmucru.h was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.1.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.1 12-Aug-2018  pgoyette file rk3399_pmucru.h was added on branch pgoyette-compat on 2018-09-06 06:55:27 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 17-Oct-2023  tnn rk3588_cru: fix clock id for BIGCORE1
 1.1 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 17-Oct-2023  tnn rk3588_cru: sync clock id numbers with mainline Linux

The previous constants came from the Rockchip board support package,
but we want to be compatible with upstream device tree.
 1.1 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.2 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.1 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.6 19-Dec-2021  riastradh rkdrm: Convert to atomic modesetting, as needed for bridges.


Author: Jared McNeill <jmcneill@invisible.ca>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.5 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.4 25-Jul-2021  jmcneill rockchip: edp: Force VOPB as CRTC for eDP.

Fixes display init on Pinebook Pro w/ U-Boot 2021.07.
 1.3 27-Jan-2021  thorpej branches: 1.3.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 04-Jan-2020  jmcneill branches: 1.2.4; 1.2.8; 1.2.12;
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
 1.1 19-Dec-2019  jakllsch add Rockchip (RK3399) glue for Analogix DisplayPort core
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.8.1 04-Jan-2020  martin file rk_anxdp.c was added on branch phil-wifi on 2020-04-08 14:07:30 +0000
 1.2.4.3 28-Jul-2021  snj Pull up following revision(s) (requested by jmcneill in ticket #1324):
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.4
rockchip: edp: Force VOPB as CRTC for eDP.
Fixes display init on Pinebook Pro w/ U-Boot 2021.07.
 1.2.4.2 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.2.4.1 04-Jan-2020  martin file rk_anxdp.c was added on branch netbsd-9 on 2020-01-21 10:39:59 +0000
 1.3.4.1 01-Aug-2021  thorpej Sync with HEAD.
 1.10 18-Sep-2022  ryo KNF. 80 columns, use tab. NFC.
 1.9 17-Nov-2018  jakllsch use aprint_debug() rather than aprint_error() rk_cru_clock_get_rate()
 1.8 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.7 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.6 12-Aug-2018  jmcneill Back to aprint_debug for dumping clocks at attach
 1.5 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.4 30-Jun-2018  jmcneill Use syscon API.
 1.3 26-Jun-2018  jmcneill branches: 1.3.2;
device_printf -> aprint_debug
 1.2 17-Jun-2018  jmcneill branches: 1.2.2;
Fix soft reset logic
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.2.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 17-Jun-2018  pgoyette file rk_cru.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.11 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.10 23-Aug-2022  ryo - change struct rk_cru_arm and RK_CPU macros to allow mux and div registers to be specified independently.
Allow more div-regs to be specified in the future.
- commonize RK*_PLL() macro.
 1.9 23-Aug-2022  ryo Make .reg1 and .reg2 of struct rk_cru_cpu_rate into array, and change the type of those to bus_size_t and uint32_t.
Array size may increase in the future.
 1.8 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.7 16-Nov-2019  jmcneill Add support for I2S clocks.
 1.6 10-Nov-2019  jmcneill Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.
 1.5 19-Oct-2019  tnn rk3399: add definition for the watchdog timer clock gate

The watchdog timer clock gate is a bit special because it's a secure
gate that can only be accessed from EL3. We still need a dummy gate
definition for it so that dwcwdt(4) can infer the frequency via the
parent clock. The gate is enabled by default by U-Boot.
 1.4 01-Sep-2018  jmcneill branches: 1.4.4;
Add support for RK3399 CPU clocks.
 1.3 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.2 30-Jun-2018  jmcneill Use syscon API.
 1.1 16-Jun-2018  jmcneill branches: 1.1.2; 1.1.4;
Add initial support for Rockchip RK3328 SoC.
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk_cru.h was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.4.4.1 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.5 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.4 23-Aug-2022  ryo - change struct rk_cru_arm and RK_CPU macros to allow mux and div registers to be specified independently.
Allow more div-regs to be specified in the future.
- commonize RK*_PLL() macro.
 1.3 23-Aug-2022  ryo Make .reg1 and .reg2 of struct rk_cru_cpu_rate into array, and change the type of those to bus_size_t and uint32_t.
Array size may increase in the future.
 1.2 01-Sep-2018  jmcneill Add support for RK3399 CPU clocks.
 1.1 16-Jun-2018  jmcneill branches: 1.1.2; 1.1.4;
Add initial support for Rockchip RK3328 SoC.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk_cru_arm.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.8 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.7 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.6 20-May-2021  msaitoh Fix wrong calculation found by kUBSan. OK'd by jmcneill.

The output was:
UBSan: Undefined Behavior in ../../../../arch/arm/rockchip/
rk_cru_composite.c:86:21, unsigned integer overflow: 0 divrem 0 cannot be
represented in type 'unsigned int'
 1.5 16-Nov-2019  jmcneill branches: 1.5.12; 1.5.14;
Add support for I2S clocks.
 1.4 10-Nov-2019  jmcneill Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.
 1.3 19-Jun-2018  jmcneill branches: 1.3.2; 1.3.4; 1.3.8;
rk_cru_composite_set_rate: allow selection of parent clocks in different
domains
 1.2 17-Jun-2018  jmcneill Make gate enable/disable logic easier to read. NFC.
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.3.8.1 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.3.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.3.2.1 19-Jun-2018  pgoyette file rk_cru_composite.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.5.14.1 31-May-2021  cjep sync with head
 1.5.12.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.2 17-Jun-2018  jmcneill branches: 1.2.2;
Make gate enable/disable logic easier to read. NFC.
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 17-Jun-2018  pgoyette file rk_cru_gate.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.2 30-Jun-2018  jmcneill Use syscon API.
 1.1 16-Jun-2018  jmcneill branches: 1.1.2; 1.1.4;
Add initial support for Rockchip RK3328 SoC.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk_cru_mux.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.6 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.5 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.4 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.3 30-Jun-2018  jmcneill Use syscon API.
 1.2 16-Jun-2018  jmcneill branches: 1.2.2; 1.2.4;
Fix rate calculation of fractional mode PLLs
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 16-Jun-2018  pgoyette file rk_cru_pll.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.22 13-Oct-2025  thorpej Use device_{get,set}prop_bool().
 1.21 30-Oct-2022  jmcneill Remove dirty fb IOCTL callback introduced in latest drm update.

Not sure how this got here, but the rkdrm driver does not need to do
damage tracking as it uses Normal-NC (uncached) mappings.

PR# port-arm/56596
 1.20 25-Sep-2022  riastradh rkdrm: Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.19 21-Apr-2022  andvar s/subesquent/subsequent/ in copy pasted comments.
 1.18 20-Dec-2021  riastradh rkdrm: Implement vblank.
 1.17 19-Dec-2021  riastradh rkdrm: Comment why we config_defer rk_drm_init.
 1.16 19-Dec-2021  riastradh rkdrm: Convert to atomic modesetting, as needed for bridges.


Author: Jared McNeill <jmcneill@invisible.ca>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.15 19-Dec-2021  riastradh rkdrm: Do drm_mode_config_reset on init.
 1.14 19-Dec-2021  riastradh sunxi/drm, rockchip/drm: Avoid messy error output.
 1.13 19-Dec-2021  riastradh rockchip/drm: use drm_helper_mode_fill_fb_struct or say why not.


Author: phone <mrg@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.12 19-Dec-2021  riastradh rockchip/drm: use an explicit task queue to avoid config_defer pitfalls.


Author: phone <mrg@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.11 19-Dec-2021  riastradh catch up with newer drm_encoder_init prototype


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.10 19-Dec-2021  riastradh drm_dev_alloc now returns ERR_PTR, check for that.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.9 19-Dec-2021  riastradh Sort includes.
 1.8 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.7 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.6 28-Apr-2021  mrg branches: 1.6.6;
for big endian kernels use DRM_FORMAT_BGRX8888 pixel format.

now my pinebook pro console looks right with evbarm64-eb, instead
of having red and green swapped, and no blue. fixes both console
"text" mode and X11.
 1.5 24-Apr-2021  thorpej branches: 1.5.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Dec-2019  mrg branches: 1.3.8; 1.3.10;
ensure to call drm_mode_config_cleanup() when erroring.
tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.2 14-Nov-2019  jmcneill branches: 1.2.2;
Remove debug output
 1.1 09-Nov-2019  jmcneill WIP display driver for Rockchip RK3399
 1.2.2.3 17-Dec-2019  martin Pull up following revision(s) (requested by mrg in ticket #557):

sys/arch/arm/rockchip/rk_drm.c: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.4
sys/arch/arm/sunxi/sunxi_drm.c: revision 1.10

ensure to call drm_mode_config_cleanup() when erroring.

tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.2.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.2.2.1 14-Nov-2019  martin file rk_drm.c was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.3.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.1 15-Dec-2019  martin file rk_drm.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.4.2.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.5.2.1 13-May-2021  thorpej Sync with HEAD.
 1.6.6.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 19-Dec-2021  riastradh rockchip/drm: use an explicit task queue to avoid config_defer pitfalls.


Author: phone <mrg@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.1 09-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
WIP display driver for Rockchip RK3399
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 09-Nov-2019  martin file rk_drm.h was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.1.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.1.2.1 09-Nov-2019  martin file rk_drm.h was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.8 11-Apr-2023  riastradh arm/rockchip: Omit needless functions.
 1.7 19-Dec-2021  riastradh Sort includes.
 1.6 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 17-Dec-2019  jakllsch branches: 1.4.8; 1.4.10;
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
 1.3 16-Nov-2019  jmcneill branches: 1.3.2;
Add audio support
 1.2 10-Nov-2019  jmcneill Fix typo in phy config table
 1.1 09-Nov-2019  jmcneill WIP display driver for Rockchip RK3399
 1.3.2.3 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.3.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.3.2.1 16-Nov-2019  martin file rk_dwhdmi.c was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.4.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.8.1 17-Dec-2019  martin file rk_dwhdmi.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 13-Mar-2019  jmcneill branches: 1.3.4; 1.3.14;
Set drive strength and output tap delay
 1.2 10-Mar-2019  jmcneill Use syscon instead of bus_space_map
 1.1 10-Mar-2019  jmcneill Add support for Rockchip eMMC PHY
 1.3.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 13-Mar-2019  christos file rk_emmcphy.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.3 07-Feb-2024  msaitoh Remove ryo@'s mail addresses.
 1.2 24-Dec-2023  skrll eqos(4): MP improvements

Remove the non-MP-safe scaffolding and pass MP safe flags for callout
and interrupt handlers.

Where we had #ifndef EQOS_MPSAFE splnet(), we also had EQOS_LOCK,
which implies splnet, so just remove the conditional splnet.
 1.1 23-Aug-2022  ryo add eqos(4) for RK3588
 1.7 25-Sep-2022  riastradh rkdrm: Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.6 19-Dec-2021  riastradh rkdrm: Turn display off and back on again at config_interrupts.

This grody kludge works around whatever we're doing wrong in the
initial modeset that causes it not to take.
 1.5 19-Dec-2021  riastradh rockchip/drm: use an explicit task queue to avoid config_defer pitfalls.


Author: phone <mrg@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.4 19-Dec-2021  riastradh Sort includes.
 1.3 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.2 21-May-2021  jmcneill whitespace cleanup
 1.1 09-Nov-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.16; 1.1.18;
WIP display driver for Rockchip RK3399
 1.1.18.1 31-May-2021  cjep sync with head
 1.1.16.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 09-Nov-2019  martin file rk_fb.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.1.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.1.2.1 09-Nov-2019  martin file rk_fb.c was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.23 10-Aug-2024  skrll awge(4): MP improvements

Remove the non-MP-safe scaffolding and make the locking less
coarse.
 1.22 31-Dec-2023  skrll branches: 1.22.2;
Trailing whitespace
 1.21 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.20 07-Nov-2021  jmcneill Handle RGMII variants.
 1.19 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.18 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.17 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.16 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.15 09-Nov-2019  tnn branches: 1.15.8;
rk_gmac: clean up code for setting up clock delay lines a bit

- break long lines
- move toggle to enable it under a single #ifdef notyet

I've tested it and it works, but I'm keeping the #ifdef notyet for now
because it didn't solve the original problem I was debugging.
 1.14 21-Jul-2019  mrg move DWCGMAC_MPSAFE into dwc_gmac_var.h and introduce an
additional define that is 0 or FDT_INTR_MPSAFE that the
frontends can use when passing to fdtbus_intr_establish().

with NET_MPSAFE enabled, this avoids hangs seen on rock64,
as well as finishing the MPSAFE port for this driver.

XXX: still don't know why the existing hangs occur.
 1.13 08-Jul-2019  msaitoh Add rnd(9) support.
 1.12 05-May-2019  jmcneill RK3399: Skip setting RGMII TX/RX clock delayline parameters for now and
rely on the settings configured by firmware.
 1.11 28-Feb-2019  msaitoh Set RGMII delay for MAC side correctly on RK3399.
 1.10 27-Feb-2019  msaitoh Fix RGMII clock 25MHz setting (for 100Mbps).
 1.9 23-Feb-2019  martin Adjust all callers of dwc_gmac_attach, pass MII_PHY_ANY for now.
 1.8 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.7 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.6 30-Jun-2018  jmcneill Rock64 needs more time for the PHY to reset. Add a delay.
 1.5 30-Jun-2018  jmcneill Use syscon API
 1.4 30-Jun-2018  jmcneill Only install interrupt handler if dwc_gmac_attach succeeds.
 1.3 19-Jun-2018  jmcneill branches: 1.3.2; 1.3.4;
Disable threshhold mode for TX/RX DMA and ignore tx_delay/rx_delay props
for now. Fixes GMAC on RK3328.
 1.2 17-Jun-2018  jmcneill Enable gpio reset logic
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.3.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.3.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.3.2.1 19-Jun-2018  pgoyette file rk_gmac.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.15.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.22.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 03-Jun-2025  rjs Add support for generating interrupts from GPIO pins.
 1.7 17-Oct-2023  tnn branches: 1.7.6;
rk_gpio: add support for version 2 controller

Based on PR 57597 from Johann Rudloff.
 1.6 17-Oct-2023  tnn rk_gpio: de-duplicate some code from the fdtbus accessors

Make fdtbus accessors implementation agnostic and use the chipset tag
to call into implementation code. This makes it easy to populate the
chipset tag with alternate implementation needed for v2 controllers.
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 16-Jun-2018  jmcneill branches: 1.2.2; 1.2.16;
Fix reading through /dev/gpio and use the same style for writing registers in both fdt and /dev/gpio cases
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 16-Jun-2018  pgoyette file rk_gpio.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.3.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.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7.6.1 02-Aug-2025  perseant Sync with HEAD
 1.14 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.13 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.12 13-Nov-2021  jmcneill Match rockchip,rk3288-i2c
 1.11 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.10 27-Jan-2021  thorpej branches: 1.10.4; 1.10.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.8 19-Sep-2020  ryo branches: 1.8.2;
fix to work on big endian
 1.7 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.6 08-Nov-2019  jmcneill Support reads of more than 32 bytes in a single xfer.
 1.5 18-Sep-2019  tnn rkiic: coalesce smbus-style writes into a single transaction

There seems to be a hw controller bug. Split cmd/data writes caused corrupt
transfers, with junk bytes witten into the rk808 pmic registers.
This may have caused us to operate with out-of-spec core voltage.
 1.4 02-Sep-2018  jmcneill branches: 1.4.4; 1.4.6;
Process assigned-clocks
 1.3 02-Sep-2018  jmcneill Calculate i2c divisor based on sclk not pclk
 1.2 02-Sep-2018  jmcneill Send an ACK after the last byte is received
 1.1 01-Jul-2018  jmcneill branches: 1.1.2;
Add driver for Rockchip I2C controller.
 1.1.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.1 01-Jul-2018  pgoyette file rk_i2c.c was added on branch pgoyette-compat on 2018-07-28 04:37:29 +0000
 1.4.6.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.4.6.1 24-Sep-2019  martin Pull up following revision(s) (requested by tnn in ticket #235):

sys/arch/arm/rockchip/rk_i2c.c: revision 1.5

rkiic: coalesce smbus-style writes into a single transaction

There seems to be a hw controller bug. Split cmd/data writes caused corrupt
transfers, with junk bytes witten into the rk808 pmic registers.

This may have caused us to operate with out-of-spec core voltage.
 1.4.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.4.2 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 02-Sep-2018  christos file rk_i2c.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.8.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.10.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.10.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.7 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.6 01-Jan-2021  jmcneill rk_i2s.c
 1.5 31-Dec-2020  mrg begin to make rock64 audio work.

- set status for "analog_sound" to enabled.
- add clocks for the i2s and spdif nodes.
- match "rockchip,rk3066-i2s", "rockchip,rk3188-i2s",
and "rockchip,rk3288-i2s".

this gets i2s and ausoc to attach, but no audio(4) yet.

to complete this probably also needs a codec driver (appears
to be rk3328 specific, unlike eg pinebookpro's es8316), and
support for "audio-graph-card" type sound cards.
 1.4 31-Dec-2020  mrg save the return value of fdtbus_clock_enable() so we can both
report it correctly instead of always 0, and also return failure
to the caller.
 1.3 29-Feb-2020  isaki branches: 1.3.6; 1.3.8;
Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.
 1.2 04-Jan-2020  jmcneill branches: 1.2.2;
Remove debug printfs
 1.1 16-Nov-2019  jmcneill branches: 1.1.2;
Add driver for Rockchip I2S/PCM controller.
 1.1.2.3 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.1.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.1.2.1 16-Nov-2019  martin file rk_i2s.c was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.2.2.1 29-Feb-2020  ad Sync with head.
 1.3.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.3.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.3.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.6.1 29-Feb-2020  martin file rk_i2s.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.4 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.3 30-Jun-2018  jmcneill Use syscon API
 1.2 16-Jun-2018  jmcneill branches: 1.2.2; 1.2.4;
Remove unused defines
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 16-Jun-2018  pgoyette file rk_iomux.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.18 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.17 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.16 23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.15 12-Nov-2021  jmcneill arm: rockchip: Add support for RK3288 SoC.

The Rockchip RK3288 is a quad core Cortex-A17 SoC.
 1.14 03-Sep-2021  mrg revert "make ahcisata(4) work on rk3399 (rockpro64)" from 23-06-2021.

this problem is known to affect more than AHCI, and a more general
solution has been commited now.
 1.13 23-Jun-2021  mrg make ahcisata(4) work on rk3399 (rockpro64)

on rk3399, a marvell 9230 ahci sata card consistently takes between
1213 and 1216 milliseconds, the ahci spec says this should complete
in 1000 or fewer.

add a "pcie-reset-ms" uint32 property that ahcisata defaults to 1000
if not set, and the rockchip platform code sets to 2000.


ok @jmcneill
 1.12 24-Apr-2021  thorpej branches: 1.12.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 04-Feb-2021  thorpej branches: 1.11.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.10 28-Sep-2020  jmcneill branches: 1.10.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.9 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.8 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.7 20-Oct-2018  ryo add missing .ap_mpstart for rk3399
 1.6 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.5 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.4 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.3 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.2 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.1 16-Jun-2018  jmcneill branches: 1.1.2; 1.1.4;
Add initial support for Rockchip RK3328 SoC.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.5 20-Oct-2018  pgoyette Sync with head
 1.1.2.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.1 16-Jun-2018  pgoyette file rk_platform.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.10.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.12.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 19-Dec-2019  jakllsch branches: 1.3.8;
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
 1.2 18-Oct-2019  skrll Use PRIxBUSADDR
 1.1 01-May-2019  jmcneill branches: 1.1.2; 1.1.4;
Add support for RK3399 PWM controller.
 1.1.4.1 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.1.2.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 01-May-2019  christos file rk_pwm.c was added on branch phil-wifi on 2019-06-10 22:05:55 +0000
 1.3.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 10-Sep-2025  thorpej Garbage-collect fdtbus_attach_spibus(). spibus_attach() does everything
now.
 1.10 10-Sep-2025  thorpej Register the SPI controller with FDT in spi_attach(), not in each
driver.
 1.9 10-Sep-2025  thorpej It is not necessary to pass the phandle separately to fdtbus_spi_*(); it
can be retrieved from the device_t.
 1.8 10-Sep-2025  thorpej Don't bother registering a function that returns a SPI controller; just
register the controller directly.
 1.7 15-May-2021  mrg branches: 1.7.8;
add SPI support to rk3328, tested on rock64.

simply adding the SPI clocks (and pwm while here) and enabling
the config match was sufficient, though my first rock64 seems
to have a deal SPI now (does not probe in u-boot or netbsd.)
 1.6 27-Jan-2021  thorpej branches: 1.6.4; 1.6.6;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.4 01-Apr-2020  tnn branches: 1.4.4; 1.4.6;
Don't fail if we cannot compute the clock divider because the master
clock is too slow for what the slave device requested.
Instead warn and select the highest available slave clock rate.
Should fix boot hang on Pinebook Pro when using spiflash(4).
 1.3 13-Aug-2019  tnn branches: 1.3.2;
rk_spi: register controller with fdt
 1.2 13-Aug-2019  tnn ensure spibus_attach_args is zero'ed
 1.1 05-Aug-2019  tnn rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.
 1.3.2.2 20-Nov-2019  martin Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?
 1.3.2.1 13-Aug-2019  martin file rk_spi.c was added on branch netbsd-9 on 2019-11-20 16:49:58 +0000
 1.4.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.4.1 01-Apr-2020  martin file rk_spi.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.6.6.1 31-May-2021  cjep sync with head
 1.6.4.2 17-Jun-2021  thorpej Sync w/ HEAD.
 1.6.4.1 19-May-2021  thorpej - As with i2c, just register the spi_controller directly.
- fdtbus_attach_spibus() is no longer anything other than a wrapper
around config_found(); just get rid of it and make its callers
look like all of the other SPI controller drivers.
 1.7.8.2 18-Jan-2022  thorpej G/C fdtbus_register_spi_controller(); it serves no purpose in the new
universe.
 1.7.8.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.1 03-Jun-2025  rjs branches: 1.1.4;
Add driver for Rockchip USB-C PHY, mostly from OpenBSD.

Only implements USB3 for now, not DP.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 03-Jun-2025  perseant file rk_tcphy.c was added on branch perseant-exfatfs on 2025-08-02 05:55:29 +0000
 1.16 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.15 13-Nov-2021  jmcneill Add support for RK3288 temperature sensors.
 1.14 11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.13 12-Jun-2021  mrg fix comment to talk about correct units (kelvin, not seconds).
 1.12 27-Jan-2021  thorpej branches: 1.12.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.10 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.9 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than
matching against multiple sets of compatibility strings.
 1.8 15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.7 03-Jul-2019  jmcneill branches: 1.7.10;
Set correct bits when enabling gpio tshut mode
 1.6 01-Jun-2019  joerg branches: 1.6.2;
Loop variables work better when they are initialized.
 1.5 15-May-2019  mrg support RK3328 tsadc:

- add clk_24m, clk_tsadc and pclk_tsadc rk3328 clocks
- rk3328 data<->temp conversion table is is wrong. the actual values
seen are 4096 - <expected>, and the linux driver has these values
in the inverted value directly
- the above means the rk3328 is increasing data for increasing temp,
and the min/max values are also inverted and swapped
- move auto-period into the rk_data
- rk3328 only has one sensor, deal with this
- rename rk_data_table as rk_data, and also s/rdt/rd/

thanks to jmcneill who helped clean up clocks confusion, and pointed
out the linux driver values matched my own inverted data experience.
 1.4 14-May-2019  mrg mostly port to rk3328.

- add rk3328 data<->temp table, and adjust code to use this vs rk3399
table for rk3328. add support for decrementing data.
- adjust auto period times for rk3328 vs rk3399
- add min/max data values, if data is outside these values mark the
sensor invalid.
- move init code into cpu specific sections, add rk3328 support

with a rk3328_cru.c update to add clocks, this attaches and reports
garbage values, so for now it's disabled.
 1.3 26-Apr-2019  mrg re-#if 0 some testing code.
 1.2 26-Apr-2019  mrg - implement sub-5degC interpolation.
- avoid setting TSADC_AUTO_CON_SRC*_EN twice
 1.1 26-Apr-2019  mrg implement TSADC driver for rockchip RK3328 and RK3399. so far, only
tested on RK3399 but the RK3328 looks mostly the same and has a good
chance of working too.

add clock entries for "clk_tsadc" and "pclk_tsadc" to cru.

exports "CPU" and "GPU" temp sensors. these currently limited to 5
degC resolution but can be reduced to sub 1 degC resolution with some
interpolation.

todo list:

- handle setting various temp values
- add interpolation between the 5degC intervals in sample data
- handle DT trips/temp value defaults
- interrupts aren't triggered (test by lowering warn/crit values),
and once they work, make the interrupt do something
- test on RK3328, and port to other rockchips (will require moving
some part into per-chipset sections, such as code<->temp tables)


thanks to jmcneill for help.
 1.6.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.2.2 10-Jun-2019  christos Sync with HEAD
 1.6.2.1 01-Jun-2019  christos file rk_tsadc.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.7.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.4.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.13 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.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.11 27-Jan-2021  thorpej branches: 1.11.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.7 09-Sep-2018  aymeric branches: 1.7.12;
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.6 12-Aug-2018  jmcneill Fix USB2 on RK3399
 1.5 12-Aug-2018  jmcneill Remove a sneaky KASSERT
 1.4 12-Aug-2018  jmcneill Add support for Rockchip RK3399 SoC.
 1.3 30-Jun-2018  jmcneill Use syscon API
 1.2 20-Jun-2018  jmcneill branches: 1.2.2; 1.2.4;
Add missing return in error path
 1.1 16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.1 20-Jun-2018  pgoyette file rk_usb.c was added on branch pgoyette-compat on 2018-06-25 07:25:39 +0000
 1.7.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.11 24-Apr-2023  mrg enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.

(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.10 13-May-2022  riastradh branches: 1.10.4;
rkv1crypto(4): Fix units in RNG repeated-output health test.

This code was intended to check whether the two 4-word halves of an
8-word, 32-byte, 256-bit sample were repeated.

Instead, it accidentally checked whether the first 4 _bytes_ of the
two halves were repeated.

The effect was a false alarm rate of 1/2^32, instead of a false alarm
rate of 1/2^128, with no change on the true alarm rate in the event
of an RNG wedged producing all-zero or all-one bits. 1/2^128 is an
acceptable false alarm rate; 1/2^32, not so much.

(The false alarm right might be higher if the samples are not
perfectly uniformly distributed, which they most likey aren't,
although the documentation doesn't give any details other than
suggesting it's a ring oscillator under the hood, which provides
entropy from jitter induced by thermal noise. This driver records
half a bit of entropy per bit of sample to be reasonably
conservative.)
 1.9 08-Apr-2022  riastradh rk_v1crypto(4): Fix missing `error =' assignment.

This is not likely to fail, but let's avoid suppressing an unlikely
error.
 1.8 19-Mar-2022  riastradh rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 19-Oct-2020  tnn branches: 1.3.2;
bus_space_write_4 does not have a return value
 1.2 17-May-2020  riastradh branches: 1.2.2;
Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)
 1.1 17-May-2020  riastradh Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.2.2.2 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.2.2.1 17-May-2020  martin file rk_v1crypto.c was added on branch netbsd-9 on 2020-05-18 18:54:30 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10.4.1 02-May-2023  martin Pull up following revision(s) (requested by mrg in ticket #154):

sys/arch/arm/dts/rk3328-crypto.dtsi: revision 1.1
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.8
sys/arch/arm/rockchip/rk3328_cru.c: revision 1.10
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.11

enable rkv1crypto on rock64.

this comes from upstream d1152bc533c941f7e267bf53d344cee510ea2808.
(i tried to make this be in rk3328.dtsi so all rk3328 boards would
benefit, but it doesn't work, and this is the only one have to test.)

adjust rkv1crypto to support a per-platform clocks setup.
 1.1 17-May-2020  riastradh branches: 1.1.2;
Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.1.2.2 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.1.2.1 17-May-2020  martin file rk_v1crypto.h was added on branch netbsd-9 on 2020-05-18 18:54:30 +0000
 1.16 20-Dec-2021  riastradh rkdrm: Implement vblank.
 1.15 19-Dec-2021  riastradh rkdrm: Implement atomic disable for planes.
 1.14 19-Dec-2021  riastradh rkdrm: Reset vop for 10us on attach.

This avoids creepy lines slowly appearing, and freezing themselves
semipermanently on the display, until the first successful modeset.
 1.13 19-Dec-2021  riastradh rkdrm: Convert to atomic modesetting, as needed for bridges.


Author: Jared McNeill <jmcneill@invisible.ca>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.12 19-Dec-2021  riastradh Sort includes.
 1.11 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 05-Jan-2020  mrg branches: 1.6.8; 1.6.10;
in rk_vop_dpms() set or unset the VOP_STANDBY_EN bit in VOP_SYS_CTRL
depending on the dpms mode requested.

this makes pinebook pro display actually turn off when dpms asks.
 1.5 17-Dec-2019  jakllsch rkvop: set stride using virtual framebuffer width instead of display mode
 1.4 17-Dec-2019  jakllsch Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
 1.3 15-Dec-2019  mrg rework slightly to avoid stupid gcc warnings.

ok jmcneill.
 1.2 14-Nov-2019  jmcneill branches: 1.2.2;
Fix a few swapped fields
 1.1 09-Nov-2019  jmcneill WIP display driver for Rockchip RK3399
 1.2.2.5 21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.2.2.4 09-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #613):

sys/arch/arm/rockchip/rk_vop.c: revision 1.6

in rk_vop_dpms() set or unset the VOP_STANDBY_EN bit in VOP_SYS_CTRL
depending on the dpms mode requested.

this makes pinebook pro display actually turn off when dpms asks.
 1.2.2.3 17-Dec-2019  martin Pull up following revision(s) (requested by mrg in ticket #556):

sys/arch/arm/rockchip/rk_vop.c: revision 1.3

rework slightly to avoid stupid gcc warnings.
ok jmcneill.
 1.2.2.2 16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.2.2.1 14-Nov-2019  martin file rk_vop.c was added on branch netbsd-9 on 2019-11-16 16:48:25 +0000
 1.6.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.8.1 05-Jan-2020  martin file rk_vop.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.15 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.14 29-Mar-2015  jmcneill branches: 1.14.2; 1.14.18;
Use shared armv7_generic_space
 1.13 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.12 04-Jan-2015  jmcneill add emac clk controls
 1.11 02-Jan-2015  jmcneill Add RK3188/RK3188+ CPU frequency setting support.
 1.10 31-Dec-2014  jmcneill fix typo in 1008MHz rate definition for rk3188
 1.9 31-Dec-2014  jmcneill Cleanup freq setting a bit. Add a table of supported rates in ~200MHz steps
from 600MHz to 1608MHz, and let the cpu.frequency parameter match the
closest available freq (without going over +50MHz).

After updating APLL, wait for PLL lock.

Do APLL changes with PLL mode set to slow, rather than the previous
(and more complex) APLL/GPLL dance.
 1.8 31-Dec-2014  jmcneill add RK3188plus freq scaling, and a 1.4GHz mode. anything above 1GHz with all 4 cores enabled seems to have trouble locking apll, needs more work
 1.7 30-Dec-2014  jmcneill add I2C driver
 1.6 30-Dec-2014  jmcneill Add support for setting RK3188/RK3188+ CPU frequency. If the SoC ID is
passed in bootargs matching RK3188 or RK3188+, and the cpu.frequency
option specifies a supported rate (currently 600, 1008, 1608 MHz), the
APLL clock will be adjusted accordingly.
 1.5 27-Dec-2014  jmcneill mmc0 on rk3188 is based on ahb clk, not gpll. add a function to control mmc0 clock as well.
 1.4 27-Dec-2014  jmcneill More clock fixes, debugging.
 1.3 27-Dec-2014  jmcneill add functions to get apll and cpu rates
 1.2 27-Dec-2014  jmcneill add helpers to get gpll and ahb clock rates
 1.1 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.14.18.2 03-Dec-2017  jdolecek update from HEAD
 1.14.18.1 29-Mar-2015  jdolecek file rockchip_board.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.14.2.2 06-Apr-2015  skrll Sync with HEAD
 1.14.2.1 29-Mar-2015  skrll file rockchip_board.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.4 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.3 29-Mar-2015  jmcneill branches: 1.3.2; 1.3.18;
Use shared armv7_generic_space
 1.2 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.1 02-Jan-2015  jmcneill Add RK3188/RK3188+ CPU frequency setting support.
 1.3.18.2 03-Dec-2017  jdolecek update from HEAD
 1.3.18.1 29-Mar-2015  jdolecek file rockchip_cpufreq.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.3.2.2 06-Apr-2015  skrll Sync with HEAD
 1.3.2.1 29-Mar-2015  skrll file rockchip_cpufreq.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.9 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.8 17-Jan-2015  jmcneill branches: 1.8.2; 1.8.18;
Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.7 04-Jan-2015  jmcneill add CLKSEL21 bits
 1.6 31-Dec-2014  jmcneill add some more bits
 1.5 30-Dec-2014  jmcneill Add support for setting RK3188/RK3188+ CPU frequency. If the SoC ID is
passed in bootargs matching RK3188 or RK3188+, and the cpu.frequency
option specifies a supported rate (currently 600, 1008, 1608 MHz), the
APLL clock will be adjusted accordingly.
 1.4 27-Dec-2014  jmcneill update some bits for rk3188
 1.3 27-Dec-2014  jmcneill More clock fixes, debugging.
 1.2 27-Dec-2014  jmcneill add functions to get apll and cpu rates
 1.1 27-Dec-2014  jmcneill add CRU reg definitions
 1.8.18.2 03-Dec-2017  jdolecek update from HEAD
 1.8.18.1 17-Jan-2015  jdolecek file rockchip_crureg.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.8.2.2 06-Apr-2015  skrll Sync with HEAD
 1.8.2.1 17-Jan-2015  skrll file rockchip_crureg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.2 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.1 26-Dec-2014  jmcneill branches: 1.1.2; 1.1.18;
Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 26-Dec-2014  jdolecek file rockchip_dma.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 26-Dec-2014  skrll file rockchip_dma.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.7 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.6 20-Jun-2017  jmcneill branches: 1.6.4;
Update for new dwc_mmc driver
 1.5 03-Jan-2015  jmcneill branches: 1.5.2; 1.5.12;
with 3.3V we can run this at 48MHz
 1.4 29-Dec-2014  jmcneill - Set DWC_MMC_F_FORCE_CLK
- Force max sdmmc clk to 24MHz
- Update for simpler dwcmmc clock setup
 1.3 28-Dec-2014  jmcneill remove redundant irq print
 1.2 27-Dec-2014  jmcneill set DWC_MMC_F_PWREN_CLEAR, implement set_clkdiv callback; now this works
 1.1 27-Dec-2014  jmcneill add dwcmmc glue, doesnt work yet
 1.5.12.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.5.2.3 28-Aug-2017  skrll Sync with HEAD
 1.5.2.2 06-Apr-2015  skrll Sync with HEAD
 1.5.2.1 03-Jan-2015  skrll file rockchip_dwcmmc.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.6.4.2 03-Dec-2017  jdolecek update from HEAD
 1.6.4.1 20-Jun-2017  jdolecek file rockchip_dwcmmc.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.2 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.1 17-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
Add dwctmr glue, from FUKAUMI Naoki <fun@naobsd.org>
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 17-Jan-2015  jdolecek file rockchip_dwctmr.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 17-Jan-2015  skrll file rockchip_dwctmr.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.7 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.6 23-Apr-2016  skrll branches: 1.6.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.5 30-Aug-2015  skrll Update for latest dwc2
 1.4 30-Jul-2015  skrll Use IPL_VM for dwc2_intr and mark as MP safe where possible.
 1.3 22-Jul-2015  skrll Trailing whitespace.
 1.2 26-Dec-2014  jmcneill branches: 1.2.2;
Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.2.2.3 22-Sep-2015  skrll Sync with HEAD
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 26-Dec-2014  skrll file rockchip_dwctwo.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.6.16.2 03-Dec-2017  jdolecek update from HEAD
 1.6.16.1 23-Apr-2016  jdolecek file rockchip_dwctwo.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.18 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.17 20-Feb-2017  ozaki-r branches: 1.17.12;
Apply deferred if_start to more drivers...
 1.16 15-Dec-2016  ozaki-r branches: 1.16.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.15 10-Jun-2016  ozaki-r branches: 1.15.2;
Introduce m_set_rcvif and m_reset_rcvif

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

No functional change.
 1.14 26-Mar-2016  martin David Binderman in port-arm/51013: masking of rxbdtlen happened before
the value was read - move it down a few lines.
 1.13 09-Feb-2016  ozaki-r Introduce softint-based if_input

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.12 23-Feb-2015  martin branches: 1.12.2;
Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.
 1.11 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.10 13-Jan-2015  jmcneill one more segment can be queued, from FUKAUMI Naoki <naobsd@gmail.com>
 1.9 08-Jan-2015  jmcneill fix a couple txq fencepost issues, from FUKAUMI Naoki <fun@naobsd.org>
 1.8 08-Jan-2015  jmcneill no need to invert ether_crc32_le return, now multicast works
 1.7 06-Jan-2015  jmcneill Make sure to write our MAC address to the chip
 1.6 06-Jan-2015  jmcneill fix multicast hash calculation
 1.5 05-Jan-2015  jmcneill dont clear EMAC_STAT_MDIO on irq, as we poll this bit in readreg/writereg
 1.4 05-Jan-2015  jmcneill add multicast filter support
 1.3 05-Jan-2015  jmcneill various fixes from FUKAUMI Naoki <fun@naobsd.org> and martin@
 1.2 04-Jan-2015  jmcneill set rmii rate to 50MHz, handle 10 vs 100 Mbps
 1.1 04-Jan-2015  jmcneill Add Rockchip ethernet driver, untested.
 1.12.2.7 28-Aug-2017  skrll Sync with HEAD
 1.12.2.6 05-Feb-2017  skrll Sync with HEAD
 1.12.2.5 09-Jul-2016  skrll Sync with HEAD
 1.12.2.4 22-Apr-2016  skrll Sync with HEAD
 1.12.2.3 19-Mar-2016  skrll Sync with HEAD
 1.12.2.2 06-Apr-2015  skrll Sync with HEAD
 1.12.2.1 23-Feb-2015  skrll file rockchip_emac.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.15.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.15.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.16.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.17.12.2 03-Dec-2017  jdolecek update from HEAD
 1.17.12.1 20-Feb-2017  jdolecek file rockchip_emac.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.2 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.1 04-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
Add Rockchip ethernet driver, untested.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 04-Jan-2015  jdolecek file rockchip_emacreg.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 04-Jan-2015  skrll file rockchip_emacreg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.8 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.7 14-Feb-2016  chs branches: 1.7.16;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.6 11-Jan-2015  jmcneill branches: 1.6.2;
rkiic_wait: fix non-polled mode
 1.5 01-Jan-2015  jmcneill Include addr and reg in data sent with rkiic_write, now writes work too.
 1.4 01-Jan-2015  jmcneill drop clk rate to 100kHz, explicit register initialization, shift slave addr left 1, add some more debugging, now this works
 1.3 30-Dec-2014  jmcneill Actually set slave addr / reg. Wait for start irq after sending start before
transferring data. Add RKIIC_DEBUG kernel option.
 1.2 30-Dec-2014  jmcneill drop clock rate to 400kHz
 1.1 30-Dec-2014  jmcneill add I2C driver
 1.6.2.3 19-Mar-2016  skrll Sync with HEAD
 1.6.2.2 06-Apr-2015  skrll Sync with HEAD
 1.6.2.1 11-Jan-2015  skrll file rockchip_i2c.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.7.16.2 03-Dec-2017  jdolecek update from HEAD
 1.7.16.1 14-Feb-2016  jdolecek file rockchip_i2c.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.3 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.2 30-Dec-2014  jmcneill branches: 1.2.2; 1.2.18;
Actually set slave addr / reg. Wait for start irq after sending start before
transferring data. Add RKIIC_DEBUG kernel option.
 1.1 30-Dec-2014  jmcneill add I2C driver
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 30-Dec-2014  jdolecek file rockchip_i2creg.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 30-Dec-2014  skrll file rockchip_i2creg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.2 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.1 26-Dec-2014  jmcneill branches: 1.1.2; 1.1.18;
Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 26-Dec-2014  jdolecek file rockchip_intr.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 26-Dec-2014  skrll file rockchip_intr.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.6 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.5 17-Jan-2015  jmcneill branches: 1.5.2; 1.5.18;
Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.4 28-Dec-2014  jmcneill add SRAM, SCU, PMU offsets
 1.3 28-Dec-2014  jmcneill add DDR offsets
 1.2 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.5.18.2 03-Dec-2017  jdolecek update from HEAD
 1.5.18.1 17-Jan-2015  jdolecek file rockchip_reg.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.5.2.2 06-Apr-2015  skrll Sync with HEAD
 1.5.2.1 17-Jan-2015  skrll file rockchip_reg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.3 29-Mar-2015  jmcneill Use shared armv7_generic_space
 1.2 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.3 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.2 17-Jan-2015  jmcneill branches: 1.2.2; 1.2.18;
Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.1 02-Jan-2015  jmcneill Add driver for RK3188 64-bit timer.
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 17-Jan-2015  jdolecek file rockchip_timer.c was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.2.2.2 06-Apr-2015  skrll Sync with HEAD
 1.2.2.1 17-Jan-2015  skrll file rockchip_timer.c was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.2 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.1 02-Jan-2015  jmcneill branches: 1.1.2; 1.1.18;
Add driver for RK3188 64-bit timer.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 02-Jan-2015  jdolecek file rockchip_timerreg.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.1.2.2 06-Apr-2015  skrll Sync with HEAD
 1.1.2.1 02-Jan-2015  skrll file rockchip_timerreg.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 1.14 08-Feb-2018  jmcneill Move Rockchip port to the attic. It is not very useful.
 1.13 29-Mar-2015  jmcneill branches: 1.13.2; 1.13.18;
Use shared armv7_generic_space
 1.12 17-Jan-2015  jmcneill Add Rockchip PX2 support, from FUKAUMI Naoki <fun@naobsd.org>
 1.11 05-Jan-2015  jmcneill add GRF bus space handle to obio_attach_args, from FUKAUMI Naoki <fun@naobsd.org>
 1.10 04-Jan-2015  jmcneill add emac clk controls
 1.9 02-Jan-2015  jmcneill Add RK3188/RK3188+ CPU frequency setting support.
 1.8 30-Dec-2014  jmcneill add I2C driver
 1.7 30-Dec-2014  jmcneill Add support for setting RK3188/RK3188+ CPU frequency. If the SoC ID is
passed in bootargs matching RK3188 or RK3188+, and the cpu.frequency
option specifies a supported rate (currently 600, 1008, 1608 MHz), the
APLL clock will be adjusted accordingly.
 1.6 27-Dec-2014  jmcneill mmc0 on rk3188 is based on ahb clk, not gpll. add a function to control mmc0 clock as well.
 1.5 27-Dec-2014  jmcneill More clock fixes, debugging.
 1.4 27-Dec-2014  jmcneill add functions to get apll and cpu rates
 1.3 27-Dec-2014  jmcneill add helpers to get gpll and ahb clock rates
 1.2 26-Dec-2014  jmcneill Map all of core0 and core1 space and let drivers use bus_space_subregion
instead of bus_space_map. Fill in rockchip_reset.
 1.1 26-Dec-2014  jmcneill Initial support for Rockchip RK3066 / RK3188 SoCs, from Hiroshi Tokuda
<tokuda@tokuda.net> on port-arm:

http://mail-index.netbsd.org/port-arm/2014/10/09/msg002651.html
 1.13.18.2 03-Dec-2017  jdolecek update from HEAD
 1.13.18.1 29-Mar-2015  jdolecek file rockchip_var.h was added on branch tls-maxphys on 2017-12-03 11:35:55 +0000
 1.13.2.2 06-Apr-2015  skrll Sync with HEAD
 1.13.2.1 29-Mar-2015  skrll file rockchip_var.h was added on branch nick-nhusb on 2015-04-06 15:17:53 +0000
 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
 1.2 20-Sep-2008  tsutsui Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573. Approved by martin@.
 1.1 09-Jan-2002  rjs branches: 1.1.2; 1.1.4; 1.1.126; 1.1.130; 1.1.132; 1.1.136;
Interrupt related defines for SA11x0.
 1.1.136.1 19-Oct-2008  haad Sync with HEAD.
 1.1.132.1 10-Oct-2008  skrll Sync with HEAD.
 1.1.130.1 04-May-2009  yamt sync with head.
 1.1.126.1 28-Sep-2008  mjf Sync with HEAD.
 1.1.4.2 11-Jan-2002  nathanw More catchup.
 1.1.4.1 09-Jan-2002  nathanw file genassym.cf was added on branch nathanw_sa on 2002-01-11 23:38:05 +0000
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 09-Jan-2002  thorpej file genassym.cf was added on branch kqueue on 2002-01-10 19:38:31 +0000
 1.28 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.27 24-Apr-2021  thorpej branches: 1.27.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.26 20-Nov-2020  thorpej branches: 1.26.2;
malloc(9) -> kmem(9)
 1.25 10-Nov-2019  chs branches: 1.25.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.24 01-Jul-2011  dyoung branches: 1.24.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.23 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.22 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.21 08-Jan-2008  matt branches: 1.21.6; 1.21.8; 1.21.10;
As of this commit, all arm32 kernel now build.
 1.20 17-Oct-2007  garbled branches: 1.20.2; 1.20.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 14-Jul-2007  ad branches: 1.19.6; 1.19.10; 1.19.12;
Generic soft interrupts are mandatory.
 1.18 27-Jun-2006  peter branches: 1.18.14; 1.18.22;
KNF. Correct some spelling errors.
 1.17 04-Mar-2006  peter branches: 1.17.2; 1.17.10;
s/u_intN_t/uintN_t/
 1.16 04-Mar-2006  peter Use ANSI function decls.
 1.15 03-Jan-2006  peter branches: 1.15.2; 1.15.4;
Remove unnecessary #ifdef hpcarm + includes.
 1.14 11-Dec-2005  christos branches: 1.14.2;
merge ktrace-lwp.
 1.13 26-Aug-2005  drochner s/locdesc_t/int/g
 1.12 30-Jun-2005  drochner branches: 1.12.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.11 08-Aug-2003  bsh split StrongArm companion chip (sacc) driver so that we can support
sacc on other platforms than hpcarm (evbarm for example).

codes specific to hpcarm are extracted and moved to hpcarm/dev/.
 1.10 15-Jul-2003  lukem __KERNEL_RCSID()
 1.9 02-Oct-2002  thorpej branches: 1.9.8;
Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.5 12-Aug-2002  rjs Always clear SA11x0 GPIO in interrupt handler.
 1.4 19-Jul-2002  ichiro make compile
 1.3 24-Sep-2001  takemura branches: 1.3.4; 1.3.12;
Renamed platid_search() to platid_search_data() and added new platid_search().
Platid_name() was re-implemented using platid_search().
 1.2 01-Aug-2001  rjs branches: 1.2.2;
Update from hpcarm with changes to probe routine and test for chip ID.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.12.2 30-Aug-2002  gehenna catch up with -current.
 1.3.12.1 21-Jul-2002  gehenna catch up with -current.
 1.3.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.3 13-Aug-2002  nathanw Catch up to -current.
 1.3.4.2 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.1 24-Sep-2001  nathanw file sa1111.c was added on branch nathanw_sa on 2002-08-01 02:41:18 +0000
 1.9.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.8.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.4 21-Jan-2008  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.14.2.1 15-Jan-2006  yamt sync with head.
 1.15.4.1 22-Apr-2006  simonb Sync with head.
 1.15.2.1 09-Sep-2006  rpaulo sync with head
 1.17.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.2.1 11-Aug-2006  yamt sync with head
 1.18.22.1 03-Oct-2007  garbled Sync with HEAD
 1.18.14.1 15-Jul-2007  ad Sync with head.
 1.19.12.2 09-Jan-2008  matt sync with HEAD
 1.19.12.1 06-Nov-2007  matt sync with HEAD
 1.19.10.2 20-Jan-2008  chris Sync to HEAD.
 1.19.10.1 01-Jan-2008  chris Sync with HEAD.
 1.19.6.1 28-Feb-2008  rjs Sync with HEAD.
 1.20.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.20.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.21.10.2 20-Jun-2009  yamt sync with head
 1.21.10.1 16-May-2008  yamt sync with head.
 1.21.8.1 18-May-2008  yamt sync with head.
 1.21.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.24.54.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.26.2.3 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.26.2.2 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.26.2.1 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.27.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.19 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.18 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.17 10-Aug-2014  tls branches: 1.17.4;
Merge tls-earlyentropy branch into HEAD.
 1.16 27-Oct-2012  chs branches: 1.16.10;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.15 04-Feb-2012  matt branches: 1.15.6;
Make this compile again.
 1.14 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.13 19-Nov-2011  tls branches: 1.13.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.12 13-Mar-2010  bsh branches: 1.12.10;
fix changes for struct device split for Lubbock.
 1.11 29-May-2009  rjs branches: 1.11.2;
Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.10 05-Jan-2008  ad branches: 1.10.10;
Fix includes.
 1.9 27-Jun-2006  peter branches: 1.9.30; 1.9.34; 1.9.36; 1.9.42; 1.9.50;
KNF. Correct some spelling errors.
 1.8 23-Feb-2006  thorpej branches: 1.8.2; 1.8.10;
Use device_parent().
 1.7 11-Dec-2005  christos branches: 1.7.2; 1.7.4; 1.7.6;
merge ktrace-lwp.
 1.6 06-Apr-2004  bsh branches: 1.6.12;
fake that the PS/2 kbd/mouse controller of SA-1111 has two slots.

This is necessary to attach a pms driver to sackbc.
 1.5 06-Apr-2004  bsh whitespace nits.
 1.4 24-Mar-2004  drochner remove license clauses 3 and 4 from my cpoyright notices
 1.3 13-Mar-2004  bjh21 Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 20-Dec-2002  bsh branches: 1.1.2; 1.1.4;
Driver for keyboard controller in the SA-1111 companion chip.

Our PC keyboard driver (sys/dev/pckbc/pckbd.c) works only with 8042
keyboard controller driver (sys/dev/ic/pckbc.c). So, This file
provides same functions as those of 8042 driver.

XXX: we need cleaner interface between the keyboard driver and
keyboard controller drivers.

XXX: PS/2 mice are not supported yet.
 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 29-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Dec-2002  thorpej file sa1111_kbc.c was added on branch nathanw_sa on 2002-12-29 19:20:08 +0000
 1.6.12.3 21-Jan-2008  yamt sync with head
 1.6.12.2 30-Dec-2006  yamt sync with head.
 1.6.12.1 21-Jun-2006  yamt sync with head.
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.7.2.1 01-Mar-2006  yamt sync with head.
 1.8.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.8.2.1 11-Aug-2006  yamt sync with head
 1.9.50.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.42.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.36.1 09-Jan-2008  matt sync with HEAD
 1.9.34.1 20-Jan-2008  chris Sync to HEAD.
 1.9.30.1 28-Feb-2008  rjs Sync with HEAD.
 1.10.10.2 11-Aug-2010  yamt sync with head.
 1.10.10.1 20-Jun-2009  yamt sync with head
 1.11.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.12.10.2 30-Oct-2012  yamt sync with head
 1.12.10.1 17-Apr-2012  yamt sync with head
 1.13.2.1 18-Feb-2012  mrg merge to -current.
 1.15.6.3 03-Dec-2017  jdolecek update from HEAD
 1.15.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.10.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.17.4.1 06-Jun-2015  skrll Sync with HEAD
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Dec-2002  bsh branches: 1.3.106; 1.3.108; 1.3.110;
+ protect against including twice
+ add bit definitions in SKCR
+ add keyboard controller registers
 1.2 08-Jan-2002  rjs Add extra SA1111 register definitions.
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.4 19-Dec-2002  thorpej Sync with HEAD.
 1.1.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.8.2 11-Jan-2002  nathanw More catchup.
 1.1.8.1 08-Jul-2001  nathanw file sa1111_reg.h was added on branch nathanw_sa on 2002-01-11 23:38:05 +0000
 1.1.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.110.1 16-May-2008  yamt sync with head.
 1.3.108.1 18-May-2008  yamt sync with head.
 1.3.106.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.11 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10 27-Jun-2006  peter branches: 1.10.60; 1.10.62; 1.10.64;
KNF. Correct some spelling errors.
 1.9 04-Mar-2006  peter branches: 1.9.2; 1.9.10;
s/u_intN_t/uintN_t/
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6;
merge ktrace-lwp.
 1.7 26-Aug-2005  drochner s/locdesc_t/int/g
 1.6 30-Jun-2005  drochner branches: 1.6.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.5 08-Aug-2003  bsh split StrongArm companion chip (sacc) driver so that we can support
sacc on other platforms than hpcarm (evbarm for example).

codes specific to hpcarm are extracted and moved to hpcarm/dev/.
 1.4 14-Apr-2003  rjs branches: 1.4.2;
Remove unused sa_membase and sa_memsize structure member variables.
 1.3 18-Dec-2002  bsh back out a part of my previous commit.
 1.2 18-Dec-2002  bsh + protect against including twice
+ add struct sa1111_attach_args for keyboard controller support.
 1.1 08-Jul-2001  rjs branches: 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.2 19-Dec-2002  thorpej Sync with HEAD.
 1.1.8.1 08-Jul-2001  thorpej file sa1111_var.h was added on branch nathanw_sa on 2002-12-19 00:30:45 +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.6.2.2 30-Dec-2006  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.9.2.1 11-Aug-2006  yamt sync with head
 1.10.64.2 20-Jun-2009  yamt sync with head
 1.10.64.1 16-May-2008  yamt sync with head.
 1.10.62.1 18-May-2008  yamt sync with head.
 1.10.60.1 02-Jun-2008  mjf Sync with HEAD.
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.27 27-Oct-2012  chs branches: 1.27.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.26 01-Jul-2011  dyoung branches: 1.26.2; 1.26.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.25 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.24 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.23 13-Jun-2008  rafal Let hpcarm kernels boot again after the merge of the armv6 branch. Fixes
PR port-hpcarm/38591

XXX: There is still a hard hang that I've seen on both shark and hpcarm in
the process exit path; I don't know much beyond that yet.
 1.22 28-Apr-2008  martin branches: 1.22.2; 1.22.4;
Remove clause 3 and 4 from TNF licenses
 1.21 27-Jun-2006  peter branches: 1.21.60; 1.21.62; 1.21.64;
KNF. Correct some spelling errors.
 1.20 11-Apr-2006  peter branches: 1.20.4;
Add missing disclaimer.
 1.19 04-Mar-2006  peter branches: 1.19.2; 1.19.4; 1.19.6;
Use ANSI function decls.
 1.18 03-Jan-2006  peter branches: 1.18.2; 1.18.4;
Remove unnecessary #ifdef hpcarm + includes.
 1.17 11-Dec-2005  christos branches: 1.17.2;
merge ktrace-lwp.
 1.16 26-Aug-2005  drochner s/locdesc_t/int/g
 1.15 30-Jun-2005  drochner branches: 1.15.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 14-Apr-2003  rjs branches: 1.13.2;
Remove unused sa_membase and sa_memsize structure member variables.
 1.12 03-Apr-2003  he Including <uvm/uvm_extern.h> exposed the fact that we had a benign
type mismatch for SetCPSR. Remove local extern declaration, since
it's now superfluous.
 1.11 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.10 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.5 19-Jul-2002  ichiro sync to hpcarm/sa11x0

later, remove hpcarm/sa11x0
 1.4 13-Mar-2002  rjs branches: 1.4.4;
Map the reset controller registers.
 1.3 30-Jul-2001  rjs branches: 1.3.6;
Remove unused hpc includes.
 1.2 30-Jul-2001  rjs Update from hpcarm to remove iPAQ egpio code.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.3.6.5 03-Jan-2003  thorpej Sync with HEAD.
 1.3.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.3 01-Aug-2002  nathanw Catch up to -current.
 1.3.6.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.6.1 30-Jul-2001  nathanw file sa11x0.c was added on branch nathanw_sa on 2002-04-01 07:39:15 +0000
 1.4.4.1 21-Jul-2002  gehenna catch up with -current.
 1.13.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.15.2.2 30-Dec-2006  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.17.2.1 15-Jan-2006  yamt sync with head.
 1.18.4.1 22-Apr-2006  simonb Sync with head.
 1.18.2.1 09-Sep-2006  rpaulo sync with head
 1.19.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.19.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.19.2.2 11-Aug-2006  yamt sync with head
 1.19.2.1 24-May-2006  yamt sync with head.
 1.20.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.21.64.4 19-Aug-2009  yamt sync with head.
 1.21.64.3 20-Jun-2009  yamt sync with head
 1.21.64.2 04-May-2009  yamt sync with head.
 1.21.64.1 16-May-2008  yamt sync with head.
 1.21.62.2 17-Jun-2008  yamt sync with head.
 1.21.62.1 18-May-2008  yamt sync with head.
 1.21.60.2 29-Jun-2008  mjf Sync with HEAD.
 1.21.60.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.4.1 18-Jun-2008  simonb Sync with head.
 1.22.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.26.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.2.1 30-Oct-2012  yamt sync with head
 1.27.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.27.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.27.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.27.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.27.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.27.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.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.59 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.58 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.57 10-Nov-2019  chs branches: 1.57.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.56 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.55 13-Apr-2015  riastradh branches: 1.55.16; 1.55.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.54 15-Nov-2014  christos branches: 1.54.2;
centralize the call unit / dialout macros
 1.53 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.52 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.51 16-Mar-2014  dholland branches: 1.51.2;
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.50 02-Feb-2012  tls branches: 1.50.6; 1.50.10;
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.49 01-Jul-2011  dyoung branches: 1.49.2; 1.49.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.48 24-Apr-2011  rmind Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.47 19-Aug-2010  tsutsui branches: 1.47.2;
Fix device_t/softc split botches. PR port-hpcarm/43780
 1.46 06-Dec-2009  dyoung branches: 1.46.2; 1.46.4;
Simplify the device-activation hook. Move some of the device
deactivation to the detachment routine, where it belongs.
 1.45 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.44 11-Jun-2008  cegger use device_lookup_private to get softc
 1.43 28-Apr-2008  martin branches: 1.43.2; 1.43.4;
Remove clause 3 and 4 from TNF licenses
 1.42 27-Dec-2007  rjs branches: 1.42.6; 1.42.8; 1.42.10;
Change to new softint API.
 1.41 19-Nov-2007  ad branches: 1.41.6;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.40 17-Oct-2007  garbled branches: 1.40.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.39 14-Jul-2007  ad branches: 1.39.6; 1.39.8; 1.39.10; 1.39.12; 1.39.16;
Generic soft interrupts are mandatory.
 1.38 04-Mar-2007  christos branches: 1.38.2; 1.38.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.37 01-Oct-2006  elad branches: 1.37.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.36 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.35 23-Jul-2006  ad branches: 1.35.4; 1.35.6;
Use the LWP cached credentials where sane.
 1.34 27-Jun-2006  peter KNF. Correct some spelling errors.
 1.33 27-Jun-2006  peter Use symbolic constants for the UART register locations.
Consistently write "SA-11x0".
 1.32 14-May-2006  elad branches: 1.32.4;
integrate kauth.
 1.31 11-Apr-2006  peter Implement pmap_devmap on hpcarm to map I/O registers that are used
in early start-up stage. Change the virtual address for UART #3 to
the physical address in the configuration files.
While here, implement the sa11x0_bs_unmap function.

Reviewed by Toru Nishimura (on port-arm).
 1.30 26-Mar-2006  thorpej Use device_unit().
 1.29 06-Mar-2006  christos branches: 1.29.2; 1.29.4;
PR/33014: arnaud degroote: remove SET/ISSET/CLR defines
 1.28 04-Mar-2006  peter branches: 1.28.2;
Use ANSI function decls.
 1.27 04-Mar-2006  peter Match all Jornada 7xx models.
 1.26 20-Feb-2006  thorpej Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.25 27-Dec-2005  yamt branches: 1.25.2; 1.25.4; 1.25.6;
sacom_attach_subr: don't try to initialize a lock which doesn't exist.
 1.24 27-Dec-2005  chs remove the COM_MPLOCK option. always include the spinlock in the softc
and always call the simple_* locking functions. the locking functions
are compiled out if they are not needed anyway, so a separate option
for this doesn't gain anything.

this also fixes the serial console on my alpha ES40 (which doesn't make much
sense since the com driver should still be under the big lock on alpha,
but whatever).
 1.23 11-Dec-2005  christos merge ktrace-lwp.
 1.22 23-Oct-2005  peter Make this compile when DEBUG is defined.
 1.21 06-Sep-2005  kleink branches: 1.21.2;
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.20 02-Jun-2005  uwe branches: 1.20.2;
Drop parameter names from prototype to avoid shadowing warnings.
 1.19 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.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 29-Jun-2003  fvdl branches: 1.17.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.16 29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.15 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.14 07-Mar-2003  rjs Add NULL cn_halt and cn_flush entries to consdev.
 1.13 04-Nov-2002  itohy Dump DDB_* and SYMTAB_SPACE options to opt_ddbparam.h rather than opt_ddb.h.
These options are used in limited files but #include "opt_ddb.h" are
everywhere, and changing them caused almost full recompilation.
 1.12 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.11 05-Oct-2002  chs branches: 1.11.2;
add missing protos.
 1.10 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.7 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.6 02-Sep-2002  manu When the serial port was not checked in hpcboot on hpcarm, writing to
/dev/ttyS0 crashed the kernel. This is because sacom_filltx uses some
uninitialized static variables. Pulling the salues from softc instead
fixes the problem (this is what was done before the drver was moved
from /sys/arch/hpcarm to /sys/arch/arm, anyway).
 1.5 19-Jul-2002  ichiro make compile
 1.4 19-Jul-2002  ichiro sync to hpcarm/sa11x0

later, remove hpcarm/sa11x0
 1.3 17-Mar-2002  atatat branches: 1.3.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.2 20-Nov-2001  lukem - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for options KGDB_DEVNAME="\"com\""
- use correct quotes for options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.4; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.7 11-Nov-2002  nathanw Catch up to -current
 1.1.8.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.5 17-Sep-2002  nathanw Catch up to -current.
 1.1.8.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.8.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.8.1 08-Jul-2001  nathanw file sa11x0_com.c was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.1.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.1.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.4.2 21-Jul-2002  gehenna catch up with -current.
 1.3.4.1 19-May-2002  gehenna Add device switch.
Replace the access to devsw table and the hard-coded majors with devsw API.
 1.11.2.1 24-Oct-2002  bjh21 Sync with trunk.
 1.17.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.4 24-Jan-2005  skrll Adapt to branch.
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.5 21-Jan-2008  yamt sync with head
 1.20.2.4 07-Dec-2007  yamt sync with head
 1.20.2.3 03-Sep-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.21.2.1 26-Oct-2005  yamt sync with head
 1.25.6.2 01-Jun-2006  kardel Sync with head.
 1.25.6.1 22-Apr-2006  simonb Sync with head.
 1.25.4.1 09-Sep-2006  rpaulo sync with head
 1.25.2.1 01-Mar-2006  yamt sync with head.
 1.28.2.4 11-Aug-2006  yamt sync with head
 1.28.2.3 24-May-2006  yamt sync with head.
 1.28.2.2 01-Apr-2006  yamt sync with head.
 1.28.2.1 13-Mar-2006  yamt sync with head.
 1.29.4.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.29.4.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.29.2.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.29.2.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.29.2.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.29.2.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.32.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.35.6.1 22-Oct-2006  yamt sync with head
 1.35.4.1 18-Nov-2006  ad Sync with head.
 1.37.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.38.10.1 03-Oct-2007  garbled Sync with HEAD
 1.38.2.2 03-Dec-2007  ad Sync with HEAD.
 1.38.2.1 15-Jul-2007  ad Sync with head.
 1.39.16.1 21-Nov-2007  bouyer Sync with HEAD
 1.39.12.2 09-Jan-2008  matt sync with HEAD
 1.39.12.1 06-Nov-2007  matt sync with HEAD
 1.39.10.1 01-Jan-2008  chris Sync with HEAD.
 1.39.8.1 21-Nov-2007  joerg Sync with HEAD.
 1.39.6.3 28-Feb-2008  rjs Sync with HEAD.
 1.39.6.2 26-Dec-2007  rjs Sync with HEAD.
 1.39.6.1 06-Oct-2007  rjs Switch to new interrupt code.
 1.40.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.40.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.41.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.42.10.5 09-Oct-2010  yamt sync with head
 1.42.10.4 11-Mar-2010  yamt sync with head
 1.42.10.3 20-Jun-2009  yamt sync with head
 1.42.10.2 04-May-2009  yamt sync with head.
 1.42.10.1 16-May-2008  yamt sync with head.
 1.42.8.2 17-Jun-2008  yamt sync with head.
 1.42.8.1 18-May-2008  yamt sync with head.
 1.42.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.42.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.43.4.1 18-Jun-2008  simonb Sync with head.
 1.43.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.46.4.2 31-May-2011  rmind sync with head
 1.46.4.1 05-Mar-2011  rmind sync with head
 1.46.2.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.47.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.49.6.1 18-Feb-2012  mrg merge to -current.
 1.49.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.49.2.1 17-Apr-2012  yamt sync with head
 1.50.10.1 18-May-2014  rmind sync with head
 1.50.6.2 03-Dec-2017  jdolecek update from HEAD
 1.50.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.51.2.2 10-Aug-2014  tls Rebase.
 1.51.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.54.2.1 06-Jun-2015  skrll Sync with HEAD
 1.55.18.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.55.18.1 10-Jun-2019  christos Sync with HEAD
 1.55.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.57.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 11-Apr-2006  peter branches: 1.2.64; 1.2.66; 1.2.68;
Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.42; 1.1.56; 1.1.58; 1.1.60; 1.1.62; 1.1.64;
Initial copy of SA11x0 support from hpcarm.
 1.1.64.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.62.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.60.1 24-May-2006  yamt sync with head.
 1.1.58.1 22-Apr-2006  simonb Sync with head.
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_comreg.h was added on branch nathanw_sa on 2001-07-08 23:37:54 +0000
 1.2.68.1 16-May-2008  yamt sync with head.
 1.2.66.1 18-May-2008  yamt sync with head.
 1.2.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 17-Oct-2007  garbled branches: 1.4.16; 1.4.18; 1.4.20;
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.3 14-Jul-2007  ad branches: 1.3.10; 1.3.12;
Generic soft interrupts are mandatory.
 1.2 11-Apr-2006  peter branches: 1.2.18; 1.2.26;
Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.42; 1.1.56; 1.1.58; 1.1.60; 1.1.62; 1.1.64;
Initial copy of SA11x0 support from hpcarm.
 1.1.64.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.62.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.60.1 24-May-2006  yamt sync with head.
 1.1.58.1 22-Apr-2006  simonb Sync with head.
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.2 03-Sep-2007  yamt sync with head.
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_comvar.h was added on branch nathanw_sa on 2001-07-08 23:37:54 +0000
 1.2.26.1 03-Oct-2007  garbled Sync with HEAD
 1.2.18.1 15-Jul-2007  ad Sync with head.
 1.3.12.1 06-Nov-2007  matt sync with HEAD
 1.3.10.1 01-Jan-2008  chris Sync with HEAD.
 1.4.20.2 20-Jun-2009  yamt sync with head
 1.4.20.1 16-May-2008  yamt sync with head.
 1.4.18.1 18-May-2008  yamt sync with head.
 1.4.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 11-Apr-2006  peter branches: 1.2.64; 1.2.66; 1.2.68;
Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.42; 1.1.56; 1.1.58; 1.1.60; 1.1.62; 1.1.64;
Initial copy of SA11x0 support from hpcarm.
 1.1.64.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.62.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.60.1 24-May-2006  yamt sync with head.
 1.1.58.1 22-Apr-2006  simonb Sync with head.
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_dmacreg.h was added on branch nathanw_sa on 2001-07-08 23:37:54 +0000
 1.2.68.1 16-May-2008  yamt sync with head.
 1.2.66.1 18-May-2008  yamt sync with head.
 1.2.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 29-May-2009  rjs Add some definitions for alternative GPIO assignments.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 30-Jul-2001  rjs branches: 1.2.6; 1.2.128; 1.2.130; 1.2.132;
Update from hpcarm to remove iPAQ and Jornada specific #defines.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.132.2 20-Jun-2009  yamt sync with head
 1.2.132.1 16-May-2008  yamt sync with head.
 1.2.130.1 18-May-2008  yamt sync with head.
 1.2.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.6.2 30-Jul-2001  rjs Update from hpcarm to remove iPAQ and Jornada specific #defines.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_gpioreg.h was added on branch nathanw_sa on 2001-07-30 15:58:57 +0000
 1.1 31-Jul-2007  rjs branches: 1.1.2;
file sa11x0_intr.c was initially added on branch hpcarm-cleanup.
 1.1.2.3 26-Dec-2007  rjs Sync with HEAD.
 1.1.2.2 05-Oct-2007  rjs Typo in comment.
 1.1.2.1 31-Jul-2007  rjs Add new interrupt handler code for SA11x0.

Based on a the PXA2x0 equivalent with some ideas from evbppc.
 1.1 31-Jul-2007  rjs branches: 1.1.2;
file sa11x0_intr.h was initially added on branch hpcarm-cleanup.
 1.1.2.1 31-Jul-2007  rjs Add new interrupt handler code for SA11x0.

Based on a the PXA2x0 equivalent with some ideas from evbppc.
 1.22 21-Apr-2023  skrll Trailing whitespace
 1.21 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.20 22-Feb-2014  matt branches: 1.20.28;
Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.19 01-Jul-2011  dyoung branches: 1.19.2; 1.19.12; 1.19.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.18 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.17 27-Jun-2006  peter branches: 1.17.64;
KNF. Correct some spelling errors.
 1.16 11-Apr-2006  peter branches: 1.16.4;
Implement pmap_devmap on hpcarm to map I/O registers that are used
in early start-up stage. Change the virtual address for UART #3 to
the physical address in the configuration files.
While here, implement the sa11x0_bs_unmap function.

Reviewed by Toru Nishimura (on port-arm).
 1.15 04-Mar-2006  peter branches: 1.15.2; 1.15.4; 1.15.6;
Use ANSI function decls.
 1.14 24-Nov-2005  yamt branches: 1.14.4; 1.14.6;
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.13 01-Apr-2005  yamt branches: 1.13.2; 1.13.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.12 15-Jul-2003  lukem branches: 1.12.8; 1.12.10;
__KERNEL_RCSID()
 1.11 06-Apr-2003  rjs branches: 1.11.2;
Add bs_mmap and make hack in bs_mmap conditional on hpcarm.
 1.10 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.9 22-Aug-2002  thorpej * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
where vtopte() is used.
 1.8 03-May-2002  thorpej branches: 1.8.2;
Update for recent changes to the ARM pmap. From Hiroyuki Bessho,
PR 16617.
 1.7 24-Mar-2002  thorpej Use vtopte() instead of pmap_pte().
 1.6 23-Mar-2002  thorpej KERNEL_SPACE_START -> KERNEL_BASE
 1.5 23-Nov-2001  thorpej No need to pull in <machine/pte.h> directly.
 1.4 12-Sep-2001  rjs branches: 1.4.4;
Add bs_notimpl_bs_mmap to bus space struct.
 1.3 10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.2 28-Jul-2001  chris branches: 1.2.2;
A couple of tidy ups to pmap:
pmap_t -> struct pmap * in pmap.c and pmap.h
kernel_pmap -> pmap_kernel() everywhere.

Compiled and booted on riscpc and cats.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.4.4.6 18-Oct-2002  nathanw Catch up to -current.
 1.4.4.5 27-Aug-2002  thorpej Sync with -current.
 1.4.4.4 20-Jun-2002  nathanw Catch up to -current.
 1.4.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.4.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 12-Sep-2001  nathanw file sa11x0_io.c was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.8.2.1 30-Aug-2002  gehenna catch up with -current.
 1.11.2.5 11-Dec-2005  christos Sync with head.
 1.11.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.13.8.1 29-Nov-2005  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.15.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.15.2.2 11-Aug-2006  yamt sync with head
 1.15.2.1 24-May-2006  yamt sync with head.
 1.16.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.64.1 11-Mar-2010  yamt sync with head
 1.19.16.1 18-May-2014  rmind sync with head
 1.19.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4 27-Jun-2006  peter KNF. Correct some spelling errors.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8; 1.3.16;
merge ktrace-lwp.
 1.2 23-Oct-2005  peter Fix some typos.
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.26; 1.1.42; 1.1.44;
Initial copy of SA11x0 support from hpcarm.
 1.1.44.1 26-Oct-2005  yamt sync with head
 1.1.42.2 30-Dec-2006  yamt sync with head.
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.26.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_io_asm.S was added on branch nathanw_sa on 2001-07-08 23:37:54 +0000
 1.3.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.21 08-Nov-2021  rin irq_entry(): Do not clobber fp (= r11), in order not to confuse DDB.

Use r10 instead; no need to preserve saipic_base, previous content of
r10, throughout this function, except for the case of INTR_DEBUG.

For INTR_DEBUG, load saipic_base to scratch register every time it
becomes necessary. This is no performance penalty compared with
subsequent printf() calls.

XXX
Rewrite this function by C. There seems no particular reason to
use assembler, and no major performance regression is expected.
 1.20 21-Nov-2020  skrll Adjust egister usage so that r4 and r5 are preserved as cur{cpu,lwp}
respectively as required by the change to make ASTs operate per-LWP
rather than per-CPU. DO_AST_AND_RESTORE_ALIGNMENT_FAULTS expects this.

Remove the call to dosoftints while I'm here as it's dont in DO_AST...

XXX untested
 1.19 21-Nov-2020  skrll Trailing whitespace
 1.18 02-Dec-2013  joerg branches: 1.18.42;
Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask.
 1.17 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.16 29-Aug-2012  matt branches: 1.16.2; 1.16.4;
Avoid using r7 (which is being reserved for a different purpose).
 1.15 20-Dec-2010  matt branches: 1.15.8;
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.14 13-Jun-2008  rafal branches: 1.14.18;
Let hpcarm kernels boot again after the merge of the armv6 branch. Fixes
PR port-hpcarm/38591

XXX: There is still a hard hang that I've seen on both shark and hpcarm in
the process exit path; I don't know much beyond that yet.
 1.13 27-Apr-2008  matt branches: 1.13.2; 1.13.4;
Merge kernel changes in matt-armv6 to HEAD.
 1.12 08-Jan-2008  matt branches: 1.12.6; 1.12.8; 1.12.10;
As of this commit, all arm32 kernel now build.
 1.11 06-Jan-2008  matt Truly kill current_intr_depth once and for all.
 1.10 09-Mar-2007  thorpej branches: 1.10.8; 1.10.16; 1.10.20; 1.10.22; 1.10.28; 1.10.34;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.9 05-Mar-2006  peter branches: 1.9.2; 1.9.20;
Prefix dbg_str with "L".
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6;
merge ktrace-lwp.
 1.7 23-Oct-2005  peter Fix some typos.
 1.6 05-Nov-2003  scw branches: 1.6.16; 1.6.18;
Enable/Restore alignment fault state on interrupt handler entry/exit.
 1.5 31-Mar-2003  chris branches: 1.5.2;
Fix for PR arm/17971. Used patch as provided

Compiled, but no hardware to test on.
 1.4 14-Oct-2002  bjh21 Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.3 19-Jul-2002  ichiro change include path
 1.2 12-Apr-2002  thorpej branches: 1.2.2;
Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.8.1 08-Jul-2001  nathanw file sa11x0_irq.S was added on branch nathanw_sa on 2002-04-17 00:02:35 +0000
 1.1.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 21-Jul-2002  gehenna catch up with -current.
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.18.1 26-Oct-2005  yamt sync with head
 1.6.16.3 21-Jan-2008  yamt sync with head
 1.6.16.2 03-Sep-2007  yamt sync with head.
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.20.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.2.2 05-Mar-2006  peter Prefix dbg_str with "L".
 1.9.2.1 05-Mar-2006  peter file sa11x0_irq.S was added on branch yamt-pdpolicy on 2006-03-05 11:30:59 +0000
 1.10.34.1 08-Jan-2008  bouyer Sync with HEAD
 1.10.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.22.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.22.2 09-Jan-2008  matt sync with HEAD
 1.10.22.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.10.20.1 20-Jan-2008  chris Sync to HEAD.
 1.10.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.10.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.12.10.2 04-May-2009  yamt sync with head.
 1.12.10.1 16-May-2008  yamt sync with head.
 1.12.8.2 17-Jun-2008  yamt sync with head.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.4.1 18-Jun-2008  simonb Sync with head.
 1.13.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14.18.1 05-Mar-2011  rmind sync with head
 1.15.8.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.8.1 30-Oct-2012  yamt sync with head
 1.16.4.2 18-May-2014  rmind sync with head
 1.16.4.1 28-Aug-2013  rmind sync with head
 1.16.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.20 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.19 10-Nov-2019  chs branches: 1.19.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.18 01-Sep-2012  matt branches: 1.18.40;
Move things around for <arm/arm32/machdep.h>
 1.17 20-Dec-2010  matt branches: 1.17.8;
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.16 13-Jun-2008  rafal branches: 1.16.18;
Let hpcarm kernels boot again after the merge of the armv6 branch. Fixes
PR port-hpcarm/38591

XXX: There is still a hard hang that I've seen on both shark and hpcarm in
the process exit path; I don't know much beyond that yet.
 1.15 28-Apr-2008  martin branches: 1.15.2; 1.15.4;
Remove clause 3 and 4 from TNF licenses
 1.14 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.13 06-Jan-2008  matt branches: 1.13.6; 1.13.8; 1.13.10;
Truly kill current_intr_depth once and for all.
 1.12 17-Oct-2007  garbled branches: 1.12.2; 1.12.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.11 13-Aug-2007  tsutsui branches: 1.11.2;
Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
 1.10 27-Jun-2006  peter branches: 1.10.14; 1.10.22; 1.10.28; 1.10.30; 1.10.32; 1.10.34;
KNF. Correct some spelling errors.
 1.9 11-May-2006  yamt branches: 1.9.4;
remove irqblock[] as no one uses it. reviewed by Ben Harris.
 1.8 05-Mar-2006  peter branches: 1.8.2; 1.8.4; 1.8.6;
Dump IRQ handlers only when INTR_DEBUG is defined, it's to verbose for DEBUG.
 1.7 04-Mar-2006  peter Use ANSI function decls.
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.6;
merge ktrace-lwp.
 1.5 07-Aug-2003  agc branches: 1.5.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 05-Oct-2002  chs branches: 1.3.8;
add missing protos.
 1.2 12-Apr-2002  thorpej Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel. What
you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
on which ARM architecture versions are configured (based on CPU_*
options). Also defines ARM_NARCH to determins how many architecture
versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.8.1 08-Jul-2001  nathanw file sa11x0_irqhandler.c was added on branch nathanw_sa on 2002-04-17 00:02:35 +0000
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.4 21-Jan-2008  yamt sync with head
 1.5.16.3 03-Sep-2007  yamt sync with head.
 1.5.16.2 30-Dec-2006  yamt sync with head.
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.6.6.2 01-Jun-2006  kardel 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.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.4.1 11-May-2006  elad sync with head
 1.8.2.3 11-Aug-2006  yamt sync with head
 1.8.2.2 24-May-2006  yamt sync with head.
 1.8.2.1 05-Mar-2006  yamt file sa11x0_irqhandler.c was added on branch yamt-pdpolicy on 2006-05-24 10:56:35 +0000
 1.9.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.10.34.3 20-Jan-2008  chris Sync to HEAD.
 1.10.34.2 01-Jan-2008  chris Sync with HEAD.
 1.10.34.1 18-Aug-2007  chris Sync with HEAD
 1.10.32.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.10.30.2 28-Feb-2008  rjs Sync with HEAD.
 1.10.30.1 01-Nov-2007  rjs Sync with HEAD.
 1.10.28.1 15-Aug-2007  skrll Sync with HEAD.
 1.10.22.1 03-Oct-2007  garbled Sync with HEAD
 1.10.14.1 20-Aug-2007  ad Sync with HEAD.
 1.11.2.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.2.2 09-Jan-2008  matt sync with HEAD
 1.11.2.1 06-Nov-2007  matt sync with HEAD
 1.12.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.10.2 04-May-2009  yamt sync with head.
 1.13.10.1 16-May-2008  yamt sync with head.
 1.13.8.2 17-Jun-2008  yamt sync with head.
 1.13.8.1 18-May-2008  yamt sync with head.
 1.13.6.2 29-Jun-2008  mjf Sync with HEAD.
 1.13.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.4.1 18-Jun-2008  simonb Sync with head.
 1.15.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.16.18.1 05-Mar-2011  rmind sync with head
 1.17.8.1 30-Oct-2012  yamt sync with head
 1.18.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.3 30-Jul-2001  rjs branches: 1.3.6;
Mirror removal from hpcarm.
 1.2 22-Jul-2001  takemura You must set 'HPCFB_SWAP_*' if bytes are stored in reverse order, i.e.
little endian like order, however, usage of 'HPCFB_SWAP_*' was widely
misunderstood because it reminded you of 'RI_BSWAP' in raster operation.
Please note that 'RI_BSWAP' indicate that frame buffer byte order is different
from natural order of system while 'HPCFB_REVORDER_*' is independent of
system byte order.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.3.6.2 30-Jul-2001  rjs Mirror removal from hpcarm.
 1.3.6.1 30-Jul-2001  rjs file sa11x0_lcd.c was added on branch nathanw_sa on 2001-07-30 10:48:32 +0000
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Mirror removal from hpcarm.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.2 30-Jul-2001  rjs Mirror removal from hpcarm.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_lcdreg.h was added on branch nathanw_sa on 2001-07-30 10:48:32 +0000
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Mirror removal from hpcarm.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.2 30-Jul-2001  rjs Mirror removal from hpcarm.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_lcdvar.h was added on branch nathanw_sa on 2001-07-30 10:48:33 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 30-Jul-2001  rjs branches: 1.1.2; 1.1.8; 1.1.130; 1.1.132; 1.1.134;
Copy from hpcarm.
 1.1.134.1 16-May-2008  yamt sync with head.
 1.1.132.1 18-May-2008  yamt sync with head.
 1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 30-Jul-2001  rjs Copy from hpcarm.
 1.1.8.1 30-Jul-2001  rjs file sa11x0_mcpreg.h was added on branch nathanw_sa on 2001-07-30 10:17:22 +0000
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 30-Jul-2001  lukem file sa11x0_mcpreg.h was added on branch kqueue on 2001-08-03 04:11:03 +0000
 1.33 13-Nov-2019  tsutsui Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

When kernels were configured for both CPU_XSCALE_PXA270 and
CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
then all delay(9) during configure(9) returned immediately.
While here, use proper macro with description for readability.

Should be pulled up to netbsd-8 and netbsd-9.
(though zaudio(4) won't work on netbsd-8)
 1.32 09-Oct-2016  christos branches: 1.32.8; 1.32.16; 1.32.20;
PR/51540: Henning Petersen: replace , with ;
 1.31 17-Dec-2013  joerg branches: 1.31.6; 1.31.10;
Initialiase nop count to avoid uninitalised use warnings from Clang.
XXX Nop should be spelled in a better way
 1.30 12-Aug-2012  nonaka branches: 1.30.2; 1.30.4;
Added watchdog timer reset function.
 1.29 01-Jul-2011  dyoung branches: 1.29.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.28 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.27 01-Aug-2009  kiyohara Support run-time configuration for PXA25x and PXA27x.
 1.26 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.25 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.24 28-Apr-2008  martin branches: 1.24.2;
Remove clause 3 and 4 from TNF licenses
 1.23 20-Apr-2008  chris branches: 1.23.2;
PXA270 uses a 3.25Mhz clock for OS timers, not 3.6864Mhz.

Also while here fix the delay loop used before timers are enabled to
cause a delay, by using a volatile int to do a countdown. gcc has become
intelligent enough to optimize an empty loop away.

For delay on PXA270 we should use one of the other counters, and a 1Mhz
clock, so that we don't have to computer the counter increment.

XXX: also looks like there's a bug if the counter wraps, as delay doesn't
look like it allows for that.
 1.22 20-Jan-2008  joerg branches: 1.22.6; 1.22.8;
Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.21 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.20 24-Sep-2006  peter branches: 1.20.24; 1.20.28; 1.20.30; 1.20.36; 1.20.44;
Various cleanup & KNF.
 1.19 24-Sep-2006  peter Add support for timecounter and generic todr.
#ifdef'ed for now until all consumers are using it.
 1.18 27-Jun-2006  peter branches: 1.18.4; 1.18.6;
KNF. Correct some spelling errors.
 1.17 18-Apr-2006  peter branches: 1.17.4;
Back out my rev 1.14, the printf is actually quite useful and
all other arm code show this information too.
And while here, prettify the output a bit.
 1.16 04-Mar-2006  peter branches: 1.16.2; 1.16.4; 1.16.6;
s/u_intN_t/uintN_t/
 1.15 04-Mar-2006  peter Use ANSI function decls.
 1.14 04-Mar-2006  peter Put a printf into OST_DEBUG.
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6;
merge ktrace-lwp.
 1.12 02-Jun-2005  uwe branches: 1.12.2;
Rename local vars to avoid shadowing.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 23-Mar-2003  bsh branches: 1.10.2;
don't make kernels with options DEBUG print too much debug messages.
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.6 08-Jan-2002  rjs Establish interrupt handlers before enabling the clocks.
 1.5 08-Jan-2002  rjs Add check for microtime() being called before clock is initialized.
 1.4 23-Nov-2001  thorpej Use <arm/cpufunc.h>, not <machine/cpufunc.h>.
 1.3 22-Nov-2001  thorpej Kill <machine/katelib.h>. Any place that still uses it should just
reference <arm/arm32/katelib.h> until such time as all use of this
file has been purged from the face of the earth.
 1.2 05-Sep-2001  matt branches: 1.2.6;
Change <machine/irqhandler.h> to <machine/intr.h> since the latter always
includes the former and is a standard include file.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.2.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.6.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.3 11-Jan-2002  nathanw More catchup.
 1.2.6.2 08-Jan-2002  nathanw Catch up to -current.
 1.2.6.1 05-Sep-2001  nathanw file sa11x0_ost.c was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.10.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.3 21-Jan-2008  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.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.16.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.16.4.1 11-May-2006  elad sync with head
 1.16.2.2 11-Aug-2006  yamt sync with head
 1.16.2.1 24-May-2006  yamt sync with head.
 1.17.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.18.6.1 22-Oct-2006  yamt sync with head
 1.18.4.1 18-Nov-2006  ad Sync with head.
 1.20.44.2 23-Jan-2008  bouyer Sync with HEAD.
 1.20.44.1 20-Jan-2008  bouyer Sync with HEAD
 1.20.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.30.1 23-Mar-2008  matt sync with HEAD
 1.20.28.1 27-Jan-2008  chris Sync to HEAD.
 1.20.24.2 28-Feb-2008  rjs Sync with HEAD.
 1.20.24.1 06-Oct-2007  rjs Switch to new interrupt code.
 1.22.8.1 18-May-2008  yamt sync with head.
 1.22.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.2.2 19-Aug-2009  yamt sync with head.
 1.23.2.1 20-Jun-2009  yamt sync with head
 1.24.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.29.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.29.2.1 30-Oct-2012  yamt sync with head
 1.30.4.1 18-May-2014  rmind sync with head
 1.30.2.2 03-Dec-2017  jdolecek update from HEAD
 1.30.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.10.1 04-Nov-2016  pgoyette Sync with HEAD
 1.31.6.1 05-Dec-2016  skrll Sync with HEAD
 1.32.20.1 16-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #430):

sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33
sys/arch/zaurus/zaurus/autoconf.c: revision 1.13

Fix attach failure of zaudio(4) WM8731 (C7x0/860) and WM8750 (C1000/3x00).

The new MI iic(4) layer requires an explicit quirk info of PROBE_STRATEGY
via device properties. Fixes PR kern/54658.

Should be pulled up to netbsd-9.

-

Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

When kernels were configured for both CPU_XSCALE_PXA270 and
CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
then all delay(9) during configure(9) returned immediately.

While here, use proper macro with description for readability.

Should be pulled up to netbsd-8 and netbsd-9.
(though zaudio(4) won't work on netbsd-8)
 1.32.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.32.8.1 16-Nov-2019  martin Pull up following revision(s) (requested by tsutsui in ticket #1445):

sys/arch/arm/sa11x0/sa11x0_ost.c: revision 1.33

Fix another attach failure of zaudio(4) WM8731 on Zaurus SL-C7x0/860.

When kernels were configured for both CPU_XSCALE_PXA270 and
CPU_XSCALE_PXA250, the OST freq value was not set until tc_init(9)
then all delay(9) during configure(9) returned immediately.

While here, use proper macro with description for readability.

Should be pulled up to netbsd-8 and netbsd-9.
(though zaudio(4) won't work on netbsd-8)
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 27-Jun-2006  peter branches: 1.2.60; 1.2.62; 1.2.64;
KNF. Correct some spelling errors.
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.42; 1.1.56; 1.1.60; 1.1.68;
Initial copy of SA11x0 support from hpcarm.
 1.1.68.1 13-Jul-2006  gdamore Merge from HEAD.
 1.1.60.1 11-Aug-2006  yamt sync with head
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.1 30-Dec-2006  yamt sync with head.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_ostreg.h was added on branch nathanw_sa on 2001-07-08 23:37:54 +0000
 1.2.64.1 16-May-2008  yamt sync with head.
 1.2.62.1 18-May-2008  yamt sync with head.
 1.2.60.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 12-Aug-2012  nonaka branches: 1.1.4;
Added watchdog timer reset function.
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 12-Aug-2012  yamt file sa11x0_ostvar.h was added on branch yamt-pagecache on 2012-10-30 17:19:10 +0000
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Mirror removal from hpcarm.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.2 30-Jul-2001  rjs Mirror removal from hpcarm.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_pcic.c was added on branch nathanw_sa on 2001-07-30 10:34:00 +0000
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Mirror removal from hpcarm.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.2 30-Jul-2001  rjs Mirror removal from hpcarm.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_pcicreg.h was added on branch nathanw_sa on 2001-07-30 10:34:01 +0000
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 14-May-2006  elad branches: 1.4.64; 1.4.66; 1.4.68;
integrate kauth.
 1.3 11-Apr-2006  peter Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.2 30-Jul-2001  rjs branches: 1.2.6; 1.2.40; 1.2.54; 1.2.56; 1.2.58; 1.2.60; 1.2.62;
Update from hpcarm with MCP register definition.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.62.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.60.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.58.1 24-May-2006  yamt sync with head.
 1.2.56.1 22-Apr-2006  simonb Sync with head.
 1.2.54.1 09-Sep-2006  rpaulo sync with head
 1.2.40.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 30-Jul-2001  rjs Update from hpcarm with MCP register definition.
 1.2.6.1 30-Jul-2001  rjs file sa11x0_ppcreg.h was added on branch nathanw_sa on 2001-07-30 12:19:05 +0000
 1.4.68.1 16-May-2008  yamt sync with head.
 1.4.66.1 18-May-2008  yamt sync with head.
 1.4.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 27-Jun-2006  peter branches: 1.6.60; 1.6.62; 1.6.64;
Add a symbolic constant for the Infrared Communications Port.
 1.5 11-Apr-2006  peter branches: 1.5.4;
Implement pmap_devmap on hpcarm to map I/O registers that are used
in early start-up stage. Change the virtual address for UART #3 to
the physical address in the configuration files.
While here, implement the sa11x0_bs_unmap function.

Reviewed by Toru Nishimura (on port-arm).
 1.4 19-Jul-2002  ichiro branches: 1.4.24; 1.4.38; 1.4.40; 1.4.42; 1.4.44; 1.4.46;
sync to hpcarm/sa11x0

later, remove hpcarm/sa11x0
 1.3 08-Jan-2002  rjs branches: 1.3.8;
Add reset controller register definitions.
 1.2 30-Jul-2001  rjs branches: 1.2.6;
Update from hpcarm with MCP base definition.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.6.4 01-Aug-2002  nathanw Catch up to -current.
 1.2.6.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.2 11-Jan-2002  nathanw More catchup.
 1.2.6.1 30-Jul-2001  nathanw file sa11x0_reg.h was added on branch nathanw_sa on 2002-01-11 23:38:06 +0000
 1.3.8.1 21-Jul-2002  gehenna catch up with -current.
 1.4.46.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.44.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.42.2 11-Aug-2006  yamt sync with head
 1.4.42.1 24-May-2006  yamt sync with head.
 1.4.40.1 22-Apr-2006  simonb Sync with head.
 1.4.38.1 09-Sep-2006  rpaulo sync with head
 1.4.24.2 30-Dec-2006  yamt sync with head.
 1.4.24.1 21-Jun-2006  yamt sync with head.
 1.5.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.6.64.1 16-May-2008  yamt sync with head.
 1.6.62.1 18-May-2008  yamt sync with head.
 1.6.60.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 04-Feb-2024  andvar fix tripple/quadruple "r" letter typos in comments and log messages.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 11-Apr-2006  peter branches: 1.2.64; 1.2.66; 1.2.68;
Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.42; 1.1.56; 1.1.58; 1.1.60; 1.1.62; 1.1.64;
Initial copy of SA11x0 support from hpcarm.
 1.1.64.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.62.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.1.60.1 24-May-2006  yamt sync with head.
 1.1.58.1 22-Apr-2006  simonb Sync with head.
 1.1.56.1 09-Sep-2006  rpaulo sync with head
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x0_sspreg.h was added on branch nathanw_sa on 2001-07-08 23:37:55 +0000
 1.2.68.1 16-May-2008  yamt sync with head.
 1.2.66.1 18-May-2008  yamt sync with head.
 1.2.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.11 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.10 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.9 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 12-Apr-2006  simonb branches: 1.7.34; 1.7.64; 1.7.66; 1.7.68;
Whitespace nit.
 1.6 11-Apr-2006  peter Change disclaimer: "THE NETBSD FOUNDATION", not "REGENTS".
 1.5 04-Mar-2006  peter branches: 1.5.2; 1.5.4; 1.5.6;
s/u_intN_t/uintN_t/
 1.4 14-Apr-2003  rjs branches: 1.4.18; 1.4.32; 1.4.34;
Remove unused structure member variables.
 1.3 18-Dec-2002  bsh guard against being included twice
 1.2 12-Mar-2002  rjs Add bus space handle for SA11x0 reset controller.
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.3 19-Dec-2002  thorpej Sync with HEAD.
 1.1.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.1 08-Jul-2001  nathanw file sa11x0_var.h was added on branch nathanw_sa on 2002-04-01 07:39:15 +0000
 1.1.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.34.1 22-Apr-2006  simonb Sync with head.
 1.4.32.1 09-Sep-2006  rpaulo sync with head
 1.4.18.1 21-Jun-2006  yamt sync with head.
 1.5.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.5.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.2.1 24-May-2006  yamt sync with head.
 1.7.68.3 19-Aug-2009  yamt sync with head.
 1.7.68.2 20-Jun-2009  yamt sync with head
 1.7.68.1 16-May-2008  yamt sync with head.
 1.7.66.1 18-May-2008  yamt sync with head.
 1.7.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.34.1 06-Oct-2007  rjs Switch to new interrupt code.
 1.25 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 26-Jul-2011  dyoung branches: 1.22.68;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.21 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.20 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.19 03-Jun-2008  rafal Don't init sc_lock for each socket, since it's shared; caught by LOCKDEBUG.
 1.18 28-Apr-2008  martin branches: 1.18.2;
Remove clause 3 and 4 from TNF licenses
 1.17 20-Apr-2008  rafal branches: 1.17.2;
Fix detection / attachment of CF / PCMCIA cards present at boot-time. This
was broken by one of the early vmlocking merges, which removed the kthread
that did the initial detection / attachment and instead called the code
directly from the PCMCIA controller attach method.

Submitted in PR port-hpcarm/37227 by Peter Postma; I've tweaked it ever-so-
slightly.
 1.16 17-Oct-2007  garbled branches: 1.16.16; 1.16.18;
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.15 14-Jul-2007  ad branches: 1.15.10; 1.15.12;
Revert accidentally commited change.
 1.14 09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.13 27-Jun-2006  peter branches: 1.13.14; 1.13.16; 1.13.22;
KNF. Correct some spelling errors.
 1.12 04-Mar-2006  peter branches: 1.12.2; 1.12.10;
Use ANSI function decls.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6;
merge ktrace-lwp.
 1.10 28-Jun-2005  drochner branches: 1.10.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.9 08-Aug-2003  bsh split StrongArm companion chip (sacc) driver so that we can support
sacc on other platforms than hpcarm (evbarm for example).

codes specific to hpcarm are extracted and moved to hpcarm/dev/.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 02-Oct-2002  thorpej branches: 1.7.8;
Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.4 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.3 24-Sep-2001  takemura branches: 1.3.4;
Renamed platid_search() to platid_search_data() and added new platid_search().
Platid_name() was re-implemented using platid_search().
 1.2 30-Jul-2001  rjs branches: 1.2.2;
Update from hpcarm.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.3.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.1 24-Sep-2001  nathanw file sa11x1_pcic.c was added on branch nathanw_sa on 2002-10-18 02:35:41 +0000
 1.7.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.10.2.3 03-Sep-2007  yamt sync with head.
 1.10.2.2 30-Dec-2006  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.12.2.1 11-Aug-2006  yamt sync with head
 1.13.22.1 03-Oct-2007  garbled Sync with HEAD
 1.13.16.1 11-Jul-2007  mjf Sync with head.
 1.13.14.1 15-Jul-2007  ad Sync with head.
 1.15.12.1 06-Nov-2007  matt sync with HEAD
 1.15.10.1 01-Jan-2008  chris Sync with HEAD.
 1.16.18.2 04-Jun-2008  yamt sync with head
 1.16.18.1 18-May-2008  yamt sync with head.
 1.16.16.2 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.16.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.2.3 20-Jun-2009  yamt sync with head
 1.17.2.2 04-May-2009  yamt sync with head.
 1.17.2.1 16-May-2008  yamt sync with head.
 1.18.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.22.68.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.130; 1.1.132; 1.1.134;
Initial copy of SA11x0 support from hpcarm.
 1.1.134.1 16-May-2008  yamt sync with head.
 1.1.132.1 18-May-2008  yamt sync with head.
 1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11x1_pcicreg.h was added on branch nathanw_sa on 2001-07-08 23:37:55 +0000
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 11-Dec-2005  christos branches: 1.2.76; 1.2.78; 1.2.80;
merge ktrace-lwp.
 1.1 08-Aug-2003  bsh branches: 1.1.4;
split StrongArm companion chip (sacc) driver so that we can support
sacc on other platforms than hpcarm (evbarm for example).

codes specific to hpcarm are extracted and moved to hpcarm/dev/.
 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 08-Aug-2003  skrll file sa11x1_pcicvar.h was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.2.80.1 16-May-2008  yamt sync with head.
 1.2.78.1 18-May-2008  yamt sync with head.
 1.2.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.14 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.13 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.12 03-Jun-2008  rafal Don't init sc_lock for each socket, since it's shared; caught by LOCKDEBUG.
 1.11 06-Dec-2007  ad branches: 1.11.12; 1.11.14; 1.11.16; 1.11.18;
lockmgr -> mutex
 1.10 17-Oct-2007  garbled branches: 1.10.2; 1.10.4;
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.9 09-Jul-2007  ad branches: 1.9.6; 1.9.8; 1.9.10; 1.9.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.8 27-Jun-2006  peter branches: 1.8.14; 1.8.16; 1.8.18; 1.8.22;
KNF. Correct some spelling errors.
 1.7 04-Mar-2006  peter branches: 1.7.2; 1.7.10;
Use ANSI function decls.
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.6;
merge ktrace-lwp.
 1.5 02-Oct-2004  toshii branches: 1.5.12;
Add a socket_settype function to match with recent pcmcia code change.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 19-Jan-2003  thorpej branches: 1.3.2;
Merge the nathanw_sa branch.
 1.2 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.1 08-Jul-2001  rjs branches: 1.1.2; 1.1.8;
Initial copy of SA11x0 support from hpcarm.
 1.1.8.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.2 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.1.8.1 08-Jul-2001  nathanw file sa11xx_pcic.c was added on branch nathanw_sa on 2002-06-24 22:04:00 +0000
 1.1.2.1 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.2.4 19-Oct-2004  skrll Sync with HEAD
 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.12.4 07-Dec-2007  yamt sync with head
 1.5.12.3 03-Sep-2007  yamt sync with head.
 1.5.12.2 30-Dec-2006  yamt sync with head.
 1.5.12.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.7.10.1 13-Jul-2006  gdamore Merge from HEAD.
 1.7.2.1 11-Aug-2006  yamt sync with head
 1.8.22.1 03-Oct-2007  garbled Sync with HEAD
 1.8.18.1 09-Dec-2007  reinoud Pullup to HEAD
 1.8.16.1 11-Jul-2007  mjf Sync with head.
 1.8.14.1 15-Jul-2007  ad Sync with head.
 1.9.12.2 09-Jan-2008  matt sync with HEAD
 1.9.12.1 06-Nov-2007  matt sync with HEAD
 1.9.10.1 01-Jan-2008  chris Sync with HEAD.
 1.9.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.9.6.1 26-Dec-2007  rjs Sync with HEAD.
 1.10.4.1 08-Dec-2007  ad Sync with head.
 1.10.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.11.18.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.11.16.2 20-Jun-2009  yamt sync with head
 1.11.16.1 04-May-2009  yamt sync with head.
 1.11.14.1 04-Jun-2008  yamt sync with head
 1.11.12.1 05-Jun-2008  mjf Sync with HEAD.

Also fix build.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 08-Jul-2001  rjs branches: 1.1.8; 1.1.130; 1.1.132; 1.1.134;
Initial copy of SA11x0 support from hpcarm.
 1.1.134.1 16-May-2008  yamt sync with head.
 1.1.132.1 18-May-2008  yamt sync with head.
 1.1.130.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.2 08-Jul-2001  rjs Initial copy of SA11x0 support from hpcarm.
 1.1.8.1 08-Jul-2001  rjs file sa11xx_pcicreg.h was added on branch nathanw_sa on 2001-07-08 23:37:55 +0000
 1.7 29-May-2009  rjs Make the following changes:

struct device * -> device_t
struct cfdata * -> cfdata_t
printf -> aprint_
device_t/softc split
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 06-Dec-2007  ad branches: 1.5.12; 1.5.14; 1.5.16;
lockmgr -> mutex
 1.4 17-Oct-2007  garbled branches: 1.4.2; 1.4.4;
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.3 12-Jul-2007  he branches: 1.3.6; 1.3.8; 1.3.10; 1.3.12;
Convert event_thread from a proc to an lwp, so that the use of
kthread_create() in sa11xx_pcic.c again matches with the prototype.
 1.2 30-Jul-2001  rjs branches: 1.2.6; 1.2.40; 1.2.82; 1.2.86; 1.2.90;
Update from hpcarm with cookie change.
 1.1 08-Jul-2001  rjs branches: 1.1.2;
Initial copy of SA11x0 support from hpcarm.
 1.1.2.1 03-Aug-2001  lukem update to -current
 1.2.90.1 03-Oct-2007  garbled Sync with HEAD
 1.2.86.1 09-Dec-2007  reinoud Pullup to HEAD
 1.2.82.1 15-Jul-2007  ad Sync with head.
 1.2.40.2 07-Dec-2007  yamt sync with head
 1.2.40.1 03-Sep-2007  yamt sync with head.
 1.2.6.2 30-Jul-2001  rjs Update from hpcarm with cookie change.
 1.2.6.1 30-Jul-2001  rjs file sa11xx_pcicvar.h was added on branch nathanw_sa on 2001-07-30 10:55:50 +0000
 1.3.12.2 09-Jan-2008  matt sync with HEAD
 1.3.12.1 06-Nov-2007  matt sync with HEAD
 1.3.10.1 01-Jan-2008  chris Sync with HEAD.
 1.3.8.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.3.6.1 26-Dec-2007  rjs Sync with HEAD.
 1.4.4.1 08-Dec-2007  ad Sync with head.
 1.4.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.5.16.2 20-Jun-2009  yamt sync with head
 1.5.16.1 16-May-2008  yamt sync with head.
 1.5.14.1 18-May-2008  yamt sync with head.
 1.5.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.11 05-Sep-2014  skrll branches: 1.11.2;
RCSId police
 1.10 28-Aug-2014  reinoud Move the mct's interrupt from a shared SPI interrupt to a private PPI
interrupt so all possible cpus get them.
 1.9 11-Jun-2014  reinoud branches: 1.9.2; 1.9.4; 1.9.6;
Remove the exyo_usb_locinfo structure as exyousb becomes usb2 only
 1.8 06-Jun-2014  reinoud Revisit Exynos USB system implementing usb2phy support for Exynos4.
 1.7 21-May-2014  reinoud branches: 1.7.2;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.6 16-May-2014  reinoud branches: 1.6.2;
Add i2c locators, add a i2c bus indexer and provide function prototype for the
pinset to pindata function.
 1.5 09-May-2014  reinoud Implement gpio framework for the Samsung Exynos series.

Note that only the Exynos4 gpio registers are defined now and provision is
taken to allow for seamlessness adding of Exynos5 values.
 1.4 05-May-2014  reinoud exywdt -> exyowdt
 1.3 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.2 27-Apr-2014  reinoud Exynos4's MCT doesn't interrupt on the MCT_LTIMER interrupt but on the
IRQ_G0_IRQ and/or the IRQ_MCT_G{0,1,2,3}. The later are not chosen yet since
they are behind the interrupt combiner.

Confirmed that it indeed calls hardclock() at the specified intervals.
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.6.2.2 18-May-2014  rmind sync with head
 1.6.2.1 16-May-2014  rmind file exynos4_loc.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.7.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.7.2.1 21-May-2014  yamt file exynos4_loc.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 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 11-Jun-2014  tls file exynos4_loc.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.9.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.9.2.2 10-Aug-2014  tls Rebase.
 1.9.2.1 11-Jun-2014  tls file exynos4_loc.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.11.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.16 16-Feb-2022  andvar fix various typos, mainly in comments.
 1.15 19-Aug-2018  skrll branches: 1.15.4;
Some changes to bring back exynos4 support and make exynos5 support more
modern/generic

- Provide a exynos_platform_early_putchar based on CONSADDR and remove
EXYNOS_CONSOLE_EARLY
- Provide devmaps for exynos4 and exynos5
- Simplify exynos_bootstrap
- Update exynos_start.S to use exynos_platform_early_putchar - this
needs a fix in a9_subr.S for arm_cpuinit to save lr in a callee save
register and not use ip. Maybe this change is safe now, but too much
testing required to commit it now.
 1.14 21-Dec-2015  marty branches: 1.14.10;
XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.13 05-Sep-2014  skrll branches: 1.13.2;
RCSId police
 1.12 04-Sep-2014  reinoud 1st stage of USB support for Exynos5 chips: the register definitions
 1.11 02-Sep-2014  reinoud Fix typos
 1.10 28-Aug-2014  reinoud Add comments to Exynos4 PLL registers and add Exynos5 PLL registers
 1.9 28-Aug-2014  reinoud Add CMU PLL offsets
 1.8 14-Aug-2014  reinoud branches: 1.8.2;
Adjust AUDIOCORE mapping for exynos4 to map in entire piece.
 1.7 11-Jun-2014  reinoud branches: 1.7.2; 1.7.4;
Add USB2HOST aliases for exynos4 and exynos5 from where the ehci/ohci/phy are
referenced from
 1.6 04-Jun-2014  reinoud Remove comment about possible identification of the MCUCTL
 1.5 03-Jun-2014  reinoud Explicitly mark MCUCTL_ISP_OFFSET as an unknown module to prevent confusion
 1.4 14-May-2014  reinoud branches: 1.4.2; 1.4.4;
Revisit gpio and revisit register file mapping. The additional register files
are now mapped behind the origional register file.

The gpio channel GPZ is mapped over I2S0 in the separate audio register file
and were both abusively mapped over I2C0 in the main register file!

While here, delay the gpio bootstrap till on attachment. We could hasten it in
the odroid_machdep.c if needed. Also make the gpio code more resilliant and
allow booting correctly without any GPIO bits defined/available.
 1.3 09-May-2014  reinoud The EXYNOS4_I2C0_OFFSET is actually reffered to as additional GPIO space.
 1.2 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.4.4.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.4.4.1 14-May-2014  yamt file exynos4_reg.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 14-May-2014  rmind file exynos4_reg.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.7.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.7.2.2 10-Aug-2014  tls Rebase.
 1.7.2.1 11-Jun-2014  tls file exynos4_reg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.8.2.3 03-Dec-2017  jdolecek update from HEAD
 1.8.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 14-Aug-2014  tls file exynos4_reg.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.13.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.14.10.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.15.4.2 10-Jun-2019  christos Sync with HEAD
 1.15.4.1 19-Aug-2018  christos file exynos4_reg.h was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 17-Mar-2020  skrll branches: 1.6.4;
Traiing whitespace
 1.5 18-Oct-2019  skrll Use PRIxBUSADDR
 1.4 09-Sep-2018  aymeric branches: 1.4.4;
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.3 02-Jul-2018  jmcneill Fix a stupid bug in exynos*_clock_set_rate_div
 1.2 20-Jun-2017  skrll branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.12;
Fix a few typos in clock parent names for mmc clocks.

From jmcneill@
 1.1 20-Jun-2017  jmcneill Add Exynos 5410 clock controller driver.
 1.2.12.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.12.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.12.1 10-Jun-2019  christos Sync with HEAD
 1.2.10.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.10.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.8.2 03-Dec-2017  jdolecek update from HEAD
 1.2.8.1 20-Jun-2017  jdolecek file exynos5410_clock.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 20-Jun-2017  skrll file exynos5410_clock.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 20-Jun-2017  snj file exynos5410_clock.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #796):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.16
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_gpio.c: revision 1.26
sys/arch/arm/samsung/exynos_uart.c: revision 1.3
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.15

Trailing whitespace
 1.6.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 17-Mar-2020  skrll branches: 1.15.4;
Traiing whitespace
 1.14 18-Oct-2019  skrll Use PRIxBUSADDR
 1.13 09-Sep-2018  aymeric branches: 1.13.4;
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.12 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.11 04-Jul-2018  jmcneill Add pwm clocks
 1.10 03-Jul-2018  jmcneill Dump clock tree with aprint_debug instead of printf
 1.9 03-Jul-2018  jmcneill Add more USB3 clocks
 1.8 03-Jul-2018  jmcneill Add USB clocks and missing MMC biu clocks
 1.7 02-Jul-2018  jmcneill Fix a stupid bug in exynos*_clock_set_rate_div
 1.6 19-Jun-2017  jmcneill branches: 1.6.4; 1.6.6; 1.6.8;
Fix PLL con0 register locations and add uart clocks
 1.5 16-Apr-2017  jmcneill branches: 1.5.4;
Adapt for clock domain support
 1.4 26-Dec-2015  jmcneill branches: 1.4.2; 1.4.4; 1.4.6;
hook exynos5422 clock support into fdtbus
 1.3 21-Dec-2015  marty XU4 FDT Last drivers converted

There is a minimum conversion on the clock driver.

The USB driver needs reordering and is broken, but it was broken before.

Next up: tactical nuclear weapons
 1.2 05-Dec-2015  jmcneill fix div clk set/get
 1.1 05-Dec-2015  jmcneill Add clock controller backend for Exynos5422. Work in progress.
 1.4.6.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.4.1 26-Apr-2017  pgoyette Sync with HEAD
 1.4.2.4 28-Aug-2017  skrll Sync with HEAD
 1.4.2.3 19-Mar-2016  skrll Sync with HEAD
 1.4.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4.2.1 26-Dec-2015  skrll file exynos5422_clock.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.5.4.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.6.8.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.8.1 10-Jun-2019  christos Sync with HEAD
 1.6.6.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.6.6.1 28-Jul-2018  pgoyette Sync with HEAD
 1.6.4.2 03-Dec-2017  jdolecek update from HEAD
 1.6.4.1 19-Jun-2017  jdolecek file exynos5422_clock.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.13.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #796):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.16
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_gpio.c: revision 1.26
sys/arch/arm/samsung/exynos_uart.c: revision 1.3
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.15

Trailing whitespace
 1.15.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.1 11-Dec-2015  marty branches: 1.1.2; 1.1.12;
add a dma file to the EXYNOS rewrite
 1.1.12.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 11-Dec-2015  skrll file exynos5422_dma.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.14 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.13 05-Dec-2015  jmcneill Add clock controller backend for Exynos5422. Work in progress.
 1.12 05-Sep-2014  skrll branches: 1.12.2;
RCSId police
 1.11 04-Sep-2014  reinoud 1st stage of USB support for Exynos5 chips: the register definitions
 1.10 02-Sep-2014  reinoud Add i2c to the exynos5 locators
 1.9 19-Aug-2014  reinoud branches: 1.9.2;
Implement i2c using gpio for Exynos5 and Odroid-XU
 1.8 14-Aug-2014  reinoud Add exyogpio device attachment for exynos5
 1.7 11-Jun-2014  reinoud branches: 1.7.2; 1.7.4;
Remove the exyo_usb_locinfo structure as exyousb becomes usb2 only
 1.6 06-Jun-2014  reinoud Revisit Exynos USB system implementing usb2phy support for Exynos4.
 1.5 21-May-2014  reinoud branches: 1.5.2;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.4 16-May-2014  reinoud branches: 1.4.2;
Add i2c locators, add a i2c bus indexer and provide function prototype for the
pinset to pindata function.
 1.3 05-May-2014  reinoud exywdt -> exyowdt
 1.2 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 16-May-2014  rmind file exynos5_loc.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.5.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.5.2.1 21-May-2014  yamt file exynos5_loc.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.7.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.7.2.2 10-Aug-2014  tls Rebase.
 1.7.2.1 11-Jun-2014  tls file exynos5_loc.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.9.2.3 03-Dec-2017  jdolecek update from HEAD
 1.9.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1 19-Aug-2014  tls file exynos5_loc.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.12.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.22 04-Jul-2018  jmcneill Align AUDIOCORE size to 1M, and add definition for SYSRAM
 1.21 11-Dec-2015  marty branches: 1.21.16; 1.21.18;
EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.20 29-Dec-2014  skrll Fixup USB Phy initialisation for Exynos5410.

odroid-xu now detects USB devices.
 1.19 02-Oct-2014  skrll branches: 1.19.2;
Fix reinoud-ification of KPLL offset.
 1.18 02-Oct-2014  reinoud Add KPLL
 1.17 24-Sep-2014  reinoud Add extra GPIO chunk for 5410
 1.16 19-Sep-2014  reinoud Naming convention
 1.15 09-Sep-2014  reinoud Remove extra line
 1.14 04-Sep-2014  reinoud 1st stage of USB support for Exynos5 chips: the register definitions
 1.13 28-Aug-2014  reinoud Add comments to Exynos4 PLL registers and add Exynos5 PLL registers
 1.12 21-Aug-2014  reinoud Fix I2C naming for HDMI
 1.11 14-Aug-2014  reinoud branches: 1.11.2;
Rename C2C gpio to match the naming scheme
Add I2S gpio offset
 1.10 11-Jun-2014  reinoud branches: 1.10.2; 1.10.4;
Add USB2HOST aliases for exynos4 and exynos5 from where the ehci/ohci/phy are
referenced from
 1.9 10-Jun-2014  matt Fix SDRAM base
 1.8 10-Jun-2014  matt Shrink core size so we can fit audio in.
 1.7 06-Jun-2014  reinoud Correct c&p error on XHCI* registers and remove old cruft copied from the
datasheet that apparently is not used.
 1.6 06-Jun-2014  reinoud Add constants for USB3 XHCI{0,1} and their PHYs. Taken from the relevant
Exynos5 dti from linux
 1.5 03-Jun-2014  reinoud Explicitly mark MCUCTL_ISP_OFFSET as an unknown module to prevent confusion
 1.4 21-May-2014  reinoud branches: 1.4.2;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.3 14-May-2014  reinoud branches: 1.3.2;
Revisit gpio and revisit register file mapping. The additional register files
are now mapped behind the origional register file.

The gpio channel GPZ is mapped over I2S0 in the separate audio register file
and were both abusively mapped over I2C0 in the main register file!

While here, delay the gpio bootstrap till on attachment. We could hasten it in
the odroid_machdep.c if needed. Also make the gpio code more resilliant and
allow booting correctly without any GPIO bits defined/available.
 1.2 22-Apr-2014  reinoud Adjust the GIC offset to match the linux dts
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.3.2.2 18-May-2014  rmind sync with head
 1.3.2.1 14-May-2014  rmind file exynos5_reg.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.4.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.4.2.1 21-May-2014  yamt file exynos5_reg.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.10.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.10.2.2 10-Aug-2014  tls Rebase.
 1.10.2.1 11-Jun-2014  tls file exynos5_reg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.11.2.3 03-Dec-2017  jdolecek update from HEAD
 1.11.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 14-Aug-2014  tls file exynos5_reg.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.19.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.19.2.1 06-Apr-2015  skrll Sync with HEAD
 1.21.18.1 10-Jun-2019  christos Sync with HEAD
 1.21.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3 01-Jul-2018  jmcneill Delete chipid and sysmmu drivers, they don't do anything but print that
they are not implemented at attach time.
 1.2 21-Dec-2015  marty branches: 1.2.2; 1.2.18; 1.2.20; 1.2.22;
XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.1 21-Dec-2015  marty XU4 FDT checkpoint

It is rather amazing that XU4 gets as far as it does, given how much of this
code simply doesn't work. Focusing now on getting everything converted to
FDT. Next up USB and clocks. After that nuke everything that's not needed
and start the port in earnest.
 1.2.22.1 10-Jun-2019  christos Sync with HEAD
 1.2.20.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 21-Dec-2015  jdolecek file exynos_chipid.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 21-Dec-2015  skrll file exynos_chipid.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.1 05-Dec-2015  jmcneill branches: 1.1.2; 1.1.18;
Add clock controller backend for Exynos5422. Work in progress.
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 05-Dec-2015  jdolecek file exynos_clock.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 05-Dec-2015  skrll file exynos_clock.h was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.14 14-Mar-2021  skrll Use fdtbus_intr_establish_xname
 1.13 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.12 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.11 18-Oct-2019  skrll branches: 1.11.8;
Use PRIxBUSADDR
 1.10 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.9 18-Oct-2018  skrll Trailing whitespace
 1.8 02-Jul-2018  jmcneill Cleanup of combiner driver and make it work (at least for MCT).
 1.7 11-Jun-2017  jmcneill branches: 1.7.4; 1.7.6; 1.7.8;
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
 1.6 05-Jan-2016  marty branches: 1.6.10;
FDT: Interrupts -- add support for interrupt maps

The mct on exynos uses an interrupt map so we add support now. Devices
represent their interrupts either through a combination of interrupt-parent
and interrupts properties, where the 'interrupts' property is an array of
one or more interrupt specifiers; or through a combination of an
interrupt-parent that points to an interrupt-map, where the interrupt-map
contains 2 or more entries consisting of an index, a pointer to an
interrupt-controller, and a specifier for that controller.

This code adds the ability to walk the interrupt-map and return a specifier.
Unfortunately, the addition requires changing the interface to the
interrupt-controllers' _establish and _intstr functions, so this check in
contains a rototill of the three existing fdt interrupt controllers to use
the new interface.
 1.5 03-Jan-2016  marty XU4 interrupt combiner / fake sysmmu

Add sysmmu to have something that calls through to the combiner's establish
routine. Debug the combiner with it.

At this point the combiner is mostly done, but the interrupt handler has not
been tested. This may never happen as we may never support any of the
devices that use the combiner for interrupts. (Or maybe mct)
 1.4 30-Dec-2015  marty XU4 i2c, gpio & pinctrl changes

modify exynos_gpio.c to support the new pinctrl model.
set up the new pinctrl model in exynos_pinctrl.c

Flesh out exynos_i2c.c and set it up to use the new pinctrl model. NOTE:
exynos_i2c.c is still incomplete. I need to figure out what to set the
prescaler and scaler to.
 1.3 24-Dec-2015  marty branches: 1.3.2;
XU4 interrupt combiner

Written but untested. I'm still confused about how to handle two things:

1) at interrupt disestablishment, where do I get an interrupt number so
that I can disable the interrupt on the combiner?

2) How is interrupt multiplexing handled? I don't seem to have any sort of
interrupt dispatch routine that takes the 1 interrupt that reaches the
gic and turn it into one of eight combined interrupts to call the
established interrupt for the original uncombined interrupt source.
 1.2 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.1 21-Dec-2015  marty XU4 FDT checkpoint

It is rather amazing that XU4 gets as far as it does, given how much of this
code simply doesn't work. Focusing now on getting everything converted to
FDT. Next up USB and clocks. After that nuke everything that's not needed
and start the port in earnest.
 1.3.2.4 28-Aug-2017  skrll Sync with HEAD
 1.3.2.3 19-Mar-2016  skrll Sync with HEAD
 1.3.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.2.1 24-Dec-2015  skrll file exynos_combiner.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.6.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.7.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.8.1 10-Jun-2019  christos Sync with HEAD
 1.7.6.2 20-Oct-2018  pgoyette Sync with head
 1.7.6.1 28-Jul-2018  pgoyette Sync with HEAD
 1.7.4.2 03-Dec-2017  jdolecek update from HEAD
 1.7.4.1 11-Jun-2017  jdolecek file exynos_combiner.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.1 29-Apr-2014  reinoud branches: 1.1.2; 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Commit initial USB adapter support and associated DMA tags
 1.1.12.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 29-Apr-2014  tls file exynos_dma.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 29-Apr-2014  tls file exynos_dma.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 29-Apr-2014  yamt file exynos_dma.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 29-Apr-2014  rmind file exynos_dma.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.15 14-Mar-2021  skrll Use fdtbus_intr_establish_xname
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.12 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.11 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than
matching against multiple sets of compatibility strings.
 1.10 20-Mar-2020  skrll branches: 1.10.4;
Provide a sc_intr_cardmask to restore the value used to that before

http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html
 1.9 18-Oct-2019  skrll Use PRIxBUSADDR
 1.8 09-Apr-2019  skrll branches: 1.8.4;
Fix softc size in CFATTACH_DECL_NEW
 1.7 02-Jul-2018  jmcneill No need to use hold reg when updating clocks, and auto-discover some values.
 1.6 02-Jul-2018  jmcneill Set module clock on rate changes
 1.5 22-Jun-2017  skrll branches: 1.5.4; 1.5.6; 1.5.8;
Add some compat strings
 1.4 19-Jun-2017  jmcneill Update for new dwc_mmc driver
 1.3 30-May-2016  dholland branches: 1.3.10;
bus_width is not used, so don't fetch it; but do leave the logic in place
commented out so it's there if anyone wants it in the future.
PR 50594 from David Binderman.
 1.2 27-Dec-2015  jmcneill branches: 1.2.2;
get fifo depth from fdt, use default clock parent for biu
 1.1 26-Dec-2015  jmcneill Add dwcmmc glue
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 09-Jul-2016  skrll Sync with HEAD
 1.2.2.2 19-Mar-2016  skrll Sync with HEAD
 1.2.2.1 27-Dec-2015  skrll file exynos_dwcmmc.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.3.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.5.8.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.8.1 10-Jun-2019  christos Sync with HEAD
 1.5.6.1 28-Jul-2018  pgoyette Sync with HEAD
 1.5.4.2 03-Dec-2017  jdolecek update from HEAD
 1.5.4.1 22-Jun-2017  jdolecek file exynos_dwcmmc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #797):

sys/arch/arm/altera/cycv_dwcmmc.c: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.10

Provide a sc_intr_cardmask to restore the value used to that before
http://mail-index.netbsd.org/source-changes/2020/01/22/msg113182.html
 1.10.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 03-Jul-2018  jmcneill branches: 1.4.12;
Add support for Samsung Exynos USB.
 1.3 09-Apr-2018  jakllsch branches: 1.3.2;
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.2 23-Apr-2016  skrll branches: 1.2.16; 1.2.18;
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.1 27-Dec-2015  marty branches: 1.1.2;
XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.1.2.3 19-Mar-2016  skrll Adapt to the branch.
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 27-Dec-2015  skrll file exynos_ehci.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.2.18.2 28-Jul-2018  pgoyette Sync with HEAD
 1.2.18.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 23-Apr-2016  jdolecek file exynos_ehci.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.4.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.4 16-Apr-2017  jmcneill branches: 1.4.4;
Init array no longer required
 1.3 27-Dec-2015  jmcneill branches: 1.3.2; 1.3.4;
update exynosfdt_init to match the devices in exynos5422-odroidxu3.dts
 1.2 15-Dec-2015  marty branches: 1.2.2;
XU4 FDT -- fix bus tags

I got away with not having the generic bus tags for getting minimum fdt to
work; but for real drivers have to actually have them. Make necessary
corrections.
 1.1 14-Dec-2015  marty XU4 FDT Missing file

maybe it'll compile now.
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 19-Mar-2016  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 15-Dec-2015  skrll file exynos_fdt.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.3.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.3.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.4.4.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.33 11-Feb-2022  riastradh arm/samsung: Don't abuse child's dv_private for the parent's uses.

dv_private belongs to the device itself, i.e., the child here.

This overwrote the child's softc pointer, causing all kinds of havoc;
if this worked it was by an amazing accident.
 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 18-Jan-2021  thorpej branches: 1.30.2;
Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.29 20-Mar-2020  skrll branches: 1.29.4;
Support Exynos 5410 GPIO
 1.28 20-Mar-2020  skrll G/C
 1.27 20-Mar-2020  skrll Use __BIT/__SHIFTOUT some more. NFCI.
 1.26 17-Mar-2020  skrll Traiing whitespace
 1.25 04-Jul-2018  jmcneill branches: 1.25.4;
Remove some duplicate code
 1.24 02-Jul-2018  jmcneill Make the pinctrl driver actually work.
 1.23 31-Dec-2015  marty branches: 1.23.16; 1.23.18;
XU4 gpio - get rid of annoying printf
 1.22 30-Dec-2015  marty XU4 i2c, gpio & pinctrl changes

modify exynos_gpio.c to support the new pinctrl model.
set up the new pinctrl model in exynos_pinctrl.c

Flesh out exynos_i2c.c and set it up to use the new pinctrl model. NOTE:
exynos_i2c.c is still incomplete. I need to figure out what to set the
prescaler and scaler to.
 1.21 27-Dec-2015  jmcneill make exynos_gpio_fdt_acquire actually work, now dwcmmc properly does card detect for micro SD slot
 1.20 27-Dec-2015  jmcneill handle active low flag, simplify bank / pin name parsing, no need to panic if bank lookup fails
 1.19 27-Dec-2015  marty XU4 gpio clean up acquire code

properly locate the bank in the acquire code. This may even work.
 1.18 24-Dec-2015  marty XU4 GPIO Review Changes

Implement suggestions from Jared.
 1.17 22-Dec-2015  jmcneill Add fdtbus_gpio_{read,write}_raw, which tells the controller not to take
polarity into account. Tegra GPIO pin data includes pin polarity, but so
does a regulator-fixed node, so the end result was that the enable value
was being swapped twice. Change fregulator to use the raw APIs, and adapt
Tegra and Exynos GPIO drivers to support this flag.
 1.16 22-Dec-2015  marty XU4 GPIO Driver

This is a moderately tested working gpio driver for the Exynos based ODROID
XU4. To use this you have to edit the dtd file exynos54422-pinctrl.dtsi
and change the two occurances of 'gpz' to 'gpz0'. Otherewise it will crash
on a lookup failure.

It certainly could use a code review.
 1.15 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.14 19-Dec-2015  marty XU4 GPIO FDT broken snapshot

This is broken. exynos_gpio_bank_config and the call to it are wrong, and
the acquire function doesn't work.

But I'm in over my head and I need to discuss this:

There is a problem with the dtd: it doesn't have addresses for the individual
gpios. Do I add the addresses to it, or go back to the old version where I
have them hard coded in the driver.

There is a problem with creating the gpio device entries: I suspect I really
need to treat the pinctrl devices as busses and create the gpios as attached
to those busses, but I'm not familiar with how to do that in NetBSD. At the
minimum, a pointer to a similar situation would give me code to follow.
This is different than the usual bus attachment in that the gpios aren't
devices in the dtd (they don't have "compatible" properties) so they don't
get an attach routine called. An alternative to generating the bus
attachments might be to add "compatible" properties to the GPIO entries
in the dtd. so that they do get attached in the normal way.

If I'm going to modify the DTD, then it should be checked in, so a decision
on where to check them in would be nice, even if it does mean spreading them
all over because of license issues. (This DTD is GPL v2)
 1.13 11-Dec-2015  marty EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.12 29-Dec-2014  skrll Trailing whitespace.
 1.11 24-Sep-2014  reinoud branches: 1.11.2;
Add extra GPIO chunk for 5410
 1.10 09-Sep-2014  reinoud Xuhost bits for Exynos5 are located in the two top bits
 1.9 05-Sep-2014  skrll RCSId police
 1.8 26-Aug-2014  reinoud Make it compile without DIAGNOSTIC
 1.7 14-Aug-2014  reinoud branches: 1.7.2;
Add GPIO definitions for Exynos5 series (taken from 5250)
 1.6 21-May-2014  reinoud branches: 1.6.2; 1.6.4; 1.6.6;
Don't panic if the pin is not available in pin_reserve() but return false
instead.
 1.5 16-May-2014  reinoud branches: 1.5.2;
Fix issues with the gpio controller:
* the func get/put shift is 4 bits, not 16!
* redo available and inuse bits
* create a function to get a pindata from a pinset
 1.4 14-May-2014  reinoud Revisit gpio and revisit register file mapping. The additional register files
are now mapped behind the origional register file.

The gpio channel GPZ is mapped over I2S0 in the separate audio register file
and were both abusively mapped over I2C0 in the main register file!

While here, delay the gpio bootstrap till on attachment. We could hasten it in
the odroid_machdep.c if needed. Also make the gpio code more resilliant and
allow booting correctly without any GPIO bits defined/available.
 1.3 10-May-2014  reinoud Fix typo
 1.2 10-May-2014  reinoud Add the missing ETC0, ETC6, ETC7, ETC8 `gpio' registers. They are special in
that they can't be set/unset nor configured. The only changeable parameters
are the pullups PUD and the DRV driving strength. They however fit the same
structure as the rest of the GPIOs and are used as such.
 1.1 09-May-2014  reinoud Implement gpio framework for the Samsung Exynos series.

Note that only the Exynos4 gpio registers are defined now and provision is
taken to allow for seamlessness adding of Exynos5 values.
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 16-May-2014  rmind file exynos_gpio.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.6.6.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.6.4.2 10-Aug-2014  tls Rebase.
 1.6.4.1 21-May-2014  tls file exynos_gpio.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.6.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.6.2.1 21-May-2014  yamt file exynos_gpio.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.7.2.3 03-Dec-2017  jdolecek update from HEAD
 1.7.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 14-Aug-2014  tls file exynos_gpio.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.11.2.3 19-Mar-2016  skrll Sync with HEAD
 1.11.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.11.2.1 06-Apr-2015  skrll Sync with HEAD
 1.23.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23.18.1 10-Jun-2019  christos Sync with HEAD
 1.23.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.25.4.2 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #798):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.17
sys/arch/arm/samsung/exynos_pinctrl.h: revision 1.3
sys/arch/arm/samsung/exynos_gpio.c: revision 1.27
sys/arch/arm/samsung/exynos_gpio.c: revision 1.28
sys/arch/arm/samsung/exynos_gpio.c: revision 1.29
sys/arch/arm/samsung/exynos_var.h: revision 1.28

Use __BIT/__SHIFTOUT some more. NFCI.

G/C

Support Exynos 5410 GPIO
 1.25.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #796):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.16
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_gpio.c: revision 1.26
sys/arch/arm/samsung/exynos_uart.c: revision 1.3
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.15

Trailing whitespace
 1.29.4.1 03-Apr-2021  thorpej Sync with 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.24 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.23 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.22 14-Mar-2021  skrll branches: 1.22.4; 1.22.14;
Use fdtbus_intr_establish_xname
 1.21 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.20 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.19 17-Mar-2020  skrll branches: 1.19.4;
Traiing whitespace
 1.18 22-Dec-2019  thorpej Use a separate lock (not the i2c bus lock) to synchronize with the
interrupt handler. Refactor the code slightly to make the lock use
consistent.

Also includes the changes for:

Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.17 18-Oct-2019  skrll Use PRIxBUSADDR
 1.16 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.15 01-Jul-2018  jmcneill Use fdtbus_attach_i2cbus
 1.14 09-May-2018  thorpej branches: 1.14.2;
If we don't get informed (via device properties) of child I2C devices,
don't assign an empty array to iba.iba_child_devices, as it will prevent
indirect configuration of the I2C bus from occurring.

Tested on Raspberry Pi (bcm2835), identical logical fix replicated
(and compile-tested) elsewhere.

PR port-arm/53171
 1.13 02-Jul-2017  jmcneill branches: 1.13.4;
No need to explicitly set pinctrl config 0 now
 1.12 11-Jun-2017  jmcneill Correctly initialize i2cbus attach args.
 1.11 14-Feb-2016  chs branches: 1.11.10;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.10 01-Jan-2016  marty XU4 FDT pinctrl

Rewrite the use of pinctrl to reflect the new model from Jared.
 1.9 30-Dec-2015  marty XU4 i2c, gpio & pinctrl changes

modify exynos_gpio.c to support the new pinctrl model.
set up the new pinctrl model in exynos_pinctrl.c

Flesh out exynos_i2c.c and set it up to use the new pinctrl model. NOTE:
exynos_i2c.c is still incomplete. I need to figure out what to set the
prescaler and scaler to.
 1.8 24-Dec-2015  marty XU4 I2C snapshot

This is a complete, but untested, driver; except that it needs to be able
to configure gpios and, afaict, we don't yet have an fdtbus_gpio_* function
that will do that.
 1.7 22-Dec-2015  jmcneill build fix
 1.6 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.5 21-Dec-2015  marty XU4 FDT checkpoint

It is rather amazing that XU4 gets as far as it does, given how much of this
code simply doesn't work. Focusing now on getting everything converted to
FDT. Next up USB and clocks. After that nuke everything that's not needed
and start the port in earnest.
 1.4 11-Dec-2015  marty EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.3 29-Dec-2014  skrll Trailing whitespace.
 1.2 26-Aug-2014  reinoud branches: 1.2.2;
Make it compile without DIAGNOSTIC
 1.1 21-May-2014  reinoud branches: 1.1.2; 1.1.4; 1.1.6;
Provide bitbanging IIC for Samsung's Exynos
 1.1.6.3 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 21-May-2014  tls file exynos_i2c.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 21-May-2014  tls file exynos_i2c.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.2.2.4 28-Aug-2017  skrll Sync with HEAD
 1.2.2.3 19-Mar-2016  skrll Sync with HEAD
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 06-Apr-2015  skrll Sync with HEAD
 1.11.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.13.4.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.13.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.13.4.1 21-May-2018  pgoyette Sync with HEAD
 1.14.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.14.2.1 10-Jun-2019  christos Sync with HEAD
 1.19.4.2 03-Apr-2021  thorpej Sync with HEAD.
 1.19.4.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.22.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.22.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.3 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.2 05-Sep-2014  skrll branches: 1.2.2; 1.2.12;
RCSId police
 1.1 13-Apr-2014  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 13-Apr-2014  tls file exynos_intr.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 13-Apr-2014  tls file exynos_intr.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 13-Apr-2014  yamt file exynos_intr.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 13-Apr-2014  rmind file exynos_intr.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.2.12.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.2.1 28-Aug-2017  skrll Sync with HEAD
 1.9 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.8 05-Sep-2014  skrll branches: 1.8.2;
RCSId police
 1.7 28-Aug-2014  reinoud Implement CPU speed control for Exynos4 and Exynos5 CPUs using APLL frequency
adjustment.
 1.6 14-May-2014  reinoud branches: 1.6.2; 1.6.4; 1.6.6; 1.6.8; 1.6.10;
Revisit gpio and revisit register file mapping. The additional register files
are now mapped behind the origional register file.

The gpio channel GPZ is mapped over I2S0 in the separate audio register file
and were both abusively mapped over I2C0 in the main register file!

While here, delay the gpio bootstrap till on attachment. We could hasten it in
the odroid_machdep.c if needed. Also make the gpio code more resilliant and
allow booting correctly without any GPIO bits defined/available.
 1.5 10-May-2014  reinoud No use in duplicating the frequency settings of mct and gtmr at two different
places.
 1.4 10-May-2014  reinoud Implement evbarm_device_register_post_config() hook for odroid and its
decendents. This allows post attach actions on every level of the machine
support.
 1.3 09-May-2014  reinoud The mct runs at F_IN / XUSBXTI of 24 Mhz
 1.2 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.6.10.3 03-Dec-2017  jdolecek update from HEAD
 1.6.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.10.1 14-May-2014  tls file exynos_io.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.6.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.6.6.2 10-Aug-2014  tls Rebase.
 1.6.6.1 14-May-2014  tls file exynos_io.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.6.4.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.6.4.1 14-May-2014  yamt file exynos_io.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.6.2.2 18-May-2014  rmind sync with head
 1.6.2.1 14-May-2014  rmind file exynos_io.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.8.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.6 28-Sep-2014  reinoud branches: 1.6.2;
Remove never used usb locators
 1.5 05-Sep-2014  skrll RCSId police
 1.4 21-May-2014  reinoud branches: 1.4.2; 1.4.4; 1.4.6; 1.4.8;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.3 16-May-2014  reinoud branches: 1.3.2;
Add i2c locators, add a i2c bus indexer and provide function prototype for the
pinset to pindata function.
 1.2 09-May-2014  reinoud Use the constant for default interrupt provided by autoconf
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.3.2.2 18-May-2014  rmind sync with head
 1.3.2.1 16-May-2014  rmind file exynos_io.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.4.8.3 03-Dec-2017  jdolecek update from HEAD
 1.4.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.1 21-May-2014  tls file exynos_io.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.4.6.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.4.4.2 10-Aug-2014  tls Rebase.
 1.4.4.1 21-May-2014  tls file exynos_io.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.4.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.4.2.1 21-May-2014  yamt file exynos_io.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.6.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 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 14-Mar-2021  skrll branches: 1.5.2;
Use fdtbus_intr_establish_xname
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 03-Jul-2018  jmcneill branches: 1.3.12;
Add support for Samsung Exynos USB.
 1.2 23-Apr-2016  skrll branches: 1.2.16; 1.2.18; 1.2.20;
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.1 27-Dec-2015  marty branches: 1.1.2;
XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.1.2.3 19-Mar-2016  skrll Adapt to the branch.
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 27-Dec-2015  skrll file exynos_ohci.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.2.20.1 10-Jun-2019  christos Sync with HEAD
 1.2.18.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.16.2 03-Dec-2017  jdolecek update from HEAD
 1.2.16.1 23-Apr-2016  jdolecek file exynos_ohci.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.22 11-Feb-2022  riastradh exyopctl(4): Don't leak a duplicate softc on attach.
 1.21 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.20 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.19 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.18 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.17 20-Mar-2020  skrll branches: 1.17.4;
Support Exynos 5410 GPIO
 1.16 17-Mar-2020  skrll Traiing whitespace
 1.15 18-Oct-2019  skrll Use PRIxBUSADDR
 1.14 01-Oct-2019  jmcneill Add support for devices with separate "init" and "default" pinctrl states.
 1.13 02-Jul-2018  jmcneill branches: 1.13.4;
Make the pinctrl driver actually work.
 1.12 02-Jul-2017  jmcneill branches: 1.12.4; 1.12.6; 1.12.8;
Configure pin defaults at attach
 1.11 02-Jul-2017  jmcneill Adjust to new pinctrl API
 1.10 22-Jun-2017  skrll Add some compat strings
 1.9 01-Jan-2016  marty branches: 1.9.10;
XU4 FDT pinctrl

Rewrite the use of pinctrl to reflect the new model from Jared.
 1.8 30-Dec-2015  marty XU4 i2c, gpio & pinctrl changes

modify exynos_gpio.c to support the new pinctrl model.
set up the new pinctrl model in exynos_pinctrl.c

Flesh out exynos_i2c.c and set it up to use the new pinctrl model. NOTE:
exynos_i2c.c is still incomplete. I need to figure out what to set the
prescaler and scaler to.
 1.7 27-Dec-2015  jmcneill update compatible string to match exynos5422-odroidxu3.dts
 1.6 24-Dec-2015  marty branches: 1.6.2;
XU4 GPIO Review Changes

Implement suggestions from Jared.
 1.5 22-Dec-2015  jmcneill OF_getprop -> of_getprop_bool
 1.4 22-Dec-2015  marty XU4 GPIO Driver

This is a moderately tested working gpio driver for the Exynos based ODROID
XU4. To use this you have to edit the dtd file exynos54422-pinctrl.dtsi
and change the two occurances of 'gpz' to 'gpz0'. Otherewise it will crash
on a lookup failure.

It certainly could use a code review.
 1.3 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.2 21-Dec-2015  marty XU4 FDT missed files
 1.1 19-Dec-2015  marty XU4 GPIO FDT broken snapshot

This is broken. exynos_gpio_bank_config and the call to it are wrong, and
the acquire function doesn't work.

But I'm in over my head and I need to discuss this:

There is a problem with the dtd: it doesn't have addresses for the individual
gpios. Do I add the addresses to it, or go back to the old version where I
have them hard coded in the driver.

There is a problem with creating the gpio device entries: I suspect I really
need to treat the pinctrl devices as busses and create the gpios as attached
to those busses, but I'm not familiar with how to do that in NetBSD. At the
minimum, a pointer to a similar situation would give me code to follow.
This is different than the usual bus attachment in that the gpios aren't
devices in the dtd (they don't have "compatible" properties) so they don't
get an attach routine called. An alternative to generating the bus
attachments might be to add "compatible" properties to the GPIO entries
in the dtd. so that they do get attached in the normal way.

If I'm going to modify the DTD, then it should be checked in, so a decision
on where to check them in would be nice, even if it does mean spreading them
all over because of license issues. (This DTD is GPL v2)
 1.6.2.4 28-Aug-2017  skrll Sync with HEAD
 1.6.2.3 19-Mar-2016  skrll Sync with HEAD
 1.6.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6.2.1 24-Dec-2015  skrll file exynos_pinctrl.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.9.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.12.8.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.8.1 10-Jun-2019  christos Sync with HEAD
 1.12.6.1 28-Jul-2018  pgoyette Sync with HEAD
 1.12.4.2 03-Dec-2017  jdolecek update from HEAD
 1.12.4.1 02-Jul-2017  jdolecek file exynos_pinctrl.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.13.4.3 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #798):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.17
sys/arch/arm/samsung/exynos_pinctrl.h: revision 1.3
sys/arch/arm/samsung/exynos_gpio.c: revision 1.27
sys/arch/arm/samsung/exynos_gpio.c: revision 1.28
sys/arch/arm/samsung/exynos_gpio.c: revision 1.29
sys/arch/arm/samsung/exynos_var.h: revision 1.28

Use __BIT/__SHIFTOUT some more. NFCI.

G/C

Support Exynos 5410 GPIO
 1.13.4.2 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #796):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.16
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_gpio.c: revision 1.26
sys/arch/arm/samsung/exynos_uart.c: revision 1.3
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.15

Trailing whitespace
 1.13.4.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.17.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 20-Mar-2020  skrll branches: 1.3.4;
Support Exynos 5410 GPIO
 1.2 22-Dec-2015  marty branches: 1.2.2; 1.2.18; 1.2.22; 1.2.26;
XU4 GPIO Driver

This is a moderately tested working gpio driver for the Exynos based ODROID
XU4. To use this you have to edit the dtd file exynos54422-pinctrl.dtsi
and change the two occurances of 'gpz' to 'gpz0'. Otherewise it will crash
on a lookup failure.

It certainly could use a code review.
 1.1 19-Dec-2015  marty XU4 GPIO FDT missing file.
 1.2.26.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #798):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.17
sys/arch/arm/samsung/exynos_pinctrl.h: revision 1.3
sys/arch/arm/samsung/exynos_gpio.c: revision 1.27
sys/arch/arm/samsung/exynos_gpio.c: revision 1.28
sys/arch/arm/samsung/exynos_gpio.c: revision 1.29
sys/arch/arm/samsung/exynos_var.h: revision 1.28

Use __BIT/__SHIFTOUT some more. NFCI.

G/C

Support Exynos 5410 GPIO
 1.2.22.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 22-Dec-2015  jdolecek file exynos_pinctrl.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 22-Dec-2015  skrll file exynos_pinctrl.h was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.3.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.41 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.40 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.39 29-Oct-2022  jmcneill Build fixes.
 1.38 24-Apr-2021  thorpej 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.37 04-Feb-2021  thorpej branches: 1.37.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.36 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.35 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.34 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.33 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.32 27-Nov-2020  skrll cpu_hatched_p does necessary memory barrier so remove membar_consumer
calls from before cpu_hatched_p calls.
 1.31 30-Oct-2020  skrll branches: 1.31.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.30 28-Sep-2020  jmcneill Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.29 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.28 19-Mar-2020  skrll Bring back EXYNOS5422_DISABLE_CA7_CLUSTER the bug is back
 1.27 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.26 09-Apr-2019  skrll branches: 1.26.4; 1.26.6;
EXYNOS5422_DISABLE_CA7_CLUSTER isn't required anymore
 1.25 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.24 27-Jan-2019  dholland fix duplicated chunk from merge
 1.23 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.22 04-Jan-2019  jmcneill Starting CPUs in cluster 1 of Exynos5422 causes strange things to happen
around ap_mpstart. Until we figure out why, only start CPUs in cluster 0.
 1.21 03-Jan-2019  jmcneill Add multi-cluster CPU spinup code for Exynos5422.
 1.20 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.19 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.18 08-Oct-2018  skrll Remove a build dependency on SOC_EXYNOS4 and SOC_EXYNOS5. Now runtime.
 1.17 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.16 14-Sep-2018  skrll exynos_bootstrap doesn't need an argument
 1.15 11-Sep-2018  jmcneill Add Exynos5 SMP support.
 1.14 22-Aug-2018  skrll Traiing whitespace
 1.13 19-Aug-2018  skrll Some changes to bring back exynos4 support and make exynos5 support more
modern/generic

- Provide a exynos_platform_early_putchar based on CONSADDR and remove
EXYNOS_CONSOLE_EARLY
- Provide devmaps for exynos4 and exynos5
- Simplify exynos_bootstrap
- Update exynos_start.S to use exynos_platform_early_putchar - this
needs a fix in a9_subr.S for arm_cpuinit to save lr in a callee save
register and not use ip. Maybe this change is safe now, but too much
testing required to commit it now.
 1.12 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.11 31-Jul-2018  skrll Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.10 02-Jul-2018  jmcneill Add a proper MCT driver rather than relying on ARM Generic Timer (which
may not be functional or even present).
 1.9 17-Mar-2018  ryo branches: 1.9.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.8 19-Dec-2017  skrll branches: 1.8.2;
Trailing whitespace
 1.7 22-Oct-2017  skrll branches: 1.7.2;
Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
 1.6 20-Jun-2017  jmcneill branches: 1.6.4; 1.6.6;
Implement platform reset for exynos5
 1.5 11-Jun-2017  jmcneill Simplify MCT; just enable it and then attach an ARMv7 generic timer.
 1.4 11-Jun-2017  jmcneill Fix build w/o VERBOSE_INIT_ARM
 1.3 11-Jun-2017  jmcneill Add delay and enable mct timecounter.
 1.2 10-Jun-2017  jmcneill Fix exynos5 devmap, bootstrap, and implement early_putchar.
 1.1 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.6.6.2 28-Aug-2017  skrll Sync with HEAD
 1.6.6.1 20-Jun-2017  skrll file exynos_platform.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.6.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.6.4.1 20-Jun-2017  snj file exynos_platform.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 22-Oct-2017  jdolecek file exynos_platform.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8.2.7 18-Jan-2019  pgoyette Synch with HEAD
 1.8.2.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.8.2.5 20-Oct-2018  pgoyette Sync with head
 1.8.2.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.8.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.8.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.26.6.1 29-Feb-2020  ad Sync with head.
 1.26.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #799):

sys/arch/arm/samsung/exynos_platform.c: revision 1.28

Bring back EXYNOS5422_DISABLE_CA7_CLUSTER the bug is back
 1.31.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.31.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.37.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 18-Oct-2019  skrll branches: 1.2.8;
Use PRIxBUSADDR
 1.1 04-Jul-2018  jmcneill branches: 1.1.2; 1.1.6;
Add driver for Exynos PWM timer.
 1.1.6.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 04-Jul-2018  christos file exynos_pwm.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.1.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.1 04-Jul-2018  pgoyette file exynos_pwm.c was added on branch pgoyette-compat on 2018-07-28 04:37:29 +0000
 1.2.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.15 11-Jun-2017  jmcneill Avoid divide-by-zero for unconfigured PLLs
 1.14 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.13 30-Sep-2014  reinoud branches: 1.13.2; 1.13.12;
Indent PMU_PHY_ indenting
 1.12 29-Sep-2014  reinoud Phase 2 of samsung/exynos_* cleanup
 1.11 09-Sep-2014  reinoud Add usb20 phy host link enable
insert extra space
 1.10 05-Sep-2014  skrll RCSId police
 1.9 04-Sep-2014  reinoud 1st stage of USB support for Exynos5 chips: the register definitions
 1.8 28-Aug-2014  reinoud Add PLL registers and PLL conversion macros
 1.7 03-Aug-2014  wiz branches: 1.7.2; 1.7.4; 1.7.6;
defintion -> definition
 1.6 03-Jun-2014  reinoud Add used pmu registers, sysreg registers and usb phy registers for USB2. More
are added when used.
 1.5 09-May-2014  reinoud branches: 1.5.2; 1.5.4;
Both Exynos4 and Exynos5 have a 24 Mhz external crystal that gets pumped up to
the required frequencies by PLL circuits.

USB freq. seems to be tied directly to this freq.
 1.4 09-May-2014  reinoud Add GPIO register definitions

Also add the frequency for the USB system; its also used for various other
clocksources
 1.3 19-Apr-2014  reinoud Move the watchdog registers back to the exynos_reg.h
 1.2 18-Apr-2014  reinoud Fix attachment of wdt to also use the bus_space_handle

While here, move the registers outside the global register file to a separate
wdt_reg.h file.
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.5.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 09-May-2014  yamt file exynos_reg.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 09-May-2014  rmind file exynos_reg.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.7.6.3 03-Dec-2017  jdolecek update from HEAD
 1.7.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.1 03-Aug-2014  tls file exynos_reg.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.7.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.7.2.2 10-Aug-2014  tls Rebase.
 1.7.2.1 03-Aug-2014  tls file exynos_reg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.13.12.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.13.2.1 28-Aug-2017  skrll Sync with HEAD
 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 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 18-Oct-2019  skrll branches: 1.3.8;
Use PRIxBUSADDR
 1.2 21-Dec-2015  marty branches: 1.2.2; 1.2.18; 1.2.22;
XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.1 21-Dec-2015  marty XU4 FDT checkpoint

It is rather amazing that XU4 gets as far as it does, given how much of this
code simply doesn't work. Focusing now on getting everything converted to
FDT. Next up USB and clocks. After that nuke everything that's not needed
and start the port in earnest.
 1.2.22.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.18.2 03-Dec-2017  jdolecek update from HEAD
 1.2.18.1 21-Dec-2015  jdolecek file exynos_rtc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.2.1 21-Dec-2015  skrll file exynos_rtc.c was added on branch nick-nhusb on 2015-12-27 12:09:32 +0000
 1.3.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 27-Dec-2014  skrll Add .arch_extension sec to fix build. (v7a on it's own complains)
 1.2 05-Sep-2014  skrll branches: 1.2.2;
RCSId police
 1.1 13-Apr-2014  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 13-Apr-2014  tls file exynos_smc.S was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 13-Apr-2014  tls file exynos_smc.S was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 13-Apr-2014  yamt file exynos_smc.S was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 13-Apr-2014  rmind file exynos_smc.S was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.2.2.1 06-Apr-2015  skrll Sync with HEAD
 1.41 29-Oct-2022  jmcneill Build fixes.
 1.40 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.39 31-Oct-2018  skrll Fix non-DIGNOSTIC builds
 1.38 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.37 08-Oct-2018  skrll Remove a build dependency on SOC_EXYNOS4 and SOC_EXYNOS5. Now runtime.
 1.36 14-Sep-2018  skrll exynos_bootstrap doesn't need an argument
 1.35 19-Aug-2018  skrll Some changes to bring back exynos4 support and make exynos5 support more
modern/generic

- Provide a exynos_platform_early_putchar based on CONSADDR and remove
EXYNOS_CONSOLE_EARLY
- Provide devmaps for exynos4 and exynos5
- Simplify exynos_bootstrap
- Update exynos_start.S to use exynos_platform_early_putchar - this
needs a fix in a9_subr.S for arm_cpuinit to save lr in a callee save
register and not use ip. Maybe this change is safe now, but too much
testing required to commit it now.
 1.34 31-Jul-2018  skrll Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.33 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.32 10-Jun-2017  jmcneill branches: 1.32.4; 1.32.6;
Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.31 21-Dec-2015  marty branches: 1.31.10;
XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.30 12-Dec-2015  marty XU4: Fix build

missed a dependency on evbarm/odroid that should have been evbarm/exynos.
 1.29 11-Dec-2015  marty EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.28 19-Nov-2015  marty add 5422 gic handling to attach code
 1.27 29-Dec-2014  skrll Fixup USB Phy initialisation for Exynos5410.

odroid-xu now detects USB devices.
 1.26 29-Dec-2014  skrll Trailing whitespace.
 1.25 02-Oct-2014  reinoud branches: 1.25.2;
Add KPLL for Exynos5 and EPLL is called DPLL on the 5410 :-/
 1.24 02-Oct-2014  reinoud Disable maximum frequency setting for exynos5

While here add more known frequency settings for exynos4. They are currently
disabled since derived clocks are not adjusted.
 1.23 30-Sep-2014  reinoud arch/arm/samsung/ cleanup : move SoC specific power and phy routines into
exynos_soc.c and move Odroid board specific tweaks to odroid_machdep.c
 1.22 30-Sep-2014  reinoud Provide exynos_sysreg_bsh as a global bus_space_subregion
 1.21 29-Sep-2014  reinoud Phase 2 of samsung/exynos_* cleanup
 1.20 05-Sep-2014  skrll RCSId police
 1.19 02-Sep-2014  reinoud Dump the PLL frequencies on startup on VERBOSE_INIT_ARM
 1.18 01-Sep-2014  reinoud Update the cycle counter i.e. our CPU frequency for all CPUs on setting the
cpu frequency.
 1.17 28-Aug-2014  snj tyop police
 1.16 28-Aug-2014  reinoud Implement CPU speed control for Exynos4 and Exynos5 CPUs using APLL frequency
adjustment.
 1.15 26-Aug-2014  reinoud Make it compile without DIAGNOSTIC by using __diagused
 1.14 11-Jun-2014  matt branches: 1.14.2; 1.14.4; 1.14.6;
Fix typo & include mct_reg.h
 1.13 11-Jun-2014  matt Exynos5 needs the MCT running to have the Global Timer operate.
 1.12 21-May-2014  reinoud branches: 1.12.2;
Make ODROID (-XU) compile again
 1.11 14-May-2014  reinoud branches: 1.11.2;
Revisit gpio and revisit register file mapping. The additional register files
are now mapped behind the origional register file.

The gpio channel GPZ is mapped over I2S0 in the separate audio register file
and were both abusively mapped over I2C0 in the main register file!

While here, delay the gpio bootstrap till on attachment. We could hasten it in
the odroid_machdep.c if needed. Also make the gpio code more resilliant and
allow booting correctly without any GPIO bits defined/available.
 1.10 10-May-2014  reinoud No use in duplicating the frequency settings of mct and gtmr at two different
places.
 1.9 10-May-2014  reinoud Implement evbarm_device_register_post_config() hook for odroid and its
decendents. This allows post attach actions on every level of the machine
support.
 1.8 09-May-2014  reinoud Implement gpio framework for the Samsung Exynos series.

Note that only the Exynos4 gpio registers are defined now and provision is
taken to allow for seamlessness adding of Exynos5 values.
 1.7 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.6 22-Apr-2014  reinoud Add the missing mpcaa_memh to reflect the correct offset.

The offsets are not actually used now on matt's request.
 1.5 16-Apr-2014  reinoud Teach sscom attachment, also the console, to use the busspace handle of the
main register space.

While here, map in the correct amount of memory or bus_space_map() won't
return an error but will wedge the system.
 1.4 13-Apr-2014  reinoud Remove unused code snippet
 1.3 13-Apr-2014  reinoud Remove old trustzone headerfile inclusion
 1.2 13-Apr-2014  reinoud Remove trustzone firmware indirect calls by explicit calling the exynos
routines in exynos_soc.c

While here, also remove unused variable conaddr
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.11.2.2 18-May-2014  rmind sync with head
 1.11.2.1 14-May-2014  rmind file exynos_soc.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.12.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.12.2.1 21-May-2014  yamt file exynos_soc.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.14.6.3 03-Dec-2017  jdolecek update from HEAD
 1.14.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.6.1 11-Jun-2014  tls file exynos_soc.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.14.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.14.2.2 10-Aug-2014  tls Rebase.
 1.14.2.1 11-Jun-2014  tls file exynos_soc.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.25.2.3 28-Aug-2017  skrll Sync with HEAD
 1.25.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.25.2.1 06-Apr-2015  skrll Sync with HEAD
 1.31.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.32.6.1 10-Jun-2019  christos Sync with HEAD
 1.32.4.5 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.32.4.4 20-Oct-2018  pgoyette Sync with head
 1.32.4.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.32.4.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.32.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.2 25-Feb-2015  joerg Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.1 13-Apr-2014  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12;
Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.1.12.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.12.1 06-Apr-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 13-Apr-2014  tls file exynos_space.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.8.1 27-May-2015  msaitoh Pull up following revision(s) (requested by skrll in ticket #805):
sys/arch/arm/include/arm32/pmap.h: revision 1.138
sys/arch/arm/arm/cpufunc.c: revision 1.151
sys/arch/arm/arm32/bus_dma.c: revision 1.90
sys/arch/arm/broadcom/bcm53xx_pax.c: revision 1.14
sys/arch/arm/arm32/bus_dma.c: revision 1.91
sys/arch/arm/samsung/exynos_space.c: revision 1.2
sys/arch/arm/arm32/db_machdep.c: revision 1.23
sys/arch/arm/allwinner/awin_space.c: revision 1.4
sys/arch/arm/include/rwlock.h: revision 1.9
sys/arch/arm/amlogic/amlogic_space.c: revision 1.2
sys/arch/arm/zynq/zynq_space.c: revision 1.2
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.7
sys/arch/arm/arm32/pmap.c: revision 1.317
sys/arch/arm/include/locore.h: revision 1.19
sys/arch/arm/include/mutex.h: revision 1.20
sys/arch/arm/include/lock.h: revision 1.31
sys/arch/arm/include/lock.h: revision 1.32
sys/arch/arm/broadcom/bcmgen_space.c: revision 1.5
- Kill redundant semicolons.
- Indentation.
- Improve inline asm around dsb/dmb/isb:
- always use volatile and mark them as memory barrier
- use the common version from locore.h in all places not included from
userland
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 13-Apr-2014  tls file exynos_space.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 13-Apr-2014  yamt file exynos_space.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 13-Apr-2014  rmind file exynos_space.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.12 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.11 04-Jul-2018  jmcneill Only process a tx or rx interrupt if the pending bit is set.
 1.10 19-Jun-2017  jmcneill branches: 1.10.4; 1.10.6;
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
 1.9 10-Jun-2017  jmcneill Calculate UART frequency based on bootloader config.
 1.8 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.7 21-Dec-2015  marty branches: 1.7.10;
XU4 FDT missed files
 1.6 17-Dec-2015  marty EXYNOS FDT sscom
 1.5 27-Apr-2014  reinoud branches: 1.5.2; 1.5.4; 1.5.6; 1.5.10; 1.5.12;
We can't use IPL_SERIAL here, since it would mean its the same as IPL_HIGH
which panics the armgic's assertion.

In practice i dont think this will hurt since even the small queues are
relatively big.
 1.4 18-Apr-2014  reinoud Fix interrupt enable/disable and clearning bits

what was i thinking...
 1.3 16-Apr-2014  reinoud Teach sscom attachment, also the console, to use the busspace handle of the
main register space.

While here, map in the correct amount of memory or bus_space_map() won't
return an error but will wedge the system.
 1.2 14-Apr-2014  reinoud Implement sscom interrupt masking and acknowledgement routines
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.5.12.2 28-Aug-2017  skrll Sync with HEAD
 1.5.12.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.10.3 03-Dec-2017  jdolecek update from HEAD
 1.5.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.10.1 27-Apr-2014  tls file exynos_sscom.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.5.6.2 10-Aug-2014  tls Rebase.
 1.5.6.1 27-Apr-2014  tls file exynos_sscom.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.5.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 27-Apr-2014  yamt file exynos_sscom.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 27-Apr-2014  rmind file exynos_sscom.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.7.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.10.6.1 10-Jun-2019  christos Sync with HEAD
 1.10.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3 01-Jul-2018  jmcneill Delete chipid and sysmmu drivers, they don't do anything but print that
they are not implemented at attach time.
 1.2 19-Jun-2017  jmcneill branches: 1.2.4; 1.2.6; 1.2.8;
Fix dmesg
 1.1 03-Jan-2016  marty branches: 1.1.2; 1.1.12;
XU4 interrupt combiner / fake sysmmu

Add sysmmu to have something that calls through to the combiner's establish
routine. Debug the combiner with it.

At this point the combiner is mostly done, but the interrupt handler has not
been tested. This may never happen as we may never support any of the
devices that use the combiner for interrupts. (Or maybe mct)
 1.1.12.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.2.3 28-Aug-2017  skrll Sync with HEAD
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 03-Jan-2016  skrll file exynos_sysmmu.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.2.8.1 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 19-Jun-2017  jdolecek file exynos_sysmmu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.7 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.6 13-Sep-2021  jmcneill Add support for Apple M1 debug UART.
 1.5 14-Mar-2021  skrll Use fdtbus_intr_establish_xname
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 17-Mar-2020  skrll branches: 1.3.4;
Traiing whitespace
 1.2 11-Sep-2018  jmcneill branches: 1.2.4; 1.2.6;
Make this driver MPSAFE
 1.1 05-Jul-2018  jmcneill branches: 1.1.2;
Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.1.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.1 05-Jul-2018  pgoyette file exynos_uart.c was added on branch pgoyette-compat on 2018-07-28 04:37:29 +0000
 1.2.6.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #796):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.16
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_gpio.c: revision 1.26
sys/arch/arm/samsung/exynos_uart.c: revision 1.3
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.15

Trailing whitespace
 1.2.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 11-Sep-2018  christos file exynos_uart.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.3.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 27-Dec-2015  marty XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.15 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.14 21-Dec-2015  marty XU4 FDT Last drivers converted

There is a minimum conversion on the clock driver.

The USB driver needs reordering and is broken, but it was broken before.

Next up: tactical nuclear weapons
 1.13 30-Sep-2014  reinoud branches: 1.13.2;
arch/arm/samsung/ cleanup : move SoC specific power and phy routines into
exynos_soc.c and move Odroid board specific tweaks to odroid_machdep.c
 1.12 30-Sep-2014  reinoud Use the global exynos_pmureg_bsh and exynos_sysreg_bsh bus space subregions
 1.11 24-Sep-2014  reinoud Power up both vbus and overcurrent lines for USB
 1.10 21-Sep-2014  reinoud Fix Exynos5 SoC OHCI hang

Redo the Exynos 5410 USB phy initialisation following uboot
 1.9 09-Sep-2014  reinoud Implement the XuhostPWREN/XuhostOVERCUR register selection
Update the usb2 isolation. It ought to work for Exynos5 too.

Only issue now is ohci not working
 1.8 04-Sep-2014  reinoud Fix usb attachment and add an usb2 phy enable for exynos5410.

There is still an issue with ohci
 1.7 21-Jun-2014  skrll branches: 1.7.2; 1.7.4; 1.7.6;
Typo in error message.
 1.6 11-Jun-2014  reinoud Remove the exyo_usb_locinfo structure as exyousb becomes usb2 only
 1.5 06-Jun-2014  reinoud Revisit Exynos USB system implementing usb2phy support for Exynos4.
 1.4 21-May-2014  reinoud branches: 1.4.2;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.3 10-May-2014  reinoud branches: 1.3.2;
The Odroids USB hub and Ethernet init are not to be done at the SoC level.
 1.2 05-May-2014  reinoud Add TDB lines
 1.1 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.3.2.2 18-May-2014  rmind sync with head
 1.3.2.1 10-May-2014  rmind file exynos_usb.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.4.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.4.2.1 21-May-2014  yamt file exynos_usb.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.7.6.3 03-Dec-2017  jdolecek update from HEAD
 1.7.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.1 21-Jun-2014  tls file exynos_usb.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.7.4.2 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.7.4.1 04-Jan-2015  martin branches: 1.7.4.1.4;
Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.7.4.1.4.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.7.2.2 10-Aug-2014  tls Rebase.
 1.7.2.1 21-Jun-2014  tls file exynos_usb.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.13.2.5 19-Mar-2016  skrll Sync with HEAD
 1.13.2.4 28-Dec-2015  skrll Complete the adaptation to the branch
 1.13.2.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.13.2.2 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.13.2.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.2 03-Jul-2018  jmcneill Add support for Samsung Exynos USB.
 1.1 27-Dec-2015  marty branches: 1.1.2; 1.1.18; 1.1.20; 1.1.22;
XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.20.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 27-Dec-2015  jdolecek file exynos_usb3.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 27-Dec-2015  skrll file exynos_usb3.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 03-Jul-2018  jmcneill branches: 1.2.2; 1.2.6; 1.2.16;
Fix value of PHY_CLK_RST_FSEL_24M, USB2 on XHCI works now.
 1.1 03-Jul-2018  jmcneill Add support for Samsung Exynos USB.
 1.2.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 03-Jul-2018  christos file exynos_usbdrdphy.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.2.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.2.2.1 03-Jul-2018  pgoyette file exynos_usbdrdphy.c was added on branch pgoyette-compat on 2018-07-28 04:37:29 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 03-Jul-2018  jmcneill branches: 1.2.12;
Add support for Samsung Exynos USB.
 1.1 27-Dec-2015  marty branches: 1.1.2; 1.1.18; 1.1.20; 1.1.22;
XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.1.22.1 10-Jun-2019  christos Sync with HEAD
 1.1.20.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 27-Dec-2015  jdolecek file exynos_usbphy.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.2.2 19-Mar-2016  skrll Sync with HEAD
 1.1.2.1 27-Dec-2015  skrll file exynos_usbphy.c was added on branch nick-nhusb on 2016-03-19 11:29:57 +0000
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.29 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.28 20-Mar-2020  skrll branches: 1.28.4;
Support Exynos 5410 GPIO
 1.27 08-Oct-2018  skrll branches: 1.27.4;
Remove a build dependency on SOC_EXYNOS4 and SOC_EXYNOS5. Now runtime.
 1.26 14-Sep-2018  skrll exynos_bootstrap doesn't need an argument
 1.25 19-Aug-2018  skrll Some changes to bring back exynos4 support and make exynos5 support more
modern/generic

- Provide a exynos_platform_early_putchar based on CONSADDR and remove
EXYNOS_CONSOLE_EARLY
- Provide devmaps for exynos4 and exynos5
- Simplify exynos_bootstrap
- Update exynos_start.S to use exynos_platform_early_putchar - this
needs a fix in a9_subr.S for arm_cpuinit to save lr in a callee save
register and not use ip. Maybe this change is safe now, but too much
testing required to commit it now.
 1.24 02-Jul-2018  jmcneill Make the pinctrl driver actually work.
 1.23 30-Dec-2015  marty branches: 1.23.16; 1.23.18;
XU4 i2c, gpio & pinctrl changes

modify exynos_gpio.c to support the new pinctrl model.
set up the new pinctrl model in exynos_pinctrl.c

Flesh out exynos_i2c.c and set it up to use the new pinctrl model. NOTE:
exynos_i2c.c is still incomplete. I need to figure out what to set the
prescaler and scaler to.
 1.22 24-Dec-2015  marty XU4 GPIO Review Changes

Implement suggestions from Jared.
 1.21 19-Dec-2015  marty XU4 GPIO FDT broken snapshot

This is broken. exynos_gpio_bank_config and the call to it are wrong, and
the acquire function doesn't work.

But I'm in over my head and I need to discuss this:

There is a problem with the dtd: it doesn't have addresses for the individual
gpios. Do I add the addresses to it, or go back to the old version where I
have them hard coded in the driver.

There is a problem with creating the gpio device entries: I suspect I really
need to treat the pinctrl devices as busses and create the gpios as attached
to those busses, but I'm not familiar with how to do that in NetBSD. At the
minimum, a pointer to a similar situation would give me code to follow.
This is different than the usual bus attachment in that the gpios aren't
devices in the dtd (they don't have "compatible" properties) so they don't
get an attach routine called. An alternative to generating the bus
attachments might be to add "compatible" properties to the GPIO entries
in the dtd. so that they do get attached in the normal way.

If I'm going to modify the DTD, then it should be checked in, so a decision
on where to check them in would be nice, even if it does mean spreading them
all over because of license issues. (This DTD is GPL v2)
 1.20 15-Dec-2015  marty XU4 FDT -- fix bus tags

I got away with not having the generic bus tags for getting minimum fdt to
work; but for real drivers have to actually have them. Make necessary
corrections.
 1.19 11-Dec-2015  marty EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.18 30-Sep-2014  reinoud branches: 1.18.2;
arch/arm/samsung/ cleanup : move SoC specific power and phy routines into
exynos_soc.c and move Odroid board specific tweaks to odroid_machdep.c
 1.17 30-Sep-2014  reinoud Provide exynos_sysreg_bsh as a global bus_space_subregion
 1.16 29-Sep-2014  reinoud Phase 2 of samsung/exynos_* cleanup
 1.15 05-Sep-2014  skrll RCSId police
 1.14 02-Sep-2014  reinoud Add CPU descriminator _P() for Exynos 5422
 1.13 28-Aug-2014  reinoud Implement CPU speed control for Exynos4 and Exynos5 CPUs using APLL frequency
adjustment.
 1.12 11-Jun-2014  reinoud branches: 1.12.2; 1.12.4; 1.12.6;
Remove the exyo_usb_locinfo structure as exyousb becomes usb2 only
 1.11 06-Jun-2014  reinoud Revisit Exynos USB system implementing usb2phy support for Exynos4.
 1.10 21-May-2014  reinoud branches: 1.10.2;
Rework USB2 attachment using a dedicated usb devices locator. This allows for
the more tightly coupled Exynos{4,5} usb2/usb2otg/usb3 controllers to share
memory spaces and IRQs

Note, currently only USB2 host is implemented.
 1.9 16-May-2014  reinoud branches: 1.9.2;
Add i2c locators, add a i2c bus indexer and provide function prototype for the
pinset to pindata function.
 1.8 10-May-2014  reinoud Implement evbarm_device_register_post_config() hook for odroid and its
decendents. This allows post attach actions on every level of the machine
support.
 1.7 10-May-2014  reinoud Change int->void
sorry about the noise
 1.6 10-May-2014  reinoud Add exynos_gpio_pindata_ctl() analog to _pindata__read() and _pindata_write()
 1.5 09-May-2014  reinoud Implement gpio framework for the Samsung Exynos series.

Note that only the Exynos4 gpio registers are defined now and provision is
taken to allow for seamlessness adding of Exynos5 values.
 1.4 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.3 13-Apr-2014  reinoud Remove trustzone firmware indirect calls by explicit calling the exynos
routines in exynos_soc.c

While here, also remove unused variable conaddr
 1.2 13-Apr-2014  reinoud Redefine IS_EXYNOS4_P() to check for the product family instead of summing up
variants
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.9.2.2 18-May-2014  rmind sync with head
 1.9.2.1 16-May-2014  rmind file exynos_var.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.10.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.10.2.1 21-May-2014  yamt file exynos_var.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.12.6.3 03-Dec-2017  jdolecek update from HEAD
 1.12.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.6.1 11-Jun-2014  tls file exynos_var.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.12.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.12.2.2 10-Aug-2014  tls Rebase.
 1.12.2.1 11-Jun-2014  tls file exynos_var.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.18.2.2 19-Mar-2016  skrll Sync with HEAD
 1.18.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.23.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23.18.1 10-Jun-2019  christos Sync with HEAD
 1.23.16.4 20-Oct-2018  pgoyette Sync with head
 1.23.16.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.23.16.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.23.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.27.4.1 21-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #798):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.17
sys/arch/arm/samsung/exynos_pinctrl.h: revision 1.3
sys/arch/arm/samsung/exynos_gpio.c: revision 1.27
sys/arch/arm/samsung/exynos_gpio.c: revision 1.28
sys/arch/arm/samsung/exynos_gpio.c: revision 1.29
sys/arch/arm/samsung/exynos_var.h: revision 1.28

Use __BIT/__SHIFTOUT some more. NFCI.

G/C

Support Exynos 5410 GPIO
 1.28.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 18-Oct-2019  skrll branches: 1.11.8;
Use PRIxBUSADDR
 1.10 07-Jan-2016  marty branches: 1.10.18;
Exynos WDT - change the compatible string to match the current dts
 1.9 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.8 15-Dec-2015  marty XU4 FDT WDT - convert driver to FDT

The watchdog timer is the most trivial driver in exynos, from the POV of
converting to FDT, so go ahead and do it first. NOTE: There's a hack in
the driver that needs to eventually be fixed -- the clock frequency is
hardwired when it should be gotten from the clock in the device tree. I'll
come back and fix this when I'm more comfortable with the api.
 1.7 13-Dec-2015  marty undo 'typo' fix and restore 'frequency' to dictionary

Oops. The 'typo' was elsewhere and I accidently removed setting
the frequency. Fix that.
 1.6 10-Dec-2015  marty Fix a typo
 1.5 29-Sep-2014  reinoud branches: 1.5.2;
Phase 2 of samsung/exynos_* cleanup
 1.4 19-Apr-2014  reinoud branches: 1.4.2; 1.4.4; 1.4.6; 1.4.8; 1.4.10;
Move the watchdog registers back to the exynos_reg.h
 1.3 19-Apr-2014  reinoud Move the WDT register definitions to the C source to unclutter the directory
 1.2 18-Apr-2014  reinoud Fix attachment of wdt to also use the bus_space_handle

While here, move the registers outside the global register file to a separate
wdt_reg.h file.
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.4.10.3 03-Dec-2017  jdolecek update from HEAD
 1.4.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 19-Apr-2014  tls file exynos_wdt.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.4.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.4.6.2 10-Aug-2014  tls Rebase.
 1.4.6.1 19-Apr-2014  tls file exynos_wdt.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.4.4.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.4.4.1 19-Apr-2014  yamt file exynos_wdt.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 19-Apr-2014  rmind file exynos_wdt.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.5.2.2 19-Mar-2016  skrll Sync with HEAD
 1.5.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 19-Apr-2014  reinoud Move the WDT register definitions to the C source to unclutter the directory
 1.1 18-Apr-2014  reinoud Fix attachment of wdt to also use the bus_space_handle

While here, move the registers outside the global register file to a separate
wdt_reg.h file.
 1.38 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.37 29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.36 03-Jan-2019  jmcneill Add multi-cluster CPU spinup code for Exynos5422.
 1.35 21-Nov-2018  skrll G/C
 1.34 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.33 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.32 11-Sep-2018  jmcneill Add Exynos5 SMP support.
 1.31 19-Aug-2018  skrll Some changes to bring back exynos4 support and make exynos5 support more
modern/generic

- Provide a exynos_platform_early_putchar based on CONSADDR and remove
EXYNOS_CONSOLE_EARLY
- Provide devmaps for exynos4 and exynos5
- Simplify exynos_bootstrap
- Update exynos_start.S to use exynos_platform_early_putchar - this
needs a fix in a9_subr.S for arm_cpuinit to save lr in a callee save
register and not use ip. Maybe this change is safe now, but too much
testing required to commit it now.
 1.30 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.29 04-Jul-2018  jmcneill Add driver for Exynos PWM timer.
 1.28 03-Jul-2018  jmcneill Add support for Samsung Exynos USB.
 1.27 02-Jul-2018  jmcneill Attach mct early. Do not attach gtmr to mct.

XXX gtmr still needed for setstatclock symbol
 1.26 01-Jul-2018  jmcneill Delete chipid and sysmmu drivers, they don't do anything but print that
they are not implemented at attach time.
 1.25 17-Mar-2018  ryo branches: 1.25.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.24 20-Jun-2017  jmcneill branches: 1.24.4;
Add Exynos 5410 clock controller driver.
 1.23 11-Jun-2017  jmcneill Simplify MCT; just enable it and then attach an ARMv7 generic timer.
 1.22 10-Jun-2017  jmcneill Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.21 03-Jan-2016  marty branches: 1.21.10;
XU4 interrupt combiner / fake sysmmu

Add sysmmu to have something that calls through to the combiner's establish
routine. Debug the combiner with it.

At this point the combiner is mostly done, but the interrupt handler has not
been tested. This may never happen as we may never support any of the
devices that use the combiner for interrupts. (Or maybe mct)
 1.20 27-Dec-2015  marty XU4 USB snapshot: Reorganize source files

This is just a skeleton, not a set of drivers, but the pieces are now
more or less in the right places.
 1.19 26-Dec-2015  jmcneill Add dwcmmc glue
 1.18 24-Dec-2015  marty XU4 GPIO Review Changes

Implement suggestions from Jared.
 1.17 21-Dec-2015  marty XU4 FDT final checkpoint

step N of N: get rid of baggage by removing whole files. What's left is in
approximately the same shape as when the FDT update started, that is mostly
broken. What's missing is most of the 76 devices recognized in the dtd. In
other words, This is barely the start of a port.

Next up, gpio then i2c, followed either by straightening out usb or getting
the sdhc driver to work -- both probably require getting the interrupt
combiner to work first. A large chunk of work is left to do on the clocks.
I barely got them attaching to fdt and didn't do anything to take advantage
of the information in the dtd.

None of the other existing drivers, such as they are, properly request gpios,
i2c or clocks, and, of course power domains are off the table.
 1.16 21-Dec-2015  marty XU4 FDT Last drivers converted

There is a minimum conversion on the clock driver.

The USB driver needs reordering and is broken, but it was broken before.

Next up: tactical nuclear weapons
 1.15 21-Dec-2015  marty XU4 FDT checkpoint

It is rather amazing that XU4 gets as far as it does, given how much of this
code simply doesn't work. Focusing now on getting everything converted to
FDT. Next up USB and clocks. After that nuke everything that's not needed
and start the port in earnest.
 1.14 19-Dec-2015  marty XU4 GPIO FDT broken snapshot

This is broken. exynos_gpio_bank_config and the call to it are wrong, and
the acquire function doesn't work.

But I'm in over my head and I need to discuss this:

There is a problem with the dtd: it doesn't have addresses for the individual
gpios. Do I add the addresses to it, or go back to the old version where I
have them hard coded in the driver.

There is a problem with creating the gpio device entries: I suspect I really
need to treat the pinctrl devices as busses and create the gpios as attached
to those busses, but I'm not familiar with how to do that in NetBSD. At the
minimum, a pointer to a similar situation would give me code to follow.
This is different than the usual bus attachment in that the gpios aren't
devices in the dtd (they don't have "compatible" properties) so they don't
get an attach routine called. An alternative to generating the bus
attachments might be to add "compatible" properties to the GPIO entries
in the dtd. so that they do get attached in the normal way.

If I'm going to modify the DTD, then it should be checked in, so a decision
on where to check them in would be nice, even if it does mean spreading them
all over because of license issues. (This DTD is GPL v2)
 1.13 17-Dec-2015  marty EXYNOS FDT sscom
 1.12 15-Dec-2015  marty XU4 FDT WDT - convert driver to FDT

The watchdog timer is the most trivial driver in exynos, from the POV of
converting to FDT, so go ahead and do it first. NOTE: There's a hack in
the driver that needs to eventually be fixed -- the clock frequency is
hardwired when it should be gotten from the clock in the device tree. I'll
come back and fix this when I'm more comfortable with the api.
 1.11 14-Dec-2015  marty XU4 FDT Enable the minimum device tree

This enables the use of FDT on the XU4 but doesn't add any drivers. However,
with this check in, XU4 becomes useless without a device tree blob from the
Linux tree, which isn't checked in anywhere.
 1.10 12-Dec-2015  marty XU4: re-enable gpio

c'n'p error left gpio disabled. fixed.
 1.9 11-Dec-2015  marty Move everything back into files.exynos
 1.8 05-Dec-2015  jmcneill Add clock controller backend for Exynos5422. Work in progress.
 1.7 21-May-2014  reinoud branches: 1.7.2; 1.7.4; 1.7.8; 1.7.10;
Provide bitbanging IIC for Samsung's Exynos
 1.6 09-May-2014  reinoud branches: 1.6.2;
Implement gpio framework for the Samsung Exynos series.

Note that only the Exynos4 gpio registers are defined now and provision is
taken to allow for seamlessness adding of Exynos5 values.
 1.5 05-May-2014  reinoud exywdt -> exyowdt
 1.4 29-Apr-2014  reinoud Commit initial USB adapter support and associated DMA tags
 1.3 22-Apr-2014  reinoud Missing EOL at end of file
 1.2 13-Apr-2014  reinoud Remove trustzone firmware indirect calls by explicit calling the exynos
routines in exynos_soc.c

While here, also remove unused variable conaddr
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.6.2.2 18-May-2014  rmind sync with head
 1.6.2.1 09-May-2014  rmind file files.exynos was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.7.10.3 28-Aug-2017  skrll Sync with HEAD
 1.7.10.2 19-Mar-2016  skrll Sync with HEAD
 1.7.10.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.7.8.3 03-Dec-2017  jdolecek update from HEAD
 1.7.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.8.1 21-May-2014  tls file files.exynos was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.7.4.2 10-Aug-2014  tls Rebase.
 1.7.4.1 21-May-2014  tls file files.exynos was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.7.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.7.2.1 21-May-2014  yamt file files.exynos was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.21.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.24.4.7 18-Jan-2019  pgoyette Synch with HEAD
 1.24.4.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.24.4.5 20-Oct-2018  pgoyette Sync with head
 1.24.4.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.24.4.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.24.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.24.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.25.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 11-Dec-2015  marty Move everything back into files.exynos
 1.1 05-Dec-2015  jmcneill Add clock controller backend for Exynos5422. Work in progress.
 1.21 03-Mar-2022  riastradh arm: Use device_set_private for various drivers.
 1.20 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.19 24-Apr-2021  thorpej branches: 1.19.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.18 14-Mar-2021  skrll branches: 1.18.2;
Use fdtbus_intr_establish_xname
 1.17 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.16 18-Oct-2019  skrll branches: 1.16.8;
Use PRIxBUSADDR
 1.15 11-Sep-2018  jmcneill Add Exynos5 SMP support.
 1.14 02-Jul-2018  jmcneill Add a proper MCT driver rather than relying on ARM Generic Timer (which
may not be functional or even present).
 1.13 01-Jul-2018  jmcneill Add missing call to arm_fdt_timer_register
 1.12 11-Jun-2017  jmcneill branches: 1.12.4; 1.12.6;
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
 1.11 11-Jun-2017  jmcneill Add delay and enable mct timecounter.
 1.10 07-Jan-2016  marty branches: 1.10.10;
exynos mct -- snapshot

This code is still a mess, but at least it uses an interrupt-map so I can
use it to test whether interrupt-map handling in fdt_intr_ is working
properly.

Need to get some real documentation and redo this so it works. :(
 1.9 05-Jan-2016  marty FDT: Interrupts -- add support for interrupt maps

The mct on exynos uses an interrupt map so we add support now. Devices
represent their interrupts either through a combination of interrupt-parent
and interrupts properties, where the 'interrupts' property is an array of
one or more interrupt specifiers; or through a combination of an
interrupt-parent that points to an interrupt-map, where the interrupt-map
contains 2 or more entries consisting of an index, a pointer to an
interrupt-controller, and a specifier for that controller.

This code adds the ability to walk the interrupt-map and return a specifier.
Unfortunately, the addition requires changing the interface to the
interrupt-controllers' _establish and _intstr functions, so this check in
contains a rototill of the three existing fdt interrupt controllers to use
the new interface.
 1.8 03-Jan-2016  marty XU4 interrupt combiner / fake sysmmu

Add sysmmu to have something that calls through to the combiner's establish
routine. Debug the combiner with it.

At this point the combiner is mostly done, but the interrupt handler has not
been tested. This may never happen as we may never support any of the
devices that use the combiner for interrupts. (Or maybe mct)
 1.7 21-Dec-2015  marty XU4 FDT missed files
 1.6 11-Dec-2015  marty EXYNOS Rewrite step 2 of N: New exynos_gpio.c

I can't bring myself to fully nuke from orbit, so there are really two
things in this checkin:

1) A major rewrite of exynos_gpio.c, based mostly on the Nvidia
tegra_gpio.c file. This is missing a major function that will be
added the first time a customer for it is integrated, which is meant to
select pins based on aliases, rather than pin bank names.

2) A small number of changes to other files that keep the tree compiling
and progressing as far as ever; except it is now 5422 specific and
will not boot on the other exynos socs, which I don't have hardware to
test.

The choice to remove functionality is always controversial, but since
we are doing a significant rewrite and I don't have either
documentation or hardware *and* none of the code really works now
anyway, I'm taking the stance that only tested functionality should be
added, and that we'll layer the other exynos socs on this once it
fully boots.
 1.5 28-Aug-2014  snj branches: 1.5.2;
tyop police
 1.4 28-Aug-2014  reinoud Substract just one each time instead of the periods missed. This will create a
more even representation of missed interrupts.

Also fix typo
 1.3 08-Aug-2014  reinoud branches: 1.3.2; 1.3.4; 1.3.6;
Fix missed clock interrupts calculation
 1.2 09-May-2014  reinoud branches: 1.2.2; 1.2.4;
Implement heartbeat LED using the new gpio subsystem
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 09-May-2014  yamt file mct.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 09-May-2014  rmind file mct.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.3.6.3 03-Dec-2017  jdolecek update from HEAD
 1.3.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 08-Aug-2014  tls file mct.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.3.4.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.3.2.2 10-Aug-2014  tls Rebase.
 1.3.2.1 08-Aug-2014  tls file mct.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.5.2.3 28-Aug-2017  skrll Sync with HEAD
 1.5.2.2 19-Mar-2016  skrll Sync with HEAD
 1.5.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.10.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.12.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.6.1 10-Jun-2019  christos Sync with HEAD
 1.12.4.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.12.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.16.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.18.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.19.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 05-Sep-2014  skrll RCSId police
 1.1 13-Apr-2014  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 13-Apr-2014  tls file mct_reg.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 13-Apr-2014  tls file mct_reg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 13-Apr-2014  yamt file mct_reg.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 13-Apr-2014  rmind file mct_reg.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.6 02-Jul-2018  jmcneill Add a proper MCT driver rather than relying on ARM Generic Timer (which
may not be functional or even present).
 1.5 11-Jun-2017  jmcneill branches: 1.5.4; 1.5.6;
Add delay and enable mct timecounter.
 1.4 21-Dec-2015  marty branches: 1.4.10;
XU4 FDT missed files
 1.3 05-Sep-2014  skrll branches: 1.3.2;
RCSId police
 1.2 09-May-2014  reinoud branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Implement heartbeat LED using the new gpio subsystem
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 09-May-2014  tls file mct_var.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.2.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.2.6.2 10-Aug-2014  tls Rebase.
 1.2.6.1 09-May-2014  tls file mct_var.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 09-May-2014  yamt file mct_var.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 09-May-2014  rmind file mct_var.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.5.6.1 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 05-Sep-2014  skrll RCSId police
 1.1 13-Apr-2014  matt branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 13-Apr-2014  tls file smc.h was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.1.8.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.1.6.2 10-Aug-2014  tls Rebase.
 1.1.6.1 13-Apr-2014  tls file smc.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.1.4.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.1.4.1 13-Apr-2014  yamt file smc.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.1.2.2 18-May-2014  rmind sync with head
 1.1.2.1 13-Apr-2014  rmind file smc.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.11 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.10 04-Jul-2018  jmcneill Only process a tx or rx interrupt if the pending bit is set.
 1.9 10-Jun-2017  jmcneill branches: 1.9.4; 1.9.6;
Get the EXYNOS kernel building again with recent FDT changes. Untested.
 1.8 13-Apr-2015  riastradh branches: 1.8.10;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.7 02-Oct-2014  skrll branches: 1.7.2;
Fix reinoud-ification.

My odroid-xu has console again.
 1.6 10-Aug-2014  tls branches: 1.6.2; 1.6.4;
Merge tls-earlyentropy branch into HEAD.
 1.5 20-Apr-2014  matt branches: 1.5.2; 1.5.4; 1.5.6;
Allow setting of console speed in init.
 1.4 18-Apr-2014  reinoud Second handle to bus_space_read_* is the bus_space_handle, not a repeat of the
bus_space_tag
 1.3 16-Apr-2014  reinoud Teach sscom attachment, also the console, to use the busspace handle of the
main register space.

While here, map in the correct amount of memory or bus_space_map() won't
return an error but will wedge the system.
 1.2 14-Apr-2014  reinoud Implement sscom interrupt masking and acknowledgement routines
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.5.6.2 10-Aug-2014  tls Rebase.
 1.5.6.1 20-Apr-2014  tls file sscom.c was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.5.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 20-Apr-2014  yamt file sscom.c was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.5.2.2 18-May-2014  rmind sync with head
 1.5.2.1 20-Apr-2014  rmind file sscom.c was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.6.4.3 03-Dec-2017  jdolecek update from HEAD
 1.6.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.4.1 10-Aug-2014  tls file sscom.c was added on branch tls-maxphys on 2014-08-20 00:02:47 +0000
 1.6.2.1 04-Jan-2015  martin Pull up the following revisions, requested by skrll in #373:

sys/arch/arm/samsung/exynos4_loc.c 1.10-1.11
sys/arch/arm/samsung/exynos4_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos5_loc.c 1.8-1.12
sys/arch/arm/samsung/exynos5_reg.h 1.11-1.20
sys/arch/arm/samsung/exynos_gpio.c 1.7-1.12
sys/arch/arm/samsung/exynos_i2c.c 1.2-1.3
sys/arch/arm/samsung/exynos_intr.h 1.2
sys/arch/arm/samsung/exynos_io.c 1.7-1.8
sys/arch/arm/samsung/exynos_io.h 1.5-1.6
sys/arch/arm/samsung/exynos_reg.h 1.8-1.13
sys/arch/arm/samsung/exynos_smc.S 1.2-1.3
sys/arch/arm/samsung/exynos_soc.c 1.15-1.27
sys/arch/arm/samsung/exynos_usb.c 1.8-1.13
sys/arch/arm/samsung/exynos_var.h 1.13-1.18
sys/arch/arm/samsung/exynos_wdt.c 1.5
sys/arch/arm/samsung/mct.c 1.4-1.5
sys/arch/arm/samsung/mct_reg.h 1.2
sys/arch/arm/samsung/mct_var.h 1.3
sys/arch/arm/samsung/smc.h 1.2
sys/arch/arm/samsung/sscom.c 1.7
sys/arch/evbarm/odroid/odroid_machdep.c 1.25-1.39
sys/arch/evbarm/odroid/odroid_start.S 1.4-1.6
sys/arch/evbarm/conf/std.odroid 1.3-1.5
sys/arch/evbarm/conf/ODROID delete
sys/arch/evbarm/conf/ODROID-U 1.10-1.17
sys/arch/evbarm/conf/ODROID_INSTALL delete
sys/arch/evbarm/conf/ODROID-XU 1.1-1.4

Improve ODROID support.
 1.7.2.2 28-Aug-2017  skrll Sync with HEAD
 1.7.2.1 06-Jun-2015  skrll Sync with HEAD
 1.8.10.1 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.9.6.1 10-Jun-2019  christos Sync with HEAD
 1.9.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4 13-Sep-2021  jmcneill Add support for Apple M1 debug UART.
 1.3 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.2 14-Apr-2014  reinoud branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.34; 1.2.36;
Implement sscom interrupt masking and acknowledgement routines
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.2.36.1 10-Jun-2019  christos Sync with HEAD
 1.2.34.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 14-Apr-2014  tls file sscom_reg.h was added on branch tls-maxphys on 2014-08-20 00:02:48 +0000
 1.2.6.2 10-Aug-2014  tls Rebase.
 1.2.6.1 14-Apr-2014  tls file sscom_reg.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 14-Apr-2014  yamt file sscom_reg.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.2.2.2 18-May-2014  rmind sync with head
 1.2.2.1 14-Apr-2014  rmind file sscom_reg.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.6 05-Jul-2018  jmcneill Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
 1.5 04-Jul-2018  jmcneill Only process a tx or rx interrupt if the pending bit is set.
 1.4 14-Apr-2015  riastradh branches: 1.4.16; 1.4.18;
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.3 16-Apr-2014  reinoud branches: 1.3.2; 1.3.4; 1.3.6; 1.3.10; 1.3.12;
Teach sscom attachment, also the console, to use the busspace handle of the
main register space.

While here, map in the correct amount of memory or bus_space_map() won't
return an error but will wedge the system.
 1.2 14-Apr-2014  reinoud Implement sscom interrupt masking and acknowledgement routines
 1.1 13-Apr-2014  matt Add initial support for the ODROID-XU and ODROID-U3.
Still a work in progress. Started by nick and reinoud.
 1.3.12.1 06-Jun-2015  skrll Sync with HEAD
 1.3.10.3 03-Dec-2017  jdolecek update from HEAD
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 16-Apr-2014  tls file sscom_var.h was added on branch tls-maxphys on 2014-08-20 00:02:48 +0000
 1.3.6.2 10-Aug-2014  tls Rebase.
 1.3.6.1 16-Apr-2014  tls file sscom_var.h was added on branch tls-earlyentropy on 2014-08-10 06:53:52 +0000
 1.3.4.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.3.4.1 16-Apr-2014  yamt file sscom_var.h was added on branch yamt-pagecache on 2014-05-22 11:39:34 +0000
 1.3.2.2 18-May-2014  rmind sync with head
 1.3.2.1 16-Apr-2014  rmind file sscom_var.h was added on branch rmind-smpnet on 2014-05-18 17:44:59 +0000
 1.4.18.1 10-Jun-2019  christos Sync with HEAD
 1.4.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.12 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.11 01-Feb-2022  nisimura retire SocioNext AVE 32/64 GbE driver
 1.10 03-Dec-2021  nisimura retire sni_exiu.c in favour of ACPI0013 generic event device implemented
by dev/acpi/acpi_ged.c
 1.9 19-Mar-2020  nisimura branches: 1.9.4;
make sni_exiu.c fdt/ACPI dual attach device
 1.8 19-Mar-2020  nisimura make sni_gpio.c fdt/ACPI dual attach device
 1.7 18-Mar-2020  nisimura add SynQuacer EXIU external IRQ unit driver desciption
 1.6 18-Mar-2020  nisimura uncomment sniemmc and sniiic devices
 1.5 18-Mar-2020  nisimura more fdt/ACPI dual attach glue. SCX0002 and SCX0003 respectively
 1.4 18-Mar-2020  nisimura add ACPI attachment glue.
SynQuacer/SC2A11 has UEFI/tainocore firmware which is able to select
either FDT format or ACPI format for device description.
 1.3 17-Mar-2020  nisimura step forward to fdt/ACPI dual attach device
 1.2 16-Mar-2020  nisimura add a missing line
 1.1 15-Mar-2020  nisimura driver description file for Socionext products
 1.9.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.4.1 19-Mar-2020  martin file files.sociox was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.23 01-Feb-2022  nisimura retire SocioNext AVE 32/64 GbE driver
 1.22 31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.21 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.20 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.19 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.18 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.17 23-Sep-2020  nisimura branches: 1.17.2;
note more about AVE EMAC design
 1.16 27-Mar-2020  nisimura branches: 1.16.4;
extend mii_statchg() to use ether_mediachange(). care about hash filter selection.
 1.15 24-Mar-2020  nisimura correct inverted logic to determine RMII/MII
 1.14 23-Mar-2020  nisimura adapt dual descriptor design both for AVE64 and AVE32
 1.13 23-Mar-2020  nisimura replace some macro names for descriptor management
 1.12 23-Mar-2020  nisimura use sc_100mii variable name for RMII/MII
 1.11 23-Mar-2020  nisimura manifest non-MP_SAFE
 1.10 22-Mar-2020  nisimura improve comments
 1.9 22-Mar-2020  nisimura - move sc_flowflags = 0 line at earlier place.
- handle a set of speed selection operations.
 1.8 21-Mar-2020  nisimura - handle register adjustment when link speed change.
- make some more care on reset operation.
 1.7 21-Mar-2020  nisimura - add one more missing RXC_EN.
- handle link speed change.
- fix genmask0() bit mask generation error.
 1.6 21-Mar-2020  nisimura make comments about descriptor storage design detail
 1.5 21-Mar-2020  nisimura more on toward dual descriptor design
 1.4 21-Mar-2020  nisimura - add missing RXC_EN bit to resume receiving.
- an inch forward to absorb incompatible descriptor designs.
 1.3 20-Mar-2020  nisimura use correct product name. still unfinished
 1.2 20-Mar-2020  nisimura remove #ifdef _LP64 as jmcneil@ suggested
 1.1 20-Mar-2020  nisimura Socionext AVE GbE driver for UniPhier SoC family.
 1.16.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.4.1 27-Mar-2020  martin file if_ave.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.17.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.44 29-Jun-2024  riastradh scx(4): Fix if_statinc call.

We don't have a reference to the local statistics counters, so we
can't use if_statinc_ref. But, because net_stat_ref_t is just an
alias for void *, the compiler doesn't detect this mistake.

PR kern/58380
 1.43 15-Jun-2023  nisimura if_scx.c
 1.42 14-Jun-2023  nisimura force PHY loopback while uengine reloading process as tianocore/EDK2 UEFI
mentions. A piece of comment updates.
 1.41 13-Jun-2023  nisimura major code quality improvements, descriptive comments, code density.
 1.40 21-May-2023  nisimura small fixes, code shuffle for ease of understanding.
 1.39 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.38 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.37 12-Jun-2022  andvar fix few typos in comments.
 1.36 27-Jan-2022  nisimura always use mac_write/read to handle DWC registers
 1.35 25-Jan-2022  nisimura - don't put const for CFATTACH_DECL_NEW()
- MDIO now senses PHY correctly.
 1.34 31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.33 21-Dec-2021  nisimura pursue better register description
 1.32 21-Dec-2021  nisimura correct register definition error and improve naming
 1.31 21-Dec-2021  nisimura add interrupt logic stuff
 1.30 20-Dec-2021  nisimura - iron out attach error case messages
- use 64-bit paddr bus_dma_tag
- dig and decode FDT "clock-frequency" value
 1.29 20-Dec-2021  nisimura development snapshot; endianness and others.
 1.28 20-Dec-2021  nisimura fix and improve register definitions
 1.27 16-Dec-2021  nisimura interlim commit to snapshot SC2A11 GbE progress.
 1.26 16-Dec-2021  nisimura improve SC2A11 hardware register description.
 1.25 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.24 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.23 10-Oct-2020  nisimura branches: 1.23.2;
reorder functions for better relevance
 1.22 28-Mar-2020  nisimura branches: 1.22.4;

- comb down rcvfilt() filter adjustment logic.
- some mii_statchg() can be written in simpler form.
 1.21 27-Mar-2020  nisimura extend mii_statchg() to use ether_mediachange(). care about hash filter selection.
 1.20 27-Mar-2020  nisimura try to be better register descriptions
 1.19 27-Mar-2020  nisimura more register mashup work
 1.18 27-Mar-2020  nisimura register definition mashed. from UEFI and CycloneV PDF
 1.17 26-Mar-2020  nisimura update register definition. from UEFI source code.
 1.16 26-Mar-2020  nisimura correct global reset logic. still remains MII speed trouble.
 1.15 26-Mar-2020  nisimura adjust minor comments
 1.14 25-Mar-2020  nisimura use dma32 for descriptor store. likely still missing freq designation(s)
 1.13 25-Mar-2020  nisimura make sure to use mac_write() for GMACxxx registers. try to decode xMII link status report
 1.12 24-Mar-2020  nisimura add more register description
 1.11 24-Mar-2020  nisimura add more registers supposed to exist
 1.10 24-Mar-2020  nisimura fix FDT 2nd addr to map EEPROM store. mention ACPI _DSD contains FDT equiv parameters.
 1.9 24-Mar-2020  nisimura try to be consistent for the number of address match filter. tentative util the reality.
 1.8 24-Mar-2020  nisimura small knit about multicast hash table handling. use sc_100mii as bool
 1.7 24-Mar-2020  nisimura add some more findings about SC2A11 GbE. do some code steamline practice.
 1.6 23-Mar-2020  nisimura replace some macro names for descriptor management
 1.5 23-Mar-2020  nisimura do better work in ifmedia_upd. fix ucode injection.
 1.4 23-Mar-2020  nisimura try to catch RMII/MII phy condition. fix divisor cal. nuke &= 03 error
 1.3 23-Mar-2020  nisimura improve comment descriptions. DRT for ucode load
 1.2 23-Mar-2020  nisimura try to DRT about EEPROM ucode
 1.1 23-Mar-2020  nisimura Socionext "NetSec" GbE driver
 1.22.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22.4.1 28-Mar-2020  martin file if_scx.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.23.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 21-Dec-2021  nisimura improve consistency when attach error cases.
 1.9 10-Nov-2021  msaitoh s/intialize/initialize/
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 31-May-2020  thorpej branches: 1.7.2;
Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.6 25-Mar-2020  nisimura branches: 1.6.4;
DRT about config messages
 1.5 25-Mar-2020  nisimura better boot messaging, redo
 1.4 25-Mar-2020  nisimura better boot messaging
 1.3 18-Mar-2020  nisimura attempt graceful failure
 1.2 18-Mar-2020  nisimura enrich eMMC driver realities to work a bit
 1.1 18-Mar-2020  nisimura new skelton files for SC2A11 eMMC and I2C
 1.6.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.4.1 25-Mar-2020  martin file sni_emmc.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.7.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 03-Dec-2021  nisimura retire sni_exiu.c in favour of ACPI0013 generic event divice to
respond power button press.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 31-May-2020  thorpej branches: 1.4.2;
Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.3 25-Mar-2020  nisimura branches: 1.3.4;
try to DRT about config messages
 1.2 19-Mar-2020  nisimura make sni_exiu.c fdt/ACPI dual attach device
 1.1 18-Mar-2020  nisimura add skelton external IRQ unit driver and GPIO driver.
 1.3.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.1 25-Mar-2020  martin file sni_exiu.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13 25-Jan-2022  nisimura - rectify attach messages.
- abandon irq to use for now.
 1.12 21-Dec-2021  nisimura improve consistency when attach error cases.
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 27-Jan-2021  thorpej branches: 1.9.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 31-May-2020  thorpej branches: 1.8.2;
Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.7 25-Mar-2020  nisimura branches: 1.7.4;
try to DRT about config messages, redo ...
 1.6 25-Mar-2020  nisimura try to DRT about config messages
 1.5 25-Mar-2020  nisimura describe DeveloperBox pin assignment correctly
 1.4 25-Mar-2020  nisimura try to decode _DSD ACPI resource
 1.3 24-Mar-2020  nisimura try to show 32 GPIO line usage
 1.2 19-Mar-2020  nisimura make sni_gpio.c fdt/ACPI dual attach device
 1.1 18-Mar-2020  nisimura add skelton external IRQ unit driver and GPIO driver.
 1.7.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.4.1 25-Mar-2020  martin file sni_gpio.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.8.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9.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.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.17 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.16 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.15 24-Mar-2022  andvar s/interupt/interrupt/ in comments.
also add missing RCS ID in bcm53xx_reg.h and fix one more typo in there.
 1.14 22-Dec-2021  nisimura add register definitions. the design is BCM2835 I2C look-a-like.
 1.13 21-Dec-2021  nisimura improve consistency when attach error cases.
 1.12 07-Aug-2021  thorpej branches: 1.12.2;
Merge thorpej-cfargs2.
 1.11 24-Apr-2021  thorpej branches: 1.11.2; 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 27-Jan-2021  thorpej branches: 1.10.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.8 01-Jun-2020  thorpej branches: 1.8.2;
Oops, missed a line in the last change.
 1.7 31-May-2020  thorpej Remove superfluous checking for a "disable" property in the device_t
properties dictionary.
 1.6 25-Mar-2020  nisimura branches: 1.6.4;
DRT about config messages
 1.5 25-Mar-2020  nisimura better boot messaging, redo
 1.4 25-Mar-2020  nisimura better boot messaging
 1.3 18-Mar-2020  nisimura enrich I2C driver realities to work a bit
 1.2 18-Mar-2020  nisimura use correct compatible designation
 1.1 18-Mar-2020  nisimura new skelton files for SC2A11 eMMC and I2C
 1.6.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.4.1 25-Mar-2020  martin file sni_i2c.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.8.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.10.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.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.11.2.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.12.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.74 19-Sep-2025  mrg avoid various seemingly bogus warnings with GCC 14.

i couldn't see any real case for any of these issues. it seems like
the "maybe uninit" checker has gotten worse.

additionally, the "dangling pointer" checker also failing.
 1.73 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.72 20-Jul-2022  riastradh branches: 1.72.2;
drm: Use CPPFLAGS.drmkms in all local drm drivers too.

This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
 1.71 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.70 07-Nov-2021  jmcneill sunxi: ccu: add support for basic "mux" clocks
 1.69 05-May-2021  jmcneill Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.68 24-Mar-2020  tnn branches: 1.68.8;
ohci@fdt, ehci@fdt are machine independent; move from sunxi to sys/dev/fdt
 1.67 09-Dec-2019  riastradh Draft driver for Allwinner Crypto Engine.

Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)
 1.66 03-Aug-2019  tnn sun4i_spi: spi(4) driver for Allwinner A10/A20 platform
 1.65 14-Jun-2019  tnn branches: 1.65.2;
sunxihstimer: add support for Allwinner High-Speed Timer
 1.64 28-May-2019  jmcneill Add A80 USB support.
 1.63 27-May-2019  jmcneill Add apb0 and cpus clock drivers for A80
 1.62 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.61 30-Jan-2019  jmcneill branches: 1.61.2;
Add support for Allwinner A64's display pipeline.
 1.60 22-Jan-2019  jmcneill Add drivers for DE2 bus and clock controllers.
 1.59 03-Jan-2019  jmcneill Add Allwinner A80 SMP support.
 1.58 03-Jan-2019  jmcneill Add Allwinner A83T SMP support.
 1.57 01-Jun-2018  jmcneill branches: 1.57.2;
Move simplefb declaration to files.fdt
 1.56 27-May-2018  jmcneill Rename sunxi_com to dw_apb_uart and move it to dev/fdt since it is not
sunxi-specific.
 1.55 10-May-2018  jmcneill Add support for Allwinner A64 audio codec.
 1.54 06-May-2018  jmcneill Add driver for Allwinner PWM controller.
 1.53 05-May-2018  jmcneill Add driver for Allwinner A64 PRCM CCU
 1.52 02-May-2018  jmcneill Add driver for Allwinner NMI / R_INTC interrupt controller.
 1.51 02-May-2018  jmcneill Add driver for Allwinner H6 PRCM CCU.
 1.50 01-May-2018  jmcneill Add driver for Allwinner USB3 PHY.
 1.49 01-May-2018  jmcneill Add support for Allwinner H6 CCU.
 1.48 03-Apr-2018  bouyer work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.47 01-Apr-2018  bouyer Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.46 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.45 19-Mar-2018  bouyer Add some more A10/A20 clocks definitions; related to display engines.
The video PLLs requires a new clock type, SUNXI_CCU_FRACTIONAL
 1.44 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.43 07-Mar-2018  bouyer fdt-ise the allwinner can and lradc drivers.
 1.42 18-Feb-2018  jmcneill branches: 1.42.2;
Add support for Allwinner H6 CPUX and CPUS port controllers.
 1.41 14-Feb-2018  jakllsch Adjust Allwinner emac(4) drivers to be compatible with root on NFS.
 1.40 14-Feb-2018  jakllsch Adjust comment; sun4i_emac is also used on sun5i.
 1.39 31-Jan-2018  jakllsch Add sun6i SPI driver.

Currently PIO-only.
 1.38 10-Nov-2017  jmcneill branches: 1.38.2;
Allwinner NAND Flash Controller driver. Work in progress.
 1.37 23-Oct-2017  jmcneill Change SUNXI_MMC_DEBUG to a bitmask, allowing for isolation of specific
device units. Useful for debugging sdio without seeing debug spam from the
SD card.
 1.36 20-Oct-2017  jmcneill Add driver for sun4i/sun7i 10/100 Fast Ethernet controller (EMAC).
 1.35 11-Oct-2017  jmcneill Add H5 (sun50i) support.
 1.34 09-Oct-2017  jmcneill Add driver for sun4i SRAM controller.
 1.33 09-Oct-2017  jmcneill sunxits needs sysmon_envsys
 1.32 08-Oct-2017  jmcneill Add Allwinner A80 (sun9i) support.
 1.31 07-Oct-2017  jmcneill Add A31 audio codec support.
 1.30 07-Oct-2017  jmcneill Add A10/A20 SATA support
 1.29 07-Oct-2017  jmcneill Add support for sun6i/sun7i ethernet
 1.28 06-Oct-2017  jmcneill Add sun4i (A10) and sun7i (A20) GPIO support.
 1.27 06-Oct-2017  jmcneill Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.26 05-Oct-2017  jmcneill Add driver for thermal sensor controller found in Allwinner H3, A64, and
A83T SoCs.
 1.25 03-Oct-2017  jmcneill Add a simple Security ID EFUSE driver.
 1.24 30-Sep-2017  jmcneill Add support for Allwinner H3 PRCM clock controller.
 1.23 09-Sep-2017  jmcneill Add support for USB OTG controllers in "host" mode.
 1.22 07-Sep-2017  jmcneill Add support for Allwinner A64 SoCs.
 1.21 27-Aug-2017  jmcneill branches: 1.21.2;
Remove the sunxi_debe driver in favour of the more generic simplefb.
 1.20 27-Aug-2017  jmcneill Add sun4i DMA and audio codec support.
 1.19 27-Aug-2017  jmcneill Add sun5i touchscreen driver.
 1.18 26-Aug-2017  jmcneill Add a basic sun5i FB driver. This assumes that firmware (U-Boot) has
already setup the chip and re-uses the same settings / FB memory.
 1.17 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.16 06-Aug-2017  jmcneill Add support for Allwinner H3 audio codec.
 1.15 05-Aug-2017  jmcneill Add DMA controller driver for sun6i and later family SoCs.
 1.14 25-Jul-2017  jmcneill Add watchdog timer support.
 1.13 23-Jul-2017  jmcneill Add sun50i gpio and platform support.
 1.12 17-Jul-2017  jmcneill branches: 1.12.2; 1.12.4;
Add SDMMC[012] sample/output clock phase controls.
 1.11 08-Jul-2017  jmcneill Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
 1.10 07-Jul-2017  jmcneill Add A83T files
 1.9 02-Jul-2017  jmcneill Add P2WI/RSB driver, based on awin_p2wi.c.
 1.8 02-Jul-2017  jmcneill Add basic FDT GPIO support.
 1.7 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.6 01-Jul-2017  jmcneill Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.

This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
 1.5 29-Jun-2017  jmcneill Add RTC driver.
 1.4 29-Jun-2017  jmcneill Add i2c glue.
 1.3 29-Jun-2017  jmcneill Add USB stuff. Doesn't quite work yet.
 1.2 29-Jun-2017  jmcneill Add H3 MMC support
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.12.4.5 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.12.4.4 26-Jul-2017  martin Pull up following revision(s) (requested by jmcneill in ticket #159):
sys/arch/evbarm/conf/SUNXI: revision 1.18
sys/arch/arm/sunxi/sunxi_wdt.c: revision 1.1
sys/arch/arm/sunxi/files.sunxi: revision 1.14
Add watchdog timer support.
 1.12.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.12.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.12.4.1 17-Jul-2017  snj file files.sunxi was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.12.2.2 17-Jul-2017  jmcneill 2360748
 1.12.2.1 17-Jul-2017  jmcneill file files.sunxi was added on branch perseant-stdc-iso10646 on 2017-07-17 23:26:18 +0000
 1.21.2.2 28-Aug-2017  skrll Sync with HEAD
 1.21.2.1 27-Aug-2017  skrll file files.sunxi was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.38.2.2 03-Dec-2017  jdolecek update from HEAD
 1.38.2.1 10-Nov-2017  jdolecek file files.sunxi was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.42.2.8 26-Jan-2019  pgoyette Sync with HEAD
 1.42.2.7 18-Jan-2019  pgoyette Synch with HEAD
 1.42.2.6 25-Jun-2018  pgoyette Sync with HEAD
 1.42.2.5 21-May-2018  pgoyette Sync with HEAD
 1.42.2.4 02-May-2018  pgoyette Synch with HEAD
 1.42.2.3 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.42.2.2 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.42.2.1 15-Mar-2018  pgoyette Synch with HEAD
 1.57.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.57.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.57.2.1 10-Jun-2019  christos Sync with HEAD
 1.61.2.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.65.2.1 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.68.8.1 13-May-2021  thorpej Sync with HEAD.
 1.72.2.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.16 27-Jan-2021  thorpej branches: 1.16.16;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.14 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.13 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.12 07-May-2020  jmcneill branches: 1.12.2;
Add A20 CLK_OUT_A and CLK_OUT_B clocks
 1.11 01-Aug-2019  tnn sun4i: enable clocks for SPI[0-3], needed by sun4i_spi
 1.10 22-Jan-2019  jmcneill branches: 1.10.4;
Add sun50i DE clocks.
 1.9 02-Apr-2018  bouyer branches: 1.9.2;
Add missing A10_RST_LVDS entry
fix sun4i_a10_ac_dig_table[] with values from arm/allwinner/,
audio plays at the right rate again on my lime2
 1.8 01-Apr-2018  bouyer Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.7 19-Mar-2018  bouyer Add some more A10/A20 clocks definitions; related to display engines.
The video PLLs requires a new clock type, SUNXI_CCU_FRACTIONAL
 1.6 16-Dec-2017  jmcneill branches: 1.6.2;
Add PLL1 table entry for 624 MHz
 1.5 13-Nov-2017  jmcneill branches: 1.5.2;
add NAND module clock
 1.4 09-Oct-2017  jmcneill Add A10/A20 cpufreq scaling support
 1.3 07-Oct-2017  jmcneill Add A10/A20 SATA support
 1.2 07-Oct-2017  jmcneill Add mmc sample and output phase clocks
 1.1 06-Oct-2017  jmcneill Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 13-Nov-2017  jdolecek file sun4i_a10_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.6.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.6.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.6.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.10.4.1 07-May-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #891):

sys/arch/arm/sunxi/sun4i_a10_ccu.c: revision 1.12

Add A20 CLK_OUT_A and CLK_OUT_B clocks
 1.12.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16.16.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.1 06-Oct-2017  jmcneill branches: 1.1.2;
Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 06-Oct-2017  jdolecek file sun4i_a10_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.2 27-Aug-2017  jmcneill branches: 1.2.2; 1.2.6; 1.2.8;
Setup routing at init and toggle PA mute pin (if available) for mute.
 1.1 27-Aug-2017  jmcneill Add sun4i DMA and audio codec support.
 1.2.8.1 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.2.6.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 27-Aug-2017  jdolecek file sun4i_a10_codec.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.3 03-Apr-2018  bouyer external interrupt functions are named "eint<n>" in the sunxi_gpio_pins[]
arrays, while sunxi_gpio_establish() looks for "eint".
Rename eint<n> to eint in sunxi_gpio_pins[]. Tested with an external interrupt
on PH0 on an A20.

XXX others sunxi_gpio_pins[] contains names like px_eint<n>, px being the
name of the port bank. I guess they should be renamed to "eint" too to work
with sunxi_gpio_establish() but I'm not sure the functions are really the
same, and I have no way to test.
 1.2 12-Oct-2017  jmcneill branches: 1.2.2; 1.2.4;
Fix PA16 and PA17 function 2; was reserved (NULL), should be "emac".
 1.1 06-Oct-2017  jmcneill Add sun4i (A10) and sun7i (A20) GPIO support.
 1.2.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 12-Oct-2017  jdolecek file sun4i_a10_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.4 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.3 20-Apr-2018  bouyer branches: 1.3.14;
sun4idma_halt(): do not set the control register to 0 but just clear
the LOAD bit. This is how it was done in the allwinner code.
I don't know why but without this, I could play sound (via sunxi_codec)
only once. After the call to sunxi_codec_halt_output(), subsequent play
would output only silence.
 1.2 10-Apr-2018  jmcneill Initialize DDMA_PARA_REG with a sane value
 1.1 27-Aug-2017  jmcneill branches: 1.1.2; 1.1.4;
Add sun4i DMA and audio codec support.
 1.1.4.2 22-Apr-2018  pgoyette Sync with HEAD
 1.1.4.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 27-Aug-2017  jdolecek file sun4i_dma.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.15 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.12 29-Jan-2020  thorpej branches: 1.12.6;
Adopt <net/if_stats.h>.
 1.11 28-May-2019  msaitoh branches: 1.11.4;
Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.10 23-May-2019  msaitoh Whitespace fix (mainly tabify).
 1.9 23-May-2019  msaitoh -No functional change:
- KNF
- u_int*_t -> uint*_t.
 1.8 08-May-2019  ozaki-r Protect ether_multi list

PR 54153
 1.7 22-Apr-2019  msaitoh In drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
 1.6 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.5 18-Jul-2018  sevan Be consistent among ethernet drivers on the convention for printing ethernet
addresses.

NFC
 1.4 26-Jun-2018  msaitoh branches: 1.4.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.3 12-Feb-2018  maxv branches: 1.3.2;
Another missing NULL-check.
 1.2 30-Nov-2017  jmcneill branches: 1.2.2;
report VLAN MTU capability
 1.1 20-Oct-2017  jmcneill Add driver for sun4i/sun7i 10/100 Fast Ethernet controller (EMAC).
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 30-Nov-2017  jdolecek file sun4i_emac.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.3.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.2.1 10-Jun-2019  christos Sync with HEAD
 1.11.4.1 29-Feb-2020  ad Sync with head.
 1.12.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 10-Sep-2025  thorpej Garbage-collect fdtbus_attach_spibus(). spibus_attach() does everything
now.
 1.10 10-Sep-2025  thorpej Register the SPI controller with FDT in spi_attach(), not in each
driver.
 1.9 10-Sep-2025  thorpej It is not necessary to pass the phandle separately to fdtbus_spi_*(); it
can be retrieved from the device_t.
 1.8 10-Sep-2025  thorpej Don't bother registering a function that returns a SPI controller; just
register the controller directly.
 1.7 27-Jan-2021  thorpej branches: 1.7.4; 1.7.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.5 11-Sep-2019  bouyer branches: 1.5.8; 1.5.10;
Switch to fdtbus_attach_spibus(), so spi slaves defined in the device tree
have a chance to be found.
 1.4 13-Aug-2019  tnn ensure spibus_attach_args is zero'ed
 1.3 04-Aug-2019  tnn remove useless splbio() in sunxispi_start

We raised spl already in sunxispi_transfer.
XXX spi(4) should be made MPSAFE
 1.2 03-Aug-2019  tnn make function prototype consistent
 1.1 03-Aug-2019  tnn sun4i_spi: spi(4) driver for Allwinner A10/A20 platform
 1.5.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.1 11-Sep-2019  martin file sun4i_spi.c was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.7.14.2 18-Jan-2022  thorpej G/C fdtbus_register_spi_controller(); it serves no purpose in the new
universe.
 1.7.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.7.4.1 19-May-2021  thorpej - As with i2c, just register the spi_controller directly.
- fdtbus_attach_spibus() is no longer anything other than a wrapper
around config_found(); just get rid of it and make its callers
look like all of the other SPI controller drivers.
 1.1 03-Aug-2019  tnn branches: 1.1.8;
sun4i_spi: spi(4) driver for Allwinner A10/A20 platform
 1.1.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.8.1 03-Aug-2019  martin file sun4i_spireg.h was added on branch phil-wifi on 2020-04-13 08:03:37 +0000
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 08-May-2019  isaki branches: 1.9.10;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.8 16-May-2018  jmcneill branches: 1.8.2; 1.8.4; 1.8.6;
Add mic preamp controls and unswap L/R DAC channels to ADC mixer
 1.7 16-May-2018  jmcneill Rename mic1 control to mic so audiorecord can use it
 1.6 15-May-2018  jmcneill Add outputs.mute control
 1.5 13-May-2018  jmcneill Mixer improvements:

- outputs.master switches between line and hp volume control, depending
on jack sense
- add outputs.source to override jack sense output routing
- (playback) line and hp controls are in the input class
- (capture) line and mic controls are in the record class
 1.4 11-May-2018  jmcneill Disable lineout by default. If HP is not plugged at boot, we get an
unplug event. However, no plug event when HP is plugged at boot.
 1.3 11-May-2018  jmcneill Add HP jack detect support. When HP is present, mute lineout.
 1.2 10-May-2018  jmcneill Enable HP PA output
 1.1 10-May-2018  jmcneill Add support for Allwinner A64 audio codec.
 1.8.6.1 04-May-2019  isaki Move dev/audio_dai.h -> dev/audio/audio_dai.h
 1.8.4.1 10-Jun-2019  christos Sync with HEAD
 1.8.2.2 21-May-2018  pgoyette Sync with HEAD
 1.8.2.1 16-May-2018  pgoyette file sun50i_a64_acodec.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.9.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.25 13-Oct-2025  thorpej Use device_{get,set}prop_bool().
 1.24 07-Nov-2021  jmcneill sunxi: sun50i-a64: add support for A64_CLK_CPUX clock
 1.23 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.22 08-Dec-2019  jmcneill branches: 1.22.8;
Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs
 1.21 08-Dec-2019  jmcneill Add crypto engine clock
 1.20 24-Nov-2019  jmcneill Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.19 23-Nov-2019  jmcneill Set video PLLs to 297MHz
 1.18 23-Nov-2019  jmcneill Set TCON1 parent to PLL_VIDEO1(1X)
 1.17 23-Nov-2019  jmcneill Add TCON0 clock
 1.16 22-Nov-2019  jmcneill Fix CLK_BUS_HDMI bit
 1.15 17-Nov-2019  jmcneill Add SPI clocks
 1.14 17-Nov-2019  jmcneill Add support for A64 I2S clocks.
 1.13 01-Jul-2019  jmcneill branches: 1.13.2;
Fix gpu clock parent
 1.12 27-Jun-2019  jmcneill Add GPU clocks
 1.11 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.10 22-Jan-2019  jmcneill Add sun50i DE clocks.
 1.9 18-May-2018  jmcneill branches: 1.9.2;
Set SUNXI_CCU_NM_DIVIDE_BY_TWO on mmc module clocks. There is an
undocumented post divider between the clock and mmc module.
 1.8 18-May-2018  jmcneill MMC clock source is the pll_periph's 2X output.
 1.7 10-May-2018  jmcneill Add PLL_CPUX clock
 1.6 09-May-2018  jmcneill Fix locations of bus gates
 1.5 08-May-2018  jmcneill Add audio clocks
 1.4 05-May-2018  jmcneill Add support for A64 thermal sensor clocks
 1.3 07-Sep-2017  jmcneill branches: 1.3.2; 1.3.4;
Remove AHB2 source select init for now, it seems to cause EMAC RX problems
 1.2 07-Sep-2017  jmcneill Fix bit offsets for OHCI
 1.1 07-Sep-2017  jmcneill Add support for Allwinner A64 SoCs.
 1.3.4.2 26-Jan-2019  pgoyette Sync with HEAD
 1.3.4.1 21-May-2018  pgoyette Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 07-Sep-2017  jdolecek file sun50i_a64_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.9.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.13.2.4 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.13.2.3 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.13.2.2 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #439):

sys/arch/evbarm/conf/GENERIC64: revision 1.115
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.15

Add SPI clocks
Add sun6ispi
 1.13.2.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.22.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 07-Sep-2017  jmcneill branches: 1.1.2;
Add support for Allwinner A64 SoCs.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 07-Sep-2017  jdolecek file sun50i_a64_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 02-Feb-2019  jmcneill Rename lcd function to lcd0
 1.3 06-May-2018  jmcneill branches: 1.3.2;
Rename pwm0 function to pwm for PD22
 1.2 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.1 23-Jul-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Add sun50i gpio and platform support.
 1.1.6.2 21-May-2018  pgoyette Sync with HEAD
 1.1.6.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.4.2 03-Dec-2017  jdolecek update from HEAD
 1.1.4.1 23-Jul-2017  jdolecek file sun50i_a64_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 23-Jul-2017  skrll file sun50i_a64_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 05-May-2018  jmcneill branches: 1.1.2; 1.1.16;
Add driver for Allwinner A64 PRCM CCU
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 05-May-2018  pgoyette file sun50i_a64_r_ccu.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.1 05-May-2018  jmcneill branches: 1.1.2;
Add driver for Allwinner A64 PRCM CCU
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 05-May-2018  pgoyette file sun50i_a64_r_ccu.h was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 13-Feb-2019  jakllsch branches: 1.3.12;
sun50i_h6_ccu: add PCIe clocks
 1.2 13-Feb-2019  jakllsch sun50i_h6_ccu: add "pll_cpux"

Currently intended for display of existing clock rate via the sysctl
tree, and not yet for DVFS.
 1.1 01-May-2018  jmcneill branches: 1.1.2; 1.1.4;
Add support for Allwinner H6 CCU.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 01-May-2018  pgoyette file sun50i_h6_ccu.c was added on branch pgoyette-compat on 2018-05-02 07:20:04 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 01-May-2018  jmcneill branches: 1.1.2;
Add support for Allwinner H6 CCU.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 01-May-2018  pgoyette file sun50i_h6_ccu.h was added on branch pgoyette-compat on 2018-05-02 07:20:04 +0000
 1.4 10-Nov-2021  jakllsch add clock and reset for APB2 RSB on Allwinner H6
 1.3 08-Nov-2021  jakllsch This H6 pin (PL9) function is called s_cir_rx, not s_cir.
 1.2 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.1 18-Feb-2018  jmcneill branches: 1.1.2;
Add support for Allwinner H6 CPUX and CPUS port controllers.
 1.1.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.3 10-Nov-2021  jakllsch add clock and reset for APB2 RSB on Allwinner H6
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 02-May-2018  jmcneill branches: 1.1.2; 1.1.16;
Add driver for Allwinner H6 PRCM CCU.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 02-May-2018  pgoyette file sun50i_h6_r_ccu.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.2 10-Nov-2021  jakllsch add clock and reset for APB2 RSB on Allwinner H6
 1.1 02-May-2018  jmcneill branches: 1.1.2;
Add driver for Allwinner H6 PRCM CCU.
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 02-May-2018  pgoyette file sun50i_h6_r_ccu.h was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 09-Nov-2017  jmcneill branches: 1.5.2; 1.5.18;
add NAND module clock
 1.4 06-Nov-2017  jmcneill Add support for NextThing GR8.
 1.3 27-Aug-2017  jmcneill branches: 1.3.2;
Add MMC clocks
 1.2 27-Aug-2017  jmcneill Add audio clocks
 1.1 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 27-Aug-2017  skrll file sun5i_a13_ccu.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.5.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 09-Nov-2017  jdolecek file sun5i_a13_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1 25-Aug-2017  jmcneill branches: 1.1.2; 1.1.4;
Add initial support for Allwinner A13 and R8 SoCs.
 1.1.4.2 03-Dec-2017  jdolecek update from HEAD
 1.1.4.1 25-Aug-2017  jdolecek file sun5i_a13_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 25-Aug-2017  skrll file sun5i_a13_ccu.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.2 26-Aug-2017  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
Add missing eint mappings
 1.1 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.2.6.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 26-Aug-2017  jdolecek file sun5i_a13_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 26-Aug-2017  skrll file sun5i_a13_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 07-Oct-2017  jmcneill branches: 1.4.2; 1.4.18;
add audio pll and codec clocks
 1.3 07-Oct-2017  jmcneill add dma and codec gates
 1.2 02-Jul-2017  jmcneill branches: 1.2.4; 1.2.6;
Add basic FDT GPIO support.
 1.1 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 02-Jul-2017  skrll file sun6i_a31_ccu.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 02-Jul-2017  snj file sun6i_a31_ccu.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 07-Oct-2017  jdolecek file sun6i_a31_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1 02-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8;
Add basic support for Allwinner A31.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 02-Jul-2017  jdolecek file sun6i_a31_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jul-2017  skrll file sun6i_a31_ccu.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 02-Jul-2017  snj file sun6i_a31_ccu.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.1 07-Oct-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.8;
Add A31 audio codec support.
 1.1.8.1 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 07-Oct-2017  jdolecek file sun6i_a31_codec.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.2 02-Jul-2017  jmcneill branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Enable sunxi pinctrl support
 1.1 02-Jul-2017  jmcneill Add basic FDT GPIO support.
 1.2.10.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.8.2 03-Dec-2017  jdolecek update from HEAD
 1.2.8.1 02-Jul-2017  jdolecek file sun6i_a31_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 02-Jul-2017  skrll file sun6i_a31_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 02-Jul-2017  snj file sun6i_a31_gpio.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.16 13-Aug-2024  skrll risc-v: Allwinner D1 support

Add the Allwinnder D1 support provided by Rui-Xiang Guo and updated
but me.

https://mail-index.netbsd.org/port-riscv/2024/08/04/msg000127.html

Only driver listed as attaching in

https://github.com/picohive/netbsd-mangopi-mq-pro/blob/main/boot.log

have been added.

There is no need for the platform stuff as the board's u-boot is able
to load bootriscv64.efi and boot a generic kernel.
 1.15 05-May-2021  jmcneill branches: 1.15.20;
Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.14 27-Jan-2021  thorpej branches: 1.14.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.12 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.11 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.10 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.9 06-Mar-2019  jakllsch branches: 1.9.12;
Hint more strongly that "#if maybenever" is also "#if notyet".
 1.8 02-Mar-2019  jakllsch Validate burst and width arguments.

Also add some more register definitions, and a (disabled) example of
how to set the DMA flow control mode.
 1.7 02-Mar-2019  jakllsch Implement support for multi-segment transfers.
Make more efficent use of DMA descriptor table memory.
 1.6 17-Nov-2018  jmcneill Handle different burst bits for h3/a64
 1.5 10-May-2018  jmcneill branches: 1.5.2;
32-bit build fix
 1.4 09-May-2018  jmcneill Set "DMA MCLK interface circuit auto gating bit" to 1 where required.
 1.3 15-Dec-2017  jmcneill branches: 1.3.2;
match allwinner,sun50i-a64-dma
 1.2 06-Aug-2017  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
Fix burst field encoding, and add a helper function to dump registers
from ddb.
 1.1 05-Aug-2017  jmcneill Add DMA controller driver for sun6i and later family SoCs.
 1.2.6.2 03-Dec-2017  jdolecek update from HEAD
 1.2.6.1 06-Aug-2017  jdolecek file sun6i_dma.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.4.2 28-Aug-2017  skrll Sync with HEAD
 1.2.4.1 06-Aug-2017  skrll file sun6i_dma.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.2.2 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.2.2.1 06-Aug-2017  snj file sun6i_dma.c was added on branch netbsd-8 on 2017-08-09 05:49:50 +0000
 1.3.2.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.1 21-May-2018  pgoyette Sync with HEAD
 1.5.2.1 10-Jun-2019  christos Sync with HEAD
 1.9.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14.4.1 13-May-2021  thorpej Sync with HEAD.
 1.15.20.1 02-Aug-2025  perseant Sync with HEAD
 1.11 10-Sep-2025  thorpej Encapsulate what's needed to attach a SPI bus into a spibus_attach()
inline.
 1.10 07-Aug-2021  thorpej branches: 1.10.2;
Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.2; 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 15-Jan-2021  jmcneill trailing whitespace
 1.6 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.5 13-Aug-2019  tnn branches: 1.5.8;
ensure spibus_attach_args is zero'ed
 1.4 04-Aug-2019  tnn remove useless splbio() in sunxispi_start

We raised spl already in sunxispi_transfer.
XXX spi(4) should be made MPSAFE
 1.3 03-Aug-2019  tnn sun6i_spi: bring over non-intrusive improvements from sun4i_spi

- simplify attach error handling
- calculate minfreq & maxfreq instead of hardcoding
- print configured value of SPI_SCLK
- add convenience macro for reading/writing SPI register
- clean up commented out debug printfs
 1.2 01-Feb-2018  jakllsch branches: 1.2.4;
wait at most one second for controller to complete reset
 1.1 31-Jan-2018  jakllsch Add sun6i SPI driver.

Currently PIO-only.
 1.2.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9.2.1 18-May-2021  thorpej Pass the controller devhandle along to the "spi" instance.
 1.10.2.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.1 06-Feb-2018  jakllsch Add register definitions file for sun6i_spi I forgot to add earlier.
 1.1 06-Oct-2017  jmcneill branches: 1.1.2;
Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 06-Oct-2017  jdolecek file sun7i_a20_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.3 03-Apr-2018  bouyer external interrupt functions are named "eint<n>" in the sunxi_gpio_pins[]
arrays, while sunxi_gpio_establish() looks for "eint".
Rename eint<n> to eint in sunxi_gpio_pins[]. Tested with an external interrupt
on PH0 on an A20.

XXX others sunxi_gpio_pins[] contains names like px_eint<n>, px being the
name of the port bank. I guess they should be renamed to "eint" too to work
with sunxi_gpio_establish() but I'm not sure the functions are really the
same, and I have no way to test.
 1.2 01-Apr-2018  bouyer Fix lvds output: PD10->19 are for lvds1, not lvds0. But they may be used
by tcon0 when it is set to dual-LVDS mode.
 1.1 06-Oct-2017  jmcneill branches: 1.1.2; 1.1.4;
Add sun4i (A10) and sun7i (A20) GPIO support.
 1.1.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 06-Oct-2017  jdolecek file sun7i_a20_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 27-May-2019  jmcneill branches: 1.1.2; 1.1.12;
Add apb0 and cpus clock drivers for A80
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 27-May-2019  christos file sun8i_a23_apbclk.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 02-Jan-2019  jmcneill branches: 1.6.12;
Add support for cluster 0 and 1 CPUX PLLs.
 1.5 28-Oct-2017  jmcneill branches: 1.5.2; 1.5.4; 1.5.6;
add missing clock gates
 1.4 28-Oct-2017  jmcneill Add support for A83T eMMC.
 1.3 28-Oct-2017  jmcneill Fix USB clocks
 1.2 28-Oct-2017  jmcneill Add A83T clock IDs.
 1.1 06-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add support for Allwinner A83T SoC.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 06-Jul-2017  skrll file sun8i_a83t_ccu.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 06-Jul-2017  snj file sun8i_a83t_ccu.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.5.6.1 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 28-Oct-2017  jdolecek file sun8i_a83t_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.6.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 28-Oct-2017  jmcneill branches: 1.2.2;
Add A83T clock IDs.
 1.1 06-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add support for Allwinner A83T SoC.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 06-Jul-2017  skrll file sun8i_a83t_ccu.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 06-Jul-2017  snj file sun8i_a83t_ccu.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 28-Oct-2017  jdolecek file sun8i_a83t_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5 03-Mar-2019  jmcneill "s_cir" function is now named "s_cir_rx"
 1.4 31-Dec-2018  jmcneill "emac" function is now "gmac" in the dts
 1.3 25-May-2018  jmcneill branches: 1.3.2;
hdmiddc -> hdmi for function name on PH6/PH7/PH8
 1.2 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.1 06-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add support for Allwinner A83T SoC.
 1.1.10.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.10.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.10.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 06-Jul-2017  jdolecek file sun8i_a83t_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 06-Jul-2017  skrll file sun8i_a83t_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 06-Jul-2017  snj file sun8i_a83t_gpio.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.10 29-Oct-2022  jmcneill sun8icodec: Update for binding spec changes.

The allwinner,sun8i-a33-codec binding spec has changed[1] to allow for
#sound-dai-cells to be either 0 or 1, to allow exporting multiple DAIs
from the codec.

This change updates the driver to allow #sound-dai-cells of either 0 or 1
while still only supporting AIF1 for the time being.

[1] https://github.com/torvalds/linux/commit/880e007f15a31f446b9e1713720c6ae5a539f3f4
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.7 06-Jun-2019  jmcneill branches: 1.7.10;
Update compatible strings for mainline
 1.6 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.5 16-May-2018  jmcneill branches: 1.5.2; 1.5.4; 1.5.6;
Delete whitespace, NFC
 1.4 12-May-2018  jmcneill Pass mixer requests to the codec. It is the responsibility of the codec
to decide whether or not to dispatch to an aux device.
 1.3 11-May-2018  jmcneill Disable lineout by default. If HP is not plugged at boot, we get an
unplug event. However, no plug event when HP is plugged at boot.
 1.2 11-May-2018  jmcneill Add HP jack detect support. When HP is present, mute lineout.
 1.1 10-May-2018  jmcneill Add support for Allwinner A64 audio codec.
 1.5.6.2 04-May-2019  isaki Move dev/audio_dai.h -> dev/audio/audio_dai.h
 1.5.6.1 27-Apr-2019  isaki Adapt to audio2.
- XXX Name conflicts. audio2 replaces set_params with set_format
and audio_dai already have had its own set_format.
I named newly introduced one audio_dai_mi_set_format for now.
 1.5.4.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.2 21-May-2018  pgoyette Sync with HEAD
 1.5.2.1 16-May-2018  pgoyette file sun8i_codec.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.7.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32 22-May-2022  riastradh opencrypto: Make freesession callback return void.

No functional change intended: all drivers already return zero
unconditionally.
 1.31 15-May-2022  riastradh sun8icrypto(4): Switch off polling when ready for interrupts.

When I introduced logic to do polling and then interrupts, I
accidentally made it switch polling from on to...still on, which had
the effect of breaking the logic after sun8i_crypto_attach because
only sun8i_crypto_attach actually did polling.
 1.30 19-Mar-2022  riastradh rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
 1.29 18-Mar-2022  riastradh sun8icrypto(4): Do self-test and first RNG draw synchronously.

If the self-test fails, disable everything else at boot -- don't just
leave it to the operator to notice and do something.

This way we get entropy earlier at boot, before threads start and
before the first things in the kernel that draw from it (cprng fast
init, ssp init).
 1.28 18-Mar-2022  riastradh sun8icrypto(4): Attach rndsource as RND_TYPE_RNG.

Previously this was attached as RND_TYPE_UNKNOWN, at a time when the
kernel assumed _any_ RNG-type rndsource produced independent uniform
random bits and subjected it to automatic tests that would fail with
high probability for many other distributions. But sun8icrypto(4) is
very nonuniform (probably yields consecutive samples of a ring
oscillator, which are very much not independent).

Now the kernel no longer makes this assumption, so it is valid to
label this as what it is -- a hardware RNG. We should ideally still
have better information from the vendor about what's going on under
the hood before enabling nonzero entropy for it. But at least we can
label its type accurately.
 1.27 18-Mar-2022  riastradh sun8icrypto(4): Split out interrupt and thread locks.

No need to block interrupts while we're going through all the data
structures -- only need to block interrupts for the handoff from
interrupt handler to lower-priority logic.
 1.26 07-Aug-2021  riastradh sun8icrypto(4): Call crypto_unblock when a task completes.

Otherwise under load this would presumably just hang after returning
ERESTART to opencrypto.
 1.25 28-Apr-2021  bad enable sun8icrypto on Allwinner H3 too.

Allwinner H3 needs a slower mod clock according to the Linux driver.

tested on NanoPi R1.

thanks jmcneill@ and riastradh@ for advice.

XXX pullup-9
 1.24 24-Apr-2021  riastradh branches: 1.24.2;
arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.23 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.22 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.21 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.20 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.19 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.18 14-Jun-2020  ad branches: 1.18.2;
Fix !DIAGNOSTIC compile.
 1.17 13-Jun-2020  riastradh Draft opencrypto support for Allwinner Crypto Engine.

XXX Can't handle nonzero crd_skip yet.
 1.16 13-Jun-2020  riastradh Rework sun8i crypto.

- Preallocate tasks and DMA maps together for now, for 4k transfers.
- Confine setup of the task descriptor to a single function, without
bus_dmamap_t as an input; just use the preallocated DMA maps.
- Take the DMA map part out of sun8i_crypto_buf.
=> Not much left here, just a dmamem segment and kva mapping.

This should make it easier to use with opencrypto.
 1.15 13-Jun-2020  riastradh Truncate hw.sun8icryptoN.rng queries to 4096 bytes.

...rather than fail entirely.
 1.14 15-May-2020  maxv branches: 1.14.2;
hardclock_ticks -> getticks()
 1.13 30-Apr-2020  riastradh rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.12 06-Feb-2020  riastradh branches: 1.12.4;
Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.11 20-Jan-2020  riastradh Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.
 1.10 12-Jan-2020  riastradh Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.
 1.9 18-Dec-2019  riastradh branches: 1.9.2;
Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.

While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.
 1.8 15-Dec-2019  riastradh Fix typo -- acknowledge interrupts _and_ errors.
 1.7 10-Dec-2019  riastradh Oops -- forgot to kmem_free.
 1.6 09-Dec-2019  riastradh Tidy up comments.
 1.5 09-Dec-2019  riastradh Avoid a race between interruption and reacquisition of lock.

Otherwise, we would have leaked the memory in this case.
 1.4 09-Dec-2019  riastradh Make sure ERESTART doesn't come flying out to userland.

I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.
 1.3 09-Dec-2019  riastradh Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.
 1.2 09-Dec-2019  riastradh Reduce some duplicated bus_dma clutter.
 1.1 09-Dec-2019  riastradh Draft driver for Allwinner Crypto Engine.

Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)
 1.9.2.3 29-Feb-2020  ad Sync with head.
 1.9.2.2 25-Jan-2020  ad Sync with head.
 1.9.2.1 17-Jan-2020  ad Sync with head.
 1.12.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12.4.1 06-Feb-2020  martin file sun8i_crypto.c was added on branch phil-wifi on 2020-04-08 14:07:31 +0000
 1.14.2.3 25-Apr-2021  martin Pull up following revision(s) (requested by riastradh in ticket #1252):

sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.18 (patch)
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.24 (patch)
sys/arch/arm/dts/sun50i-h5.dtsi: revision 1.2 (patch)

arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.14.2.2 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.14.2.1 15-May-2020  martin file sun8i_crypto.c was added on branch netbsd-9 on 2020-05-18 18:45:40 +0000
 1.18.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.24.2.1 13-May-2021  thorpej Sync with HEAD.
 1.2 13-Jun-2020  riastradh Rework sun8i crypto.

- Preallocate tasks and DMA maps together for now, for 4k transfers.
- Confine setup of the task descriptor to a single function, without
bus_dmamap_t as an input; just use the preallocated DMA maps.
- Take the DMA map part out of sun8i_crypto_buf.
=> Not much left here, just a dmamem segment and kva mapping.

This should make it easier to use with opencrypto.
 1.1 09-Dec-2019  riastradh branches: 1.1.6; 1.1.10;
Draft driver for Allwinner Crypto Engine.

Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)
 1.1.10.2 18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.1.10.1 09-Dec-2019  martin file sun8i_crypto.h was added on branch netbsd-9 on 2020-05-18 18:45:40 +0000
 1.1.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.6.1 09-Dec-2019  martin file sun8i_crypto.h was added on branch phil-wifi on 2020-04-08 14:07:31 +0000
 1.18 24-Apr-2021  riastradh arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.17 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.16 31-Jan-2019  jmcneill branches: 1.16.4; 1.16.12;
Add support for Allwinner H3/H5 display pipeline.
 1.15 12-Jan-2018  jakllsch branches: 1.15.4;
Add clocks gates and divisors for H3/H5 SPI[01] controllers.
 1.14 11-Oct-2017  jmcneill branches: 1.14.2;
Add H5 (sun50i) support.
 1.13 05-Oct-2017  jmcneill Add thermal sensor clocks
 1.12 16-Sep-2017  jmcneill add ephy clk gate
 1.11 13-Aug-2017  jmcneill branches: 1.11.2;
Add support for H3 CPUX clock.
 1.10 06-Aug-2017  jmcneill Add support for H3 audio PLL and digital audio part.
 1.9 05-Aug-2017  jmcneill add DMA gate
 1.8 17-Jul-2017  jmcneill branches: 1.8.2; 1.8.4;
Add SDMMC[012] sample/output clock phase controls.
 1.7 07-Jul-2017  jmcneill Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
 1.6 02-Jul-2017  jmcneill Add basic FDT GPIO support.
 1.5 01-Jul-2017  jmcneill Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.

This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
 1.4 29-Jun-2017  jmcneill Add USB stuff. Doesn't quite work yet.
 1.3 29-Jun-2017  jmcneill SD/MMC clock fixes
 1.2 29-Jun-2017  jmcneill Add H3 MMC support
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.8.4.4 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.8.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.8.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.8.4.1 17-Jul-2017  snj file sun8i_h3_ccu.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.8.2.2 17-Jul-2017  jmcneill 2360748
 1.8.2.1 17-Jul-2017  jmcneill file sun8i_h3_ccu.c was added on branch perseant-stdc-iso10646 on 2017-07-17 23:26:18 +0000
 1.11.2.2 28-Aug-2017  skrll Sync with HEAD
 1.11.2.1 13-Aug-2017  skrll file sun8i_h3_ccu.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.14.2.2 03-Dec-2017  jdolecek update from HEAD
 1.14.2.1 11-Oct-2017  jdolecek file sun8i_h3_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.15.4.1 10-Jun-2019  christos Sync with HEAD
 1.16.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16.4.1 25-Apr-2021  martin Pull up following revision(s) (requested by riastradh in ticket #1252):

sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.18 (patch)
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.24 (patch)
sys/arch/arm/dts/sun50i-h5.dtsi: revision 1.2 (patch)

arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.

Tested on NanoPi Neo PLUS2.
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8;
Add initial support for Allwinner H3 SoC.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 28-Jun-2017  jdolecek file sun8i_h3_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file sun8i_h3_ccu.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file sun8i_h3_ccu.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 08-May-2019  isaki branches: 1.4.10;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.3 21-Dec-2017  nat branches: 1.3.4; 1.3.6;
The reset bit for the analog portion of the codec is bit 28. As per
Allwinner H3 datasheet.

Ok jmcneill@.
 1.2 07-Aug-2017  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.1 06-Aug-2017  jmcneill Add support for Allwinner H3 audio codec.
 1.2.6.2 03-Dec-2017  jdolecek update from HEAD
 1.2.6.1 07-Aug-2017  jdolecek file sun8i_h3_codec.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.4.2 28-Aug-2017  skrll Sync with HEAD
 1.2.4.1 07-Aug-2017  skrll file sun8i_h3_codec.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.2.3 07-Jan-2018  snj Pull up following revision(s) (requested by nat in ticket #466):
sys/arch/arm/sunxi/sun8i_h3_codec.c: revision 1.3
The reset bit for the analog portion of the codec is bit 28. As per
Allwinner H3 datasheet.
Ok jmcneill@.
 1.2.2.2 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.2.2.1 07-Aug-2017  snj file sun8i_h3_codec.c was added on branch netbsd-8 on 2017-08-09 05:49:50 +0000
 1.3.6.1 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.4.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 31-Jan-2019  jmcneill Update function name s_twi to s_i2c
 1.2 03-Apr-2018  bouyer branches: 1.2.2;
Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.1 02-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add basic FDT GPIO support.
 1.1.10.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 02-Jul-2017  jdolecek file sun8i_h3_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jul-2017  skrll file sun8i_h3_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 02-Jul-2017  snj file sun8i_h3_gpio.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 30-Sep-2017  jmcneill branches: 1.1.2; 1.1.18;
Add support for Allwinner H3 PRCM clock controller.
 1.1.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 30-Sep-2017  jdolecek file sun8i_h3_r_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1 30-Sep-2017  jmcneill branches: 1.1.2;
Add support for Allwinner H3 PRCM clock controller.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 30-Sep-2017  jdolecek file sun8i_h3_r_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1 05-May-2021  jmcneill branches: 1.1.4;
Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.1.4.2 13-May-2021  thorpej Sync with HEAD.
 1.1.4.1 05-May-2021  thorpej file sun8i_v3s_ccu.c was added on branch thorpej-i2c-spi-conf on 2021-05-13 00:47:24 +0000
 1.1 05-May-2021  jmcneill branches: 1.1.4;
Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.1.4.2 13-May-2021  thorpej Sync with HEAD.
 1.1.4.1 05-May-2021  thorpej file sun8i_v3s_ccu.h was added on branch thorpej-i2c-spi-conf on 2021-05-13 00:47:24 +0000
 1.1 05-May-2021  jmcneill branches: 1.1.4;
Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.1.4.2 13-May-2021  thorpej Sync with HEAD.
 1.1.4.1 05-May-2021  thorpej file sun8i_v3s_codec.c was added on branch thorpej-i2c-spi-conf on 2021-05-13 00:47:24 +0000
 1.1 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 26-May-2019  jmcneill branches: 1.3.10;
Add gmac clocks
 1.2 03-Jan-2019  jmcneill Add c0cpux and c1cpux clocks
 1.1 08-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Add Allwinner A80 (sun9i) support.
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 08-Oct-2017  jdolecek file sun9i_a80_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 08-Oct-2017  jmcneill branches: 1.1.2;
Add Allwinner A80 (sun9i) support.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 08-Oct-2017  jdolecek file sun9i_a80_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 27-May-2019  jmcneill branches: 1.1.2; 1.1.12;
Add apb0 and cpus clock drivers for A80
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 27-May-2019  christos file sun9i_a80_cpusclk.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.3 27-May-2019  jmcneill Set has_io_bias_config flag
 1.2 03-Apr-2018  bouyer branches: 1.2.2;
Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.1 08-Oct-2017  jmcneill branches: 1.1.2; 1.1.4;
Add Allwinner A80 (sun9i) support.
 1.1.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 08-Oct-2017  jdolecek file sun9i_a80_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 28-May-2019  jmcneill branches: 1.2.10;
Enable parent clocks
 1.1 08-Oct-2017  jmcneill branches: 1.1.2; 1.1.6;
Add Allwinner A80 (sun9i) support.
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 08-Oct-2017  jdolecek file sun9i_a80_mmcclk.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 28-May-2019  jmcneill branches: 1.1.2; 1.1.12;
Add A80 USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 28-May-2019  christos file sun9i_a80_usbclk.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 28-May-2019  jmcneill branches: 1.1.2; 1.1.12;
Add A80 USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 28-May-2019  christos file sun9i_a80_usbphy.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.13 19-Nov-2022  yamt sunxi_can.c: fix build with MBUFTRACE
 1.12 27-Sep-2022  skrll malloc -> kmem
 1.11 21-Sep-2022  bouyer Just skipping sunxi_can_rx_intr() if the DATA_OR flag is set isn't enough
to properly recover from overrrun in all case. So go the linux way and reset
the hardware.

Don't write SUNXI_CAN_INT_RX_FLAG to SUNXI_CAN_INT_REG, this could race
with hardware and clear the interrupt while there are new packets received.
SUNXI_CAN_INT_RX_FLAG clears automatically when all pending packets have been
read, so when no more packets are pending just read SUNXI_CAN_INT_REG again
and process other interrupts, if any (or RX if there are new packets pending).
With this change it seems I get overruns less often in my use case.
 1.10 19-Sep-2022  bouyer Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional
RX stalls
 1.9 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.4 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.3 29-Jan-2020  thorpej branches: 1.3.6;
Adopt <net/if_stats.h>.
 1.2 21-Oct-2019  msaitoh branches: 1.2.2;
if_ipackets is incremented in can_input(), so don't increment it in
sunxi_can_rx_intr to prevent double count. OK'd by bouyer@.
 1.1 07-Mar-2018  bouyer branches: 1.1.2; 1.1.4; 1.1.8;
fdt-ise the allwinner can and lradc drivers.
 1.1.8.2 24-Sep-2022  martin Pull up following revision(s) (requested by bouyer in ticket #1533):

sys/arch/arm/sunxi/sunxi_can.c: revision 1.10,1.11 (via patch)

Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional
RX stalls

Just skipping sunxi_can_rx_intr() if the DATA_OR flag is set isn't enough
to properly recover from overrrun in all case. So go the linux way and reset
the hardware.

Don't write SUNXI_CAN_INT_RX_FLAG to SUNXI_CAN_INT_REG, this could race
with hardware and clear the interrupt while there are new packets received.
SUNXI_CAN_INT_RX_FLAG clears automatically when all pending packets have been
read, so when no more packets are pending just read SUNXI_CAN_INT_REG again
and process other interrupts, if any (or RX if there are new packets pending).

With this change it seems I get overruns less often in my use case.
 1.1.8.1 23-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #371):

sys/dev/ic/i82586.c: revision 1.86
sys/arch/arm/ep93xx/epe.c: revision 1.45
sys/dev/pcmcia/if_cnw.c: revision 1.66
sys/arch/mac68k/nubus/if_netdock_nubus.c: revision 1.31
sys/arch/arm/sunxi/sunxi_can.c: revision 1.2
sys/dev/qbus/if_il.c: revision 1.36
sys/dev/pcmcia/if_ray.c: revision 1.95
sys/dev/qbus/if_qt.c: revision 1.24

if_ipackets is incremented in can_input(), so don't increment it in
sunxi_can_rx_intr to prevent double count. OK'd by bouyer@.

if_percpuq(9) automatically increments if_ipackets, so don't increment it in
the driver itself to prevent double count.
 1.1.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.1.2.1 07-Mar-2018  pgoyette file sunxi_can.c was added on branch pgoyette-compat on 2018-03-15 09:12:02 +0000
 1.2.2.1 29-Feb-2020  ad Sync with head.
 1.3.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 07-Mar-2018  bouyer branches: 1.1.2;
fdt-ise the allwinner can and lradc drivers.
 1.1.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.1.2.1 07-Mar-2018  pgoyette file sunxi_can.h was added on branch pgoyette-compat on 2018-03-15 09:12:02 +0000
 1.14 07-Nov-2021  jmcneill sunxi: ccu: add support for basic "mux" clocks
 1.13 29-Nov-2018  jakllsch use %u for u_int, rather than %d; corrects printing of frequencies at or above 2**31 Hz
 1.12 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.11 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.10 28-Apr-2018  jmcneill branches: 1.10.2;
Initialize clk domain name and call clk_attach to register sysctl nodes
 1.9 01-Apr-2018  bouyer Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.8 19-Mar-2018  bouyer Add some more A10/A20 clocks definitions; related to display engines.
The video PLLs requires a new clock type, SUNXI_CCU_FRACTIONAL
 1.7 30-Sep-2017  jmcneill branches: 1.7.2; 1.7.4;
Add support for Allwinner H3 PRCM clock controller.
 1.6 17-Jul-2017  jmcneill branches: 1.6.2; 1.6.4; 1.6.6;
Add SDMMC[012] sample/output clock phase controls.
 1.5 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.4 29-Jun-2017  jmcneill Print clocks with aprint_debug
 1.3 29-Jun-2017  jmcneill SD/MMC clock fixes
 1.2 29-Jun-2017  jmcneill Add H3 MMC support
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.6.6.2 28-Aug-2017  skrll Sync with HEAD
 1.6.6.1 17-Jul-2017  skrll file sunxi_ccu.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.6.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.6.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.6.4.1 17-Jul-2017  snj file sunxi_ccu.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.6.2.2 17-Jul-2017  jmcneill 2360748
 1.6.2.1 17-Jul-2017  jmcneill file sunxi_ccu.c was added on branch perseant-stdc-iso10646 on 2017-07-17 23:26:18 +0000
 1.7.4.5 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.7.4.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.7.4.3 02-May-2018  pgoyette Synch with HEAD
 1.7.4.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.7.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 30-Sep-2017  jdolecek file sunxi_ccu.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.10.2.1 10-Jun-2019  christos Sync with HEAD
 1.24 16-Sep-2024  macallan set CLK_SET_RATE_PARENT for mux type clocks so clk_set_rate() can work
with this my pinebook can change cpu speed again
ok jmcneill@
 1.23 07-Nov-2021  jmcneill branches: 1.23.10;
sunxi: ccu: add support for basic "mux" clocks
 1.22 23-Nov-2019  jakllsch Store the flags passed to SUNXI_CCU_FRACTIONAL macro.

Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.
 1.21 30-Jan-2019  jmcneill branches: 1.21.4;
Add support for Allwinner A64's display pipeline.
 1.20 22-Jan-2019  jmcneill Add sun50i DE clocks.
 1.19 02-Jan-2019  jmcneill Add support for cluster 0 and 1 CPUX PLLs.
 1.18 08-May-2018  jmcneill branches: 1.18.2;
Pass set_rate calls on fixed factor clocks through to the parent clock (adjusting accordingly)
 1.17 01-Apr-2018  bouyer Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.16 19-Mar-2018  bouyer Add some more A10/A20 clocks definitions; related to display engines.
The video PLLs requires a new clock type, SUNXI_CCU_FRACTIONAL
 1.15 28-Oct-2017  jmcneill branches: 1.15.2; 1.15.4;
Add support for A83T eMMC.
 1.14 09-Oct-2017  jmcneill Add A10/A20 cpufreq scaling support
 1.13 06-Oct-2017  jmcneill Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.12 05-Oct-2017  jmcneill Add support for gated dividers and /1,/2,/4,/6 style divider fields.
 1.11 30-Sep-2017  jmcneill Add support for Allwinner H3 PRCM clock controller.
 1.10 25-Aug-2017  jmcneill branches: 1.10.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.9 13-Aug-2017  jmcneill Add support for H3 CPUX clock.
 1.8 06-Aug-2017  jmcneill Add support for H3 audio PLL and digital audio part.
 1.7 17-Jul-2017  jmcneill branches: 1.7.2; 1.7.4;
Add SDMMC[012] sample/output clock phase controls.
 1.6 06-Jul-2017  jmcneill Add support for Allwinner A83T SoC.
 1.5 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.4 29-Jun-2017  jmcneill Add USB stuff. Doesn't quite work yet.
 1.3 29-Jun-2017  jmcneill SD/MMC clock fixes
 1.2 29-Jun-2017  jmcneill Add H3 MMC support
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.7.4.4 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.7.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.7.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.7.4.1 17-Jul-2017  snj file sunxi_ccu.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.7.2.2 17-Jul-2017  jmcneill 2360748
 1.7.2.1 17-Jul-2017  jmcneill file sunxi_ccu.h was added on branch perseant-stdc-iso10646 on 2017-07-17 23:26:18 +0000
 1.10.2.2 28-Aug-2017  skrll Sync with HEAD
 1.10.2.1 25-Aug-2017  skrll file sunxi_ccu.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.15.4.5 26-Jan-2019  pgoyette Sync with HEAD
 1.15.4.4 18-Jan-2019  pgoyette Synch with HEAD
 1.15.4.3 21-May-2018  pgoyette Sync with HEAD
 1.15.4.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.15.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.15.2.2 03-Dec-2017  jdolecek update from HEAD
 1.15.2.1 28-Oct-2017  jdolecek file sunxi_ccu.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.18.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.18.2.1 10-Jun-2019  christos Sync with HEAD
 1.21.4.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.23.10.1 02-Aug-2025  perseant Sync with HEAD
 1.3 03-Aug-2023  mrg avoid potentially uninitialised variable that likely won't happen.

GCC 12 can't tell that hardware / platform design means it won't happen.
 1.2 02-Apr-2018  bouyer branches: 1.2.2;
- sunxi_ccu_lcdxch1_set_rate(): enable parent before calling
sunxi_ccu_div_set_rate(). If it's not enabled get_rate() will return 0 and
sunxi_ccu_div_set_rate() will fail.
- rework sunxi_ccu_lcdxch0_set_rate() to actually really select the best
parent.
 1.1 01-Apr-2018  bouyer Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.2.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.2.1 02-Apr-2018  pgoyette file sunxi_ccu_display.c was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.6 17-Nov-2019  jmcneill Add support for A64 I2S clocks.
 1.5 19-Mar-2018  bouyer branches: 1.5.2; 1.5.6;
Make sunxi_ccu_div_set_rate() work on non-SUNXI_CCU_DIV_TIMES_TWO
clocks.
 1.4 09-Oct-2017  jmcneill branches: 1.4.2; 1.4.4;
Add A10/A20 cpufreq scaling support
 1.3 05-Oct-2017  jmcneill Add support for gated dividers and /1,/2,/4,/6 style divider fields.
 1.2 25-Aug-2017  jmcneill branches: 1.2.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.1 02-Jul-2017  jmcneill branches: 1.1.4;
Add basic support for Allwinner A31.
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 02-Jul-2017  snj file sunxi_ccu_div.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 25-Aug-2017  skrll file sunxi_ccu_div.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.4.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 09-Oct-2017  jdolecek file sunxi_ccu_div.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.6.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.5.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 08-May-2018  jmcneill Pass set_rate calls on fixed factor clocks through to the parent clock (adjusting accordingly)
 1.1 30-Sep-2017  jmcneill branches: 1.1.2; 1.1.4;
Add support for Allwinner H3 PRCM clock controller.
 1.1.4.1 21-May-2018  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 30-Sep-2017  jdolecek file sunxi_ccu_fixed_factor.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.6 23-Nov-2019  jmcneill Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.
 1.5 23-Nov-2019  jmcneill Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode
 1.4 30-Jan-2019  jmcneill branches: 1.4.4;
Add support for Allwinner A64's display pipeline.
 1.3 22-Jan-2019  jmcneill Add sun50i DE clocks.
 1.2 01-Apr-2018  bouyer branches: 1.2.2;
Add a round_rate() callback for the sunxi clock domain.
Add a sunxi_ccu_display.c file with helpers for setting up display engine
clocks.
for fractional clocks, rename frac_en to div_en, I got the logic inverted.
Adjust tcon0-ch0, tcon0-ch1, tcon1-ch0 and tcon1-ch1 definitions to
automatically select a parent. tcon0 hardcoded to pll3 and tcon1 to pll7.
Define a round_rate() callback for these clocks, as well as fractional clocks.
Hardcode debe clocks parent to pll5.
 1.1 19-Mar-2018  bouyer branches: 1.1.2;
Add some more A10/A20 clocks definitions; related to display engines.
The video PLLs requires a new clock type, SUNXI_CCU_FRACTIONAL
 1.1.2.4 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.3 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.2 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.1.2.1 19-Mar-2018  pgoyette file sunxi_ccu_fractional.c was added on branch pgoyette-compat on 2018-03-22 01:44:43 +0000
 1.2.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.2 29-Jun-2017  jmcneill branches: 1.2.4; 1.2.6; 1.2.8;
Support parents in different clock domains.
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.2.8.2 03-Dec-2017  jdolecek update from HEAD
 1.2.8.1 29-Jun-2017  jdolecek file sunxi_ccu_gate.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 29-Jun-2017  skrll file sunxi_ccu_gate.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 29-Jun-2017  snj file sunxi_ccu_gate.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.1 07-Nov-2021  jmcneill sunxi: ccu: add support for basic "mux" clocks
 1.8 02-Jan-2019  jmcneill Support SUNXI_CCU_NKMP_FACTOR_P_X4 flag
 1.7 06-Oct-2017  jmcneill branches: 1.7.2; 1.7.4; 1.7.6;
Add driver for sun4i (A10) and sun7i (A20) clock controller.
 1.6 13-Aug-2017  jmcneill branches: 1.6.2;
Add support for H3 CPUX clock.
 1.5 06-Aug-2017  jmcneill Add support for H3 audio PLL and digital audio part.
 1.4 06-Jul-2017  jmcneill branches: 1.4.4;
Add support for Allwinner A83T SoC.
 1.3 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.2 29-Jun-2017  jmcneill SD/MMC clock fixes
 1.1 29-Jun-2017  jmcneill Add H3 MMC support
 1.4.4.3 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.4.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.4.4.1 06-Jul-2017  snj file sunxi_ccu_nkmp.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.6.2.2 28-Aug-2017  skrll Sync with HEAD
 1.6.2.1 13-Aug-2017  skrll file sunxi_ccu_nkmp.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.7.6.1 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 06-Oct-2017  jdolecek file sunxi_ccu_nkmp.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 28-Oct-2017  jmcneill branches: 1.4.2;
Add support for A83T eMMC.
 1.3 29-Jun-2017  jmcneill branches: 1.3.4; 1.3.6;
SD/MMC clock fixes
 1.2 29-Jun-2017  jmcneill Add H3 MMC support
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.3.6.2 28-Aug-2017  skrll Sync with HEAD
 1.3.6.1 29-Jun-2017  skrll file sunxi_ccu_nm.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.3.4.1 29-Jun-2017  snj file sunxi_ccu_nm.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 28-Oct-2017  jdolecek file sunxi_ccu_nm.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1 17-Jul-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add SDMMC[012] sample/output clock phase controls.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 17-Jul-2017  jdolecek file sunxi_ccu_phase.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 17-Jul-2017  skrll file sunxi_ccu_phase.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.1.4.1 17-Jul-2017  snj file sunxi_ccu_phase.c was added on branch netbsd-8 on 2017-07-25 02:03:16 +0000
 1.1.2.2 17-Jul-2017  jmcneill 2360748
 1.1.2.1 17-Jul-2017  jmcneill file sunxi_ccu_phase.c was added on branch perseant-stdc-iso10646 on 2017-07-17 23:26:18 +0000
 1.3 25-Aug-2017  jmcneill branches: 1.3.2; 1.3.4;
Add initial support for Allwinner A13 and R8 SoCs.
 1.2 29-Jun-2017  jmcneill branches: 1.2.4;
Add USB stuff. Doesn't quite work yet.
 1.1 29-Jun-2017  jmcneill Add H3 MMC support
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 29-Jun-2017  snj file sunxi_ccu_prediv.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 25-Aug-2017  jdolecek file sunxi_ccu_prediv.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 25-Aug-2017  skrll file sunxi_ccu_prediv.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.14 05-May-2021  jmcneill Fix GENERIC64 build
 1.13 05-May-2021  jmcneill Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.12 27-Jan-2021  thorpej branches: 1.12.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.10 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.9 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.8 29-Feb-2020  isaki branches: 1.8.6;
Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.
 1.7 08-Jun-2019  isaki branches: 1.7.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.6 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.5 20-Apr-2018  bouyer branches: 1.5.2; 1.5.4;
Remove sunxi_codec_drain(). It's optional, and as the DMA is not stopped
at this time I'm not sure what draining the fifo means here. Also,
we're not waiting for the drain to complete.
The upper level will play enough silence when needed to make sure interesting
data have been played.

In sunxi_codec_halt_output() and sunxi_codec_halt_input(), drain the fifo
(and wait for it to complete) before or after disabling the DMA.
 1.4 19-Apr-2018  bouyer Take the interrupt lock in interrupt handler. Seesm to fix the hang I was
seeing with a portaudio2 application.
Don't unmute at attach time, it will be done when the upper level starts
sending data.
 1.3 07-Oct-2017  jmcneill branches: 1.3.2; 1.3.4;
Add A31 audio codec support.
 1.2 27-Aug-2017  jmcneill branches: 1.2.2;
Add sun4i DMA and audio codec support.
 1.1 06-Aug-2017  jmcneill branches: 1.1.2;
Add support for Allwinner H3 audio codec.
 1.1.2.2 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.1.2.1 06-Aug-2017  snj file sunxi_codec.c was added on branch netbsd-8 on 2017-08-09 05:49:50 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 27-Aug-2017  skrll file sunxi_codec.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3.4.1 22-Apr-2018  pgoyette Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 07-Oct-2017  jdolecek file sunxi_codec.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.4.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.5.4.1 27-Apr-2019  isaki Adapt to audio2.
 1.5.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.2.1 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 29-Feb-2020  ad Sync with head.
 1.8.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.4.1 13-May-2021  thorpej Sync with HEAD.
 1.8 05-May-2021  jmcneill Fix GENERIC64 build
 1.7 05-May-2021  jmcneill Add support for Allwinner V3s, from Rui-Xiang Guo.
 1.6 18-Jan-2021  thorpej branches: 1.6.4;
Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.5 08-May-2019  isaki branches: 1.5.10;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.4 07-Oct-2017  jmcneill branches: 1.4.2; 1.4.6; 1.4.8;
Add A31 audio codec support.
 1.3 07-Oct-2017  jmcneill match allwinner,sun7i-a20-codec
 1.2 27-Aug-2017  jmcneill branches: 1.2.2;
Add sun4i DMA and audio codec support.
 1.1 06-Aug-2017  jmcneill branches: 1.1.2;
Add support for Allwinner H3 audio codec.
 1.1.2.2 09-Aug-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #200):
sys/arch/arm/sunxi/files.sunxi: 1.15-1.16
sys/arch/arm/sunxi/sun6i_dma.c: 1.1-1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: 1.9-1.10
sys/arch/arm/sunxi/sun8i_h3_codec.c: 1.1-1.2
sys/arch/arm/sunxi/sunxi_ccu.h: 1.8
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: 1.5
sys/arch/arm/sunxi/sunxi_codec.c: 1.1
sys/arch/arm/sunxi/sunxi_codec.h: 1.1
sys/arch/evbarm/conf/SUNXI: 1.20-1.21
Add DMA controller driver for sun6i and later family SoCs.
--
Enable sun6idma
--
add DMA gate
--
Fix burst field encoding, and add a helper function to dump registers
from ddb.
--
Add support for H3 audio PLL and digital audio part.
--
Add support for Allwinner H3 audio codec.
--
Enable H3 audio support
--
h3_codec_pr_write: clear write mode bit after setting it; fixes an issue with output being mutex when skipping tracks in mpg123
 1.1.2.1 06-Aug-2017  snj file sunxi_codec.h was added on branch netbsd-8 on 2017-08-09 05:49:50 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 27-Aug-2017  skrll file sunxi_codec.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.4.8.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.4.8.2 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.4.8.1 27-Apr-2019  isaki Adapt to audio2.
 1.4.6.1 10-Jun-2019  christos Sync with HEAD
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 07-Oct-2017  jdolecek file sunxi_codec.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.4.1 13-May-2021  thorpej Sync with HEAD.
 1.6 27-May-2018  jmcneill Rename sunxi_com to dw_apb_uart and move it to dev/fdt since it is not
sunxi-specific.
 1.5 27-May-2018  jmcneill Rename COM_TYPE_SUNXI -> COM_TYPE_DW_APB
 1.4 29-Oct-2017  jmcneill branches: 1.4.2; 1.4.4;
remove options COM_AWIN and set COM_TYPE_SUNXI in the bus driver instead
 1.3 23-Oct-2017  jmcneill Enable clocks and de-assert resets
 1.2 29-Jun-2017  jmcneill branches: 1.2.4; 1.2.6;
Rename a variable, NFC.
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 29-Jun-2017  skrll file sunxi_com.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 29-Jun-2017  snj file sunxi_com.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.4.1 25-Jun-2018  pgoyette Sync with HEAD
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 29-Oct-2017  jdolecek file sunxi_com.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 22-Jan-2019  jmcneill branches: 1.1.2; 1.1.6; 1.1.16;
Add drivers for DE2 bus and clock controllers.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 22-Jan-2019  christos file sunxi_de2.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 22-Jan-2019  pgoyette file sunxi_de2.c was added on branch pgoyette-compat on 2019-01-26 22:00:01 +0000
 1.8 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 31-Jan-2019  jmcneill branches: 1.3.4; 1.3.14;
Add support for Allwinner H3/H5 display pipeline.
 1.2 22-Jan-2019  jmcneill branches: 1.2.2;
Enable parent clocks and de-assert resets
 1.1 22-Jan-2019  jmcneill Add drivers for DE2 bus and clock controllers.
 1.2.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.2.2.1 22-Jan-2019  pgoyette file sunxi_de2_ccu.c was added on branch pgoyette-compat on 2019-01-26 22:00:01 +0000
 1.3.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 31-Jan-2019  christos file sunxi_de2_ccu.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.1 22-Jan-2019  jmcneill branches: 1.1.2; 1.1.6;
Add drivers for DE2 bus and clock controllers.
 1.1.6.2 10-Jun-2019  christos Sync with HEAD
 1.1.6.1 22-Jan-2019  christos file sunxi_de2_ccu.h was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.1.2.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.1 22-Jan-2019  pgoyette file sunxi_de2_ccu.h was added on branch pgoyette-compat on 2019-01-26 22:00:01 +0000
 1.18 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.17 02-Feb-2024  andvar s/attachement/attachment/ and s/detachement/detachment/.
 1.16 01-Jan-2022  andvar branches: 1.16.2;
s/coudn/couldn/ and s/couln/couldn/ in comment and log messages.
 1.15 20-Aug-2021  andvar fix various typos in comments and log messages.
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 27-Jan-2021  thorpej branches: 1.12.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.10 19-Oct-2020  rin branches: 1.10.2;
sunxi_debe_set_videomode(): As byte-swapped framebuffer is now handled by
FDT override, do not configure FB to little-endian format for __ARMEB__.

XXX
This function is not actually called at the moment. IIRC, it worked in
the pre-FDT era. Something went wrong since then...
 1.9 01-Jun-2018  bouyer Defer display hardware reset to pipeline activation. This way, if we have a
pipeline setup which we can't manage, the simple framebuffer will keep working.
 1.8 07-Apr-2018  bouyer Allow the graphic driver to be the kernel's console.
Match either from the allwinner,pipeline entry in the simple-framebuffer
fdt entry, or from console= from the command line.
console=fb0 and console=fb1 selects display backend unit 0 or 1 respectively;
console=fb selects the first activated display backend.
 1.7 05-Apr-2018  jmcneill Remove AWIN_DEBE_FWINIT blocks
 1.6 05-Apr-2018  jmcneill Remove NAWIN_MP blocks (this code was experimental in the original driver and is not worth porting over)
 1.5 03-Apr-2018  bouyer disable all clocks at end of attach function, and re-enable ahb and mod only
in activate function.
enable ram gate (in debe) and video plls (in tcon) only when the video output
is enabled. Saves about 20mw when both video outputs are off.
 1.4 03-Apr-2018  bouyer A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.
 1.3 03-Apr-2018  bouyer work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.2 27-Aug-2017  jmcneill branches: 1.2.2;
Remove the sunxi_debe driver in favour of the more generic simplefb.
 1.1 26-Aug-2017  jmcneill Add a basic sun5i FB driver. This assumes that firmware (U-Boot) has
already setup the chip and re-uses the same settings / FB memory.
 1.2.2.3 25-Jun-2018  pgoyette Sync with HEAD
 1.2.2.2 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.2.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.10.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16.2.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.1 03-Apr-2018  bouyer branches: 1.1.2;
work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 03-Apr-2018  pgoyette file sunxi_debereg.h was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 07-Apr-2018  bouyer branches: 1.3.14;
Allow the graphic driver to be the kernel's console.
Match either from the allwinner,pipeline entry in the simple-framebuffer
fdt entry, or from console= from the command line.
console=fb0 and console=fb1 selects display backend unit 0 or 1 respectively;
console=fb selects the first activated display backend.
 1.2 03-Apr-2018  bouyer branches: 1.2.2;
A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.
 1.1 03-Apr-2018  bouyer work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.2.2.3 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.2.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.2.1 03-Apr-2018  pgoyette file sunxi_dep.c was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.3.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 01-Jun-2018  bouyer branches: 1.3.30;
Defer display hardware reset to pipeline activation. This way, if we have a
pipeline setup which we can't manage, the simple framebuffer will keep working.
 1.2 07-Apr-2018  bouyer Allow the graphic driver to be the kernel's console.
Match either from the allwinner,pipeline entry in the simple-framebuffer
fdt entry, or from console= from the command line.
console=fb0 and console=fb1 selects display backend unit 0 or 1 respectively;
console=fb selects the first activated display backend.
 1.1 03-Apr-2018  bouyer branches: 1.1.2;
work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.1.2.4 25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.3 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 03-Apr-2018  pgoyette file sunxi_display.h was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.3.30.1 16-Oct-2022  bouyer sunxi_tcon1_set_videomode() wants a drm_display_mode
 1.27 13-Oct-2025  thorpej Use device_{get,set}prop_bool().
 1.26 25-Sep-2022  riastradh branches: 1.26.2;
sunxidrm: Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.25 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.24 21-Apr-2022  andvar s/subesquent/subsequent/ in copy pasted comments.
 1.23 19-Dec-2021  riastradh sunxi/drm, rockchip/drm: Avoid messy error output.
 1.22 19-Dec-2021  riastradh sunxi/drm: Use an explicit task queue to avoid config_defer pitfalls.

Same as the other drm drivers.
 1.21 19-Dec-2021  riastradh catch up with newer drm_encoder_init prototype


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.20 19-Dec-2021  riastradh Use helper to fill fb struct


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.19 19-Dec-2021  riastradh Fill fb->dev.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.18 19-Dec-2021  riastradh drm_dev_alloc now returns ERR_PTR, check for that.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.17 19-Dec-2021  riastradh Sort includes.
 1.16 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 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 29-Jan-2021  rin branches: 1.13.2;
Fix previous; sunxidrm(4) couldn't be probed on Allwinner A64 due to
trailing whitespace in compat string.
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 16-Dec-2019  jmcneill branches: 1.11.8;
Make sure memory stolen from simplefb is page aligned.
 1.10 15-Dec-2019  mrg ensure to call drm_mode_config_cleanup() when erroring.
tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.9 24-Nov-2019  jmcneill Reclaim bootloader FB memory for CMA pool.
 1.8 05-Nov-2019  jmcneill Reserve enough memory at boot to support the drmfb buffer plus a 4K buffer
for Xorg.
 1.7 06-Feb-2019  jmcneill branches: 1.7.4; 1.7.6;
Add support for hardware cursors where we can.

As far as I can tell, alpha blending only works between overlay channels,
and not between layers on a channel. Unfortunately, RT-Mixer1 only has
a single UI channel, so this feature is limited to RT-Mixer0.
 1.6 04-Feb-2019  jmcneill Add support for vblank irq and RGB overlay planes.
 1.5 03-Feb-2019  jmcneill Support "nomodeset" kernel cmdline flag to disable sunxidrm
 1.4 31-Jan-2019  jmcneill Add support for Allwinner H3/H5 display pipeline.
 1.3 30-Jan-2019  jmcneill Revert previous
 1.2 30-Jan-2019  jmcneill Detach previous console device before attaching drmfb instead of relying on fdt_remove_bycompat hack
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.7.6.4 17-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #562):

sys/arch/arm/sunxi/sunxi_drm.c: revision 1.11

Make sure memory stolen from simplefb is page aligned.
 1.7.6.3 17-Dec-2019  martin Pull up following revision(s) (requested by mrg in ticket #557):

sys/arch/arm/rockchip/rk_drm.c: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.4
sys/arch/arm/sunxi/sunxi_drm.c: revision 1.10

ensure to call drm_mode_config_cleanup() when erroring.

tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.7.6.2 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #472):

sys/arch/arm/sunxi/sunxi_drm.c: revision 1.9

Reclaim bootloader FB memory for CMA pool.
 1.7.6.1 06-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #400):

sys/arch/arm/sunxi/sunxi_drm.c: revision 1.8
sys/external/bsd/drm2/dist/include/drm/drm_gem_cma_helper.h: revision 1.6
sys/external/bsd/drm2/dist/include/drm/drmP.h: revision 1.36
sys/external/bsd/drm2/include/drm/bus_dma_hacks.h: revision 1.18
sys/external/bsd/drm2/drm/drm_gem_cma_helper.c: revision 1.9
sys/external/bsd/drm2/include/drm/drm_os_netbsd.h: revision 1.15

Arm DMA tags with _nranges=0 require no address translation. Handle this
in PHYS_TO_BUS_MEM and BUS_TO_PHYS_MEM instead of panicing.

Add support for DRM GEM/CMA helpers using a driver provided vmem arena.

Reserve enough memory at boot to support the drmfb buffer plus a 4K buffer
for Xorg.
 1.7.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.4.2 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 06-Feb-2019  christos file sunxi_drm.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.11.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13.2.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.26.2.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.3 19-Dec-2021  riastradh branches: 1.3.2;
sunxi/drm: Use an explicit task queue to avoid config_defer pitfalls.

Same as the other drm drivers.
 1.2 04-Feb-2019  jmcneill branches: 1.2.4;
Add support for vblank irq and RGB overlay planes.
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 04-Feb-2019  christos file sunxi_drm.h was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.3.2.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.12 13-Oct-2025  thorpej Use device_{get,set}prop_bool().
 1.11 19-Dec-2021  riastradh Sort includes.
 1.10 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 24-Nov-2019  jmcneill branches: 1.8.8;
Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.7 23-Nov-2019  jmcneill Set pixel clock on mode set
 1.6 23-Nov-2019  jmcneill HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
 1.5 22-Nov-2019  jmcneill Enable TMDS clock
 1.4 17-Nov-2019  jmcneill Add A64 HDMI audio support.
 1.3 02-Feb-2019  jmcneill branches: 1.3.4; 1.3.6;
Enable regulator if present
 1.2 31-Jan-2019  jmcneill Add support for Allwinner H3/H5 display pipeline.
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.3.6.2 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.3.6.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.3.4.4 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 02-Feb-2019  christos file sunxi_dwhdmi.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.8.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.37 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.

While here, fix a use-after-free bug in the "too many segments" error path in
sunxi_emac_setup_txbuf().
 1.36 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.35 31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.34 07-Nov-2021  jmcneill Handle RGMII variants.
 1.33 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.32 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.31 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.30 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.29 29-Jan-2020  thorpej branches: 1.29.6;
Adopt <net/if_stats.h>.
 1.28 13-Jul-2019  thorpej branches: 1.28.4;
Make failure-to-attach errors a little more informative.
 1.27 23-May-2019  msaitoh -No functional change:
- Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
- Simplify MII structure initialization.
- u_int*_t -> uint*_t.
- KNF
 1.26 09-May-2019  ozaki-r Protect ether_multi list

The list can be racy if NET_MPSAFE is enabled and the driver is executed without
KERNEL_LOCK.

Fix PR 54153
 1.25 22-Apr-2019  maya remove unused mii to fix the build
 1.24 22-Apr-2019  msaitoh On drivers which use MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
 1.23 05-Mar-2019  msaitoh Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.
 1.22 04-Mar-2019  jmcneill Enable hw csum offload by default
 1.21 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.20 18-Oct-2018  martin Make it compile with debugging enabled
 1.19 18-Oct-2018  jmcneill Move MAC soft reset to sunxi_emac_init_locked. Since the MAC can get stuck
in reset state with no link, ignore reset timeouts and continue with
initializing the device.

Fixes "soft reset timeout" issue at boot with no network cable plugged in.
 1.18 14-Oct-2018  martin Make debug code compile again
 1.17 19-Jul-2018  jmcneill Print ethernet address at attach
 1.16 30-Jun-2018  jmcneill Use syscon API instead of mapping syscon registers ourselves.
 1.15 26-Jun-2018  msaitoh branches: 1.15.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.14 01-May-2018  jmcneill Explicitly select external PHY on H6
 1.13 19-Feb-2018  jmcneill branches: 1.13.2;
Add H6 support
 1.12 22-Dec-2017  jmcneill Fix typo in phy-handle property name
 1.11 01-Dec-2017  jmcneill branches: 1.11.2;
More fixes for new emac bindings.
 1.10 30-Nov-2017  jmcneill Add support for new emac bindings
 1.9 16-Nov-2017  ozaki-r Unify IFEF_*_MPSAFE into IFEF_MPSAFE

There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.

Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).

Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.

Proposed on tech-kern@ and tech-net@
 1.8 01-Oct-2017  jmcneill Disable poorly implemented tx interrupt mitigation code, fix checksum
offload support.
 1.7 19-Sep-2017  jmcneill Only attach to the phy specified in dt, if possible.
 1.6 07-Sep-2017  jmcneill Fix a typo that prevented ahb reset from ever being deasserted.
 1.5 07-Sep-2017  jmcneill Add support for Allwinner A64 SoCs.
 1.4 07-Jul-2017  jmcneill branches: 1.4.4; 1.4.6;
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
 1.3 07-Jul-2017  jmcneill Restore TX_INTERVAL_DEFAULT to 64
 1.2 07-Jul-2017  jmcneill Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
 1.1 01-Jul-2017  jmcneill Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.

This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
 1.4.6.2 28-Aug-2017  skrll Sync with HEAD
 1.4.6.1 07-Jul-2017  skrll file sunxi_emac.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.4.4.5 12-May-2019  martin Pull up following revision(s) (requested by ozaki-r in ticket #1259):

sys/arch/arm/sunxi/sunxi_emac.c: revision 1.26

Protect ether_multi list

The list can be racy if NET_MPSAFE is enabled and the driver is executed without
KERNEL_LOCK.

Fix PR 54153
 1.4.4.4 02-Jan-2018  snj Pull up following revision(s) (requested by ozaki-r in ticket #456):
sys/arch/arm/sunxi/sunxi_emac.c: 1.9
sys/dev/ic/dwc_gmac.c: 1.43-1.44
sys/dev/pci/if_iwm.c: 1.75
sys/dev/pci/if_wm.c: 1.543
sys/dev/pci/ixgbe/ixgbe.c: 1.112
sys/dev/pci/ixgbe/ixv.c: 1.74
sys/kern/sys_socket.c: 1.75
sys/net/agr/if_agr.c: 1.43
sys/net/bpf.c: 1.219
sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
sys/net/if_etherip.c: 1.40
sys/net/if_ethersubr.c: 1.243, 1.246
sys/net/if_faith.c: 1.57
sys/net/if_gif.c: 1.132
sys/net/if_l2tp.c: 1.15, 1.17
sys/net/if_loop.c: 1.98-1.101
sys/net/if_media.c: 1.35
sys/net/if_pppoe.c: 1.131-1.132
sys/net/if_spppsubr.c: 1.176-1.177
sys/net/if_tun.c: 1.142
sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
sys/net/npf/npf_ifaddr.c: 1.3
sys/net/npf/npf_os.c: 1.8-1.9
sys/net/rtsock.c: 1.230
sys/netcan/if_canloop.c: 1.3-1.5
sys/netinet/if_arp.c: 1.255
sys/netinet/igmp.c: 1.65
sys/netinet/in.c: 1.210-1.211
sys/netinet/in_pcb.c: 1.180
sys/netinet/ip_carp.c: 1.92, 1.94
sys/netinet/ip_flow.c: 1.81
sys/netinet/ip_input.c: 1.362
sys/netinet/ip_mroute.c: 1.147
sys/netinet/ip_output.c: 1.283, 1.285, 1.287
sys/netinet6/frag6.c: 1.61
sys/netinet6/in6.c: 1.251, 1.255
sys/netinet6/in6_pcb.c: 1.162
sys/netinet6/ip6_flow.c: 1.35
sys/netinet6/ip6_input.c: 1.183
sys/netinet6/ip6_output.c: 1.196
sys/netinet6/mld6.c: 1.90
sys/netinet6/nd6.c: 1.239-1.240
sys/netinet6/nd6_nbr.c: 1.139
sys/netinet6/nd6_rtr.c: 1.136
sys/netipsec/ipsec_output.c: 1.65
sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.
 1.4.4.3 11-Sep-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #269):
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.6
Fix a typo that prevented ahb reset from ever being deasserted.
 1.4.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.4.4.1 07-Jul-2017  snj file sunxi_emac.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.11.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 01-Dec-2017  jdolecek file sunxi_emac.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.13.2.4 26-Jan-2019  pgoyette Sync with HEAD
 1.13.2.3 20-Oct-2018  pgoyette Sync with head
 1.13.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.13.2.1 02-May-2018  pgoyette Synch with HEAD
 1.15.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.2.1 10-Jun-2019  christos Sync with HEAD
 1.28.4.1 29-Feb-2020  ad Sync with head.
 1.29.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 21-Feb-2021  jmcneill Align descriptors to 64 bytes instead of CACHE_LINE_SIZE (128) as all known
Allwinner SoCs with this part use 64-byte cache lines.
 1.4 01-Oct-2017  jmcneill branches: 1.4.2; 1.4.18;
Disable poorly implemented tx interrupt mitigation code, fix checksum
offload support.
 1.3 30-Sep-2017  jmcneill 0xB -> 0xb on previous
 1.2 30-Sep-2017  jmcneill TX DMA status registers start at 0xB0 not 0x80. NFC since these are unused.
 1.1 01-Jul-2017  jmcneill branches: 1.1.4; 1.1.6;
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.

This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 01-Jul-2017  skrll file sunxi_emac.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 01-Jul-2017  snj file sunxi_emac.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.4.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.2.2 03-Dec-2017  jdolecek update from HEAD
 1.4.2.1 01-Oct-2017  jdolecek file sunxi_emac.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8 25-Sep-2022  riastradh sunxidrm: Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.7 19-Dec-2021  riastradh sunxi/drm: Use an explicit task queue to avoid config_defer pitfalls.

Same as the other drm drivers.
 1.6 19-Dec-2021  riastradh Defer call to drmfb_attach, otherwise we lock against ourselves

Mutex error: mutex_vector_enter,542: locking against myself

lockdebug_abort() at ffffffc0004ba3ec netbsd:lockdebug_abort+0xcc
mutex_enter() at ffffffc000476af4 netbsd:mutex_enter+0x3d4
drm_fb_helper_restore_fbdev_mode_unlocked() at ffffffc0003432a8
netbsd:drm_fb_helper_restore_fbdev_mode_unlocked+0x60
drmfb_genfb_setmode() at ffffffc00031c428
netbsd:drmfb_genfb_setmode+0x18
genfb_attach() at ffffffc000377b04 netbsd:genfb_attach+0x10c
drmfb_attach() at ffffffc00031c808 netbsd:drmfb_attach+0x1d0
sunxi_fb_attach() at ffffffc00005a648 netbsd:sunxi_fb_attach+0xd0
config_attach_loc() at ffffffc0004a7174 netbsd:config_attach_loc+0x184
config_found_sm_loc() at ffffffc0004a72a0
netbsd:config_found_sm_loc+0x58
sunxi_drm_fb_probe() at ffffffc00005a078 netbsd:sunxi_drm_fb_probe+0x250
__drm_fb_helper_initial_config_and_unlock() at ffffffc000342bdc
netbsd:__drm_fb_helper_initial_config_and_unlock+0x2a4
sunxi_drm_load() at ffffffc00005a384 netbsd:sunxi_drm_load+0x154
drm_dev_register() at ffffffc00033b728 netbsd:drm_dev_register+0xe0
sunxi_drm_init() at ffffffc000059d40 netbsd:sunxi_drm_init+0x20
config_process_deferred() at ffffffc0004a6efc
netbsd:config_process_deferred+0xac
config_attach_loc() at ffffffc0004a7190 netbsd:config_attach_loc+0x1a0
config_found_sm_loc() at ffffffc0004a72a0
netbsd:config_found_sm_loc+0x58
arm_fdt_attach() at ffffffc000061e34 netbsd:arm_fdt_attach+0x64
config_attach_loc() at ffffffc0004a7174 netbsd:config_attach_loc+0x184
cpu_configure() at ffffffc00005dab4 netbsd:cpu_configure+0x44
main() at ffffffc000605284 netbsd:main+0x2b4
aarch64_start() at ffffffc000001854 netbsd:aarch64_start+0x1054


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.5 19-Dec-2021  riastradh Sort includes.
 1.4 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.3 30-Jan-2019  jmcneill branches: 1.3.4;
Revert previous
 1.2 30-Jan-2019  jmcneill Detach previous console device before attaching drmfb instead of relying on fdt_remove_bycompat hack
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.3.4.2 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 30-Jan-2019  christos file sunxi_fb.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 26-May-2019  jmcneill branches: 1.3.10;
Match allwinner,sun9i-a80-apbs-gates-clk
 1.2 09-Sep-2018  aymeric Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.1 08-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12;
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
 1.1.12.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 08-Jul-2017  jdolecek file sunxi_gates.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 08-Jul-2017  skrll file sunxi_gates.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 08-Jul-2017  snj file sunxi_gates.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.3.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 10-Aug-2024  skrll awge(4): MP improvements

Remove the non-MP-safe scaffolding and make the locking less
coarse.
 1.10 07-Nov-2021  jmcneill branches: 1.10.10;
Handle RGMII variants.
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.7 01-Nov-2019  bad branches: 1.7.8;
fetch PHY id from FDT. same as sunxi_emac.c.

prevents PHY 0 of RTL8211E from wrongly attaching on e.g. Bananpi M1.
requested by jmcneill@, patch by martin@.

XXX pullup-9
 1.6 21-Jul-2019  mrg branches: 1.6.2;
move DWCGMAC_MPSAFE into dwc_gmac_var.h and introduce an
additional define that is 0 or FDT_INTR_MPSAFE that the
frontends can use when passing to fdtbus_intr_establish().

with NET_MPSAFE enabled, this avoids hangs seen on rock64,
as well as finishing the MPSAFE port for this driver.

XXX: still don't know why the existing hangs occur.
 1.5 08-Jul-2019  msaitoh Add rnd(9) support.
 1.4 27-May-2019  jmcneill Enable phy-supply if present
 1.3 23-Feb-2019  martin Adjust all callers of dwc_gmac_attach, pass MII_PHY_ANY for now.
 1.2 07-Oct-2017  jmcneill branches: 1.2.2; 1.2.6;
Support snps,reset-gpio property and deassert optional stmmaceth reset.
 1.1 07-Oct-2017  jmcneill Add support for sun6i/sun7i ethernet
 1.2.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.6.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 07-Oct-2017  jdolecek file sunxi_gmac.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.6.2.1 01-Nov-2019  martin Pull up following revision(s) (requested by bad in ticket #389):

sys/arch/arm/sunxi/sunxi_gmac.c: revision 1.7

fetch PHY id from FDT. same as sunxi_emac.c.

prevents PHY 0 of RTL8211E from wrongly attaching on e.g. Bananpi M1.
requested by jmcneill@, patch by martin@.

XXX pullup-9
 1.7.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10.10.1 02-Aug-2025  perseant Sync with HEAD
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 09-Sep-2018  aymeric branches: 1.2.12;
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.

This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).

ok jmcneill@ on port-arm
 1.1 07-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Add support for sun6i/sun7i ethernet
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 07-Oct-2017  jdolecek file sunxi_gmacclk.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.39 13-Aug-2024  skrll risc-v: Allwinner D1 support

Add the Allwinnder D1 support provided by Rui-Xiang Guo and updated
but me.

https://mail-index.netbsd.org/port-riscv/2024/08/04/msg000127.html

Only driver listed as attaching in

https://github.com/picohive/netbsd-mangopi-mq-pro/blob/main/boot.log

have been added.

There is no need for the platform stuff as the board's u-boot is able
to load bootriscv64.efi and boot a generic kernel.
 1.38 28-Jun-2022  skrll branches: 1.38.10;
Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.37 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.36 24-Apr-2021  thorpej branches: 1.36.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.35 27-Jan-2021  thorpej branches: 1.35.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.34 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.33 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.32 18-Jan-2021  skrll Trailing whitespace
 1.31 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.30 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.29 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.28 27-Aug-2020  skrll branches: 1.28.2;
Avoid undefined behaviour as detected by KUBSAN
 1.27 01-Oct-2019  jmcneill Add support for devices with separate "init" and "default" pinctrl states.
 1.26 04-Jun-2019  tnn branches: 1.26.2;
sunxi_gpio: set interrupt debounce filter to HOSC instead of LOSC

This improves gpio ISR response time from ~1.5ms to ~5us.

The hardware debounce filter is of limited value anyway because if we
at some point want to support interrupts from mechanical switches in
gpiobutton(4) it will still need a software debounce filter to be portable
to devices without hardware debouncing capability.
 1.25 30-May-2019  tnn sunxi_gpio: implement the interrupt API in gpio_chipset_tag

- advertise GPIO pins as interrupt capable via pin_intrcaps
- split establish/disestablish code into fdt attach specific,
gpio attach specific and shared parts, similar to the BCM2835 GPIO driver
 1.24 27-May-2019  jmcneill Fix support for Allwinner-specific pin bindings and add support for pink bank regulators
 1.23 26-Jan-2019  thorpej Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.22 23-Jan-2019  thorpej Implement subroutines for parsing out some of the generic properties
specified in the pinctrl bindings, and adapt Meson, Rockchip, and
Allwinner pinctrl back-ends to use them.

Ok jmcneill@
 1.21 31-May-2018  jmcneill branches: 1.21.2;
sunxi_gpio_release: hold lock around call to sunxi_gpio_ctl
 1.20 03-Apr-2018  bouyer Consistently name the interrupt function "irq" and use this name
in sunxi_gpio_establish(). This is the name used by linux.
 1.19 03-Mar-2018  jmcneill branches: 1.19.2;
Attach H6 gpio
 1.18 07-Nov-2017  skrll branches: 1.18.2;
Trailing whitespace
 1.17 06-Nov-2017  jmcneill Add support for NextThing GR8.
 1.16 11-Oct-2017  jmcneill Add H5 (sun50i) support.
 1.15 08-Oct-2017  jmcneill Add Allwinner A80 (sun9i) support.
 1.14 06-Oct-2017  jmcneill Add sun4i (A10) and sun7i (A20) GPIO support.
 1.13 12-Sep-2017  jmcneill Fix non-MULTIPROCESSOR builds
 1.12 26-Aug-2017  jmcneill branches: 1.12.2;
Add support for interrupt pins.
 1.11 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.10 12-Aug-2017  jmcneill Add support for deprecated pin configuration and multiplex bindings.
 1.9 23-Jul-2017  jmcneill Add sun50i gpio and platform support.
 1.8 08-Jul-2017  jmcneill branches: 1.8.4;
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
 1.7 08-Jul-2017  jmcneill Write back the data value instead of mask in sunxi_gpio_write
 1.6 06-Jul-2017  jmcneill Add support for Allwinner A83T SoC.
 1.5 06-Jul-2017  jmcneill Attach gpio(4) to sunxigpio
 1.4 02-Jul-2017  jmcneill Fix some register definitions.
 1.3 02-Jul-2017  jmcneill Fix typo in a compat string.
 1.2 02-Jul-2017  jmcneill Enable sunxi pinctrl support
 1.1 02-Jul-2017  jmcneill Add basic FDT GPIO support.
 1.8.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.8.4.1 08-Jul-2017  snj file sunxi_gpio.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.12.2.2 28-Aug-2017  skrll Sync with HEAD
 1.12.2.1 26-Aug-2017  skrll file sunxi_gpio.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.18.2.2 03-Dec-2017  jdolecek update from HEAD
 1.18.2.1 07-Nov-2017  jdolecek file sunxi_gpio.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.19.2.3 26-Jan-2019  pgoyette Sync with HEAD
 1.19.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.19.2.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.21.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.2.1 10-Jun-2019  christos Sync with HEAD
 1.26.2.1 03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.28.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.35.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.36.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.38.10.1 02-Aug-2025  perseant Sync with HEAD
 1.11 13-Aug-2024  skrll risc-v: Allwinner D1 support

Add the Allwinnder D1 support provided by Rui-Xiang Guo and updated
but me.

https://mail-index.netbsd.org/port-riscv/2024/08/04/msg000127.html

Only driver listed as attaching in

https://github.com/picohive/netbsd-mangopi-mq-pro/blob/main/boot.log

have been added.

There is no need for the platform stuff as the board's u-boot is able
to load bootriscv64.efi and boot a generic kernel.
 1.10 28-Jun-2022  skrll branches: 1.10.10;
Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.9 27-May-2019  jmcneill Add has_io_bias_config property to sunxi_gpio_padconf
 1.8 18-Feb-2018  jmcneill branches: 1.8.4;
Add support for Allwinner H6 CPUX and CPUS port controllers.
 1.7 08-Oct-2017  jmcneill branches: 1.7.2;
Add Allwinner A80 (sun9i) support.
 1.6 06-Oct-2017  jmcneill Add sun4i (A10) and sun7i (A20) GPIO support.
 1.5 25-Aug-2017  jmcneill branches: 1.5.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.4 23-Jul-2017  jmcneill Add sun50i gpio and platform support.
 1.3 06-Jul-2017  jmcneill branches: 1.3.4;
Add support for Allwinner A83T SoC.
 1.2 02-Jul-2017  jmcneill Enable sunxi pinctrl support
 1.1 02-Jul-2017  jmcneill Add basic FDT GPIO support.
 1.3.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.3.4.1 06-Jul-2017  snj file sunxi_gpio.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.5.2.2 28-Aug-2017  skrll Sync with HEAD
 1.5.2.1 25-Aug-2017  skrll file sunxi_gpio.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.7.2.2 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 08-Oct-2017  jdolecek file sunxi_gpio.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8.4.1 10-Jun-2019  christos Sync with HEAD
 1.10.10.1 02-Aug-2025  perseant Sync with HEAD
 1.14 27-Jan-2021  thorpej branches: 1.14.16;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.12 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.11 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.10 23-Dec-2019  thorpej branches: 1.10.8;
No need to use I2C_F_POLL here.
 1.9 23-Dec-2019  thorpej When deciding to delay (rather than kpause), pay attention to
I2C_F_POLL, not 'cold'.
 1.8 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.7 19-Jul-2019  bouyer Don't allocate edid informations on stack, it's too large (struct edid_info is
near 3KB), and causes a stack overflow, corrupting proc0's struct pcb.
 1.6 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.5 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.4 01-Jun-2018  bouyer branches: 1.4.2;
Defer display hardware reset to pipeline activation. This way, if we have a
pipeline setup which we can't manage, the simple framebuffer will keep working.
 1.3 03-Apr-2018  bouyer branches: 1.3.2;
disable all clocks at end of attach function, and re-enable ahb and mod only
in activate function.
enable ram gate (in debe) and video plls (in tcon) only when the video output
is enabled. Saves about 20mw when both video outputs are off.
 1.2 03-Apr-2018  bouyer A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.
 1.1 03-Apr-2018  bouyer work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.3.2.4 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.2.3 25-Jun-2018  pgoyette Sync with HEAD
 1.3.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.3.2.1 03-Apr-2018  pgoyette file sunxi_hdmi.c was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.4.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.2.1 10-Jun-2019  christos Sync with HEAD
 1.10.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14.16.3 16-Oct-2022  bouyer Propagate videomode back to tcon
 1.14.16.2 16-Oct-2022  bouyer Work in progress: convert sunxi_hdmi to drm
 1.14.16.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.4 23-Nov-2019  jmcneill branches: 1.4.8;
Need to initialize the PHY before HPD sense and DDC will work
 1.3 23-Nov-2019  jmcneill HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
 1.2 31-Jan-2019  jmcneill branches: 1.2.4; 1.2.6;
Add support for Allwinner H3/H5 display pipeline.
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.2.6.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.2.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 31-Jan-2019  christos file sunxi_hdmiphy.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.4.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.2 23-Nov-2019  jmcneill HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
 1.1 30-Jan-2019  jmcneill branches: 1.1.4; 1.1.6;
Add support for Allwinner A64's display pipeline.
 1.1.6.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.1.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 30-Jan-2019  christos file sunxi_hdmiphy.h was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.1 03-Apr-2018  bouyer branches: 1.1.2; 1.1.32;
work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.1.32.1 16-Oct-2022  bouyer Work in progress: convert sunxi_hdmi to drm
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 03-Apr-2018  pgoyette file sunxi_hdmireg.h was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.2 14-Jun-2019  tnn branches: 1.2.10; 1.2.12;
fix typo
 1.1 14-Jun-2019  tnn sunxihstimer: add support for Allwinner High-Speed Timer
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 14-Jun-2019  martin file sunxi_hstimer.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.10 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.9 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.8 29-Feb-2020  isaki branches: 1.8.6;
Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.
 1.7 17-Nov-2019  jmcneill branches: 1.7.2;
Add A64 HDMI audio support.
 1.6 08-Jun-2019  isaki branches: 1.6.2;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.5 06-Jun-2019  jmcneill Update compatible strings for mainline
 1.4 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.3 17-Nov-2018  jmcneill branches: 1.3.2;
TX/RX FIFO are looking for 32-bit samples, so add play/rec filters.
 1.2 16-May-2018  jmcneill branches: 1.2.2; 1.2.4;
Set AUDIO_PROP_INDEPENDENT.
 1.1 10-May-2018  jmcneill Add support for Allwinner A64 audio codec.
 1.2.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2 21-May-2018  pgoyette Sync with HEAD
 1.2.2.1 16-May-2018  pgoyette file sunxi_i2s.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.3.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.3.2.2 04-May-2019  isaki Remove obsoleted methods in audio_hw_if.
- drain: is handled in audio upper layer now.
- mappage: is handled in audio upper layer now.
- setfd: no one uses and it's meaningless now.
 1.3.2.1 27-Apr-2019  isaki Adapt to audio2.
 1.6.2.1 18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #437):

sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.6
sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.13
sys/arch/arm/dts/sun50i-a64-pine64.dts: revision 1.2
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.4
sys/arch/arm/dts/sun50i-a64-pine64-plus.dts: revision 1.3
sys/arch/arm/sunxi/sunxi_i2s.c: revision 1.7
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.14

Add support for A64 I2S clocks.
Add A64 HDMI audio support.
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.
 1.7.2.1 29-Feb-2020  ad Sync with head.
 1.8.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 25-Jun-2022  jmcneill pic: Update ci_cpl in pic_set_priority callback.

Not all ICs need interrupts disabled to update the priority. DAIF accesses
are not cheap, so push the update of ci_cpl from pic_set_priority to the
IC's pic_set_priority callback, and let the IC driver determine whether
or not it needs interrupts disabled.
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.5 07-Jan-2020  skrll branches: 1.5.8;
Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())
 1.4 07-Jan-2020  skrll KNF
 1.3 24-Oct-2017  jmcneill branches: 1.3.2; 1.3.6;
Adjust irq mask/unmask along with enable/disable to make qemu happy
 1.2 11-Oct-2017  jmcneill Remove a bogus KASSERT and clear IRQ pending status as handle them
 1.1 25-Aug-2017  jmcneill branches: 1.1.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.1.2.2 28-Aug-2017  skrll Sync with HEAD
 1.1.2.1 25-Aug-2017  skrll file sunxi_intc.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3.6.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 24-Oct-2017  jdolecek file sunxi_intc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.15 28-Jun-2022  skrll branches: 1.15.2;
Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.14 19-Dec-2021  riastradh Sort includes.
 1.13 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.12 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.10 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.9 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.8 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.7 23-Nov-2019  jmcneill branches: 1.7.8;
Use actual hw mode, not proposed mode.
 1.6 06-Jul-2019  jmcneill branches: 1.6.2;
Fix start_delay calculation for tcon0. port-arm/54342
 1.5 18-Feb-2019  jakllsch branches: 1.5.4;
Fix copy/paste issue that resulted in tcon0 ch0/ch1 crtc clk mixup.
 1.4 04-Feb-2019  jmcneill Add support for vblank irq and RGB overlay planes.
 1.3 03-Feb-2019  jmcneill Add TCON0 support
 1.2 31-Jan-2019  jmcneill Add support for Allwinner H3/H5 display pipeline.
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.5.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.4.2 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 18-Feb-2019  christos file sunxi_lcdc.c was added on branch phil-wifi on 2019-06-10 22:05:57 +0000
 1.6.2.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.7.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.15.2.2 16-Oct-2022  bouyer Abandon sunxi_lcdc for the A20, there's too much pieces missing.
Convert sunxi_tcon to drm. Actually it's connected to DRM only when
in LVDS mode; for HDMI sunxi_hdmi does the interface.
 1.15.2.1 02-Oct-2022  bouyer Patch from Robert Swindells: start converting the A20 console driver to
drm2.
It builds but panics at boot because of missing helper functions for
debe.
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 07-Mar-2018  bouyer branches: 1.1.2; 1.1.16;
fdt-ise the allwinner can and lradc drivers.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.1.2.1 07-Mar-2018  pgoyette file sunxi_lradc.c was added on branch pgoyette-compat on 2018-03-15 09:12:02 +0000
 1.1 07-Mar-2018  bouyer branches: 1.1.2;
fdt-ise the allwinner can and lradc drivers.
 1.1.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.1.2.1 07-Mar-2018  pgoyette file sunxi_lradc.h was added on branch pgoyette-compat on 2018-03-15 09:12:02 +0000
 1.2 06-Feb-2019  skrll branches: 1.2.4;
Trailing whitespace
 1.1 03-Jan-2019  jmcneill branches: 1.1.2;
Add Allwinner A83T SMP support.
 1.1.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.1 03-Jan-2019  pgoyette file sunxi_mc_mpstart.S was added on branch pgoyette-compat on 2019-01-18 08:50:15 +0000
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 06-Feb-2019  christos file sunxi_mc_mpstart.S was added on branch phil-wifi on 2019-06-10 22:05:57 +0000
 1.4 03-Mar-2019  jmcneill branches: 1.4.4;
Fix A83T AP startup
 1.3 03-Jan-2019  jmcneill branches: 1.3.2;
Add Allwinner A80 SMP support.
 1.2 03-Jan-2019  jmcneill Add a link set for cpu enable methods.
 1.1 03-Jan-2019  jmcneill Add Allwinner A83T SMP support.
 1.3.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.3.2.1 03-Jan-2019  pgoyette file sunxi_mc_smp.c was added on branch pgoyette-compat on 2019-01-18 08:50:15 +0000
 1.4.4.2 10-Jun-2019  christos Sync with HEAD
 1.4.4.1 03-Mar-2019  christos file sunxi_mc_smp.c was added on branch phil-wifi on 2019-06-10 22:05:57 +0000
 1.2 03-Jan-2019  jmcneill branches: 1.2.2; 1.2.6;
Add Allwinner A80 SMP support.
 1.1 03-Jan-2019  jmcneill Add Allwinner A83T SMP support.
 1.2.6.2 10-Jun-2019  christos Sync with HEAD
 1.2.6.1 03-Jan-2019  christos file sunxi_mc_smp.h was added on branch phil-wifi on 2019-06-10 22:05:57 +0000
 1.2.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.2.2.1 03-Jan-2019  pgoyette file sunxi_mc_smp.h was added on branch pgoyette-compat on 2019-01-18 08:50:15 +0000
 1.19 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.18 19-Dec-2021  riastradh Sort includes.
 1.17 19-Dec-2021  riastradh Get drm to build on arm64 again.


Author: Jared McNeill <jmcneill@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 1.16 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.14 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.13 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.12 18-Oct-2020  jmcneill branches: 1.12.2;
Treat ARGB/XRGB as BGRA/BGRX on big endian kernels.
 1.11 09-Feb-2020  jakllsch Improve compatibility with newer A64 DE2 DTB endpoint numbers.

Should fix video output with new Linux 5.5rc DTBs on A64/H2/H3/H5-based SoCs.
 1.10 23-Nov-2019  jmcneill branches: 1.10.2;
Do not assume the cursor pitch is the same as the primary fb
 1.9 23-Nov-2019  jmcneill Support non-zero fb start pixels.
 1.8 23-Nov-2019  jmcneill Do not assume that an fb's pitch is width * 4 bytes.
 1.7 16-Feb-2019  jmcneill branches: 1.7.4; 1.7.6;
Fix HDMI output; only install cursor_set/cursor_move funcs if hardware cursor is available.
 1.6 06-Feb-2019  jmcneill Add support for hardware cursors where we can.

As far as I can tell, alpha blending only works between overlay channels,
and not between layers on a channel. Unfortunately, RT-Mixer1 only has
a single UI channel, so this feature is limited to RT-Mixer0.
 1.5 05-Feb-2019  jmcneill Implement page flip API
 1.4 05-Feb-2019  jmcneill Add support for video layer scaling and colour space conversion.
 1.3 04-Feb-2019  jmcneill Add support for vblank irq and RGB overlay planes.
 1.2 31-Jan-2019  jmcneill Add support for Allwinner H3/H5 display pipeline.
 1.1 30-Jan-2019  jmcneill Add support for Allwinner A64's display pipeline.
 1.7.6.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.7.4.3 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.4.2 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 16-Feb-2019  christos file sunxi_mixer.c was added on branch phil-wifi on 2019-06-10 22:05:57 +0000
 1.10.2.1 29-Feb-2020  ad Sync with head.
 1.12.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.48 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.47 24-Apr-2021  thorpej branches: 1.47.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.46 27-Jan-2021  thorpej branches: 1.46.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.45 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.44 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.43 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.42 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.41 07-Mar-2020  macallan branches: 1.41.4;
enable DDR and HS200 modes only on boards which claim to support them
with this eMMC works on libretech,all-h3-cc-h5
also tested on pinebook
ok jmcneill@
 1.40 05-Oct-2019  jmcneill Remove SMC_CAPS_POLLING cap
 1.39 03-Oct-2019  jmcneill Do not print timeout message when SCF_TOUT_OK flag is set
 1.38 03-Oct-2019  jmcneill Rework interrupt handling to reduce the number of wakeups required for
each command. Fix SDIO interrupt handling while here.
 1.37 05-Sep-2019  bouyer The mmc module clock needs to be doubled only for 8bits DDR mode on old
timing hardware.
This makes the lime2-eemc works in 4bits DDR52 mode.
 1.36 01-Sep-2019  jmcneill sunxi_mmc_wait_rint: protect against spurious wakeups
 1.35 01-Sep-2019  jmcneill Instead of delaying ack of sdio card interrupts, ack them immediately and
disable card interrupts until the sdio layer acks them later.
 1.34 01-Sep-2019  jmcneill Keep SDIO interrupt enable state when masking other interrupts
 1.33 27-May-2019  jmcneill branches: 1.33.2;
Enable vmmc-supply if present
 1.32 03-Jan-2019  jmcneill Reduce timeouts and add hw reset support
 1.31 03-Jan-2019  jmcneill Reduce sunxi_mmc_update_clock timeout from 10s to 1s
 1.30 02-Jan-2019  jmcneill Only set signal voltage if the regulator can handle it
 1.29 02-Jan-2019  jmcneill Try to acquire vmmc-supply if present
 1.28 09-Nov-2018  jmcneill Enable new timings and HS200 mode on A64 eMMC
 1.27 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.26 13-Jun-2018  jmcneill branches: 1.26.2;
Revert "use len=0 for max length transfers" part of previous commit.

PR: port-evbarm/53359
 1.25 07-Jun-2018  jmcneill Disable HS200 and DDR52 on A64 eMMC for now, and use len=0 for max length
transfers.
 1.24 21-May-2018  jmcneill Workaround bogus GCC warning about an uninitialized variable
 1.23 17-May-2018  jmcneill Enable MMC HS200 on sun50i-a64
 1.22 15-Apr-2018  jmcneill Simplify interrupt handling by only enabling interrupts for events that
we actually need. After we've consumed the event, mask the interrupt.
 1.21 19-Mar-2018  ryo sunxi: mmc: increase max number of descriptors available for DMA transfers

patch from jmcneill@
 1.20 19-Feb-2018  jmcneill branches: 1.20.2;
Add H6 support
 1.19 08-Jan-2018  jakllsch Fix idma_xferlen for A64/H5 eMMC host controller.
 1.18 30-Dec-2017  jmcneill Add support for A64 eMMC controller
 1.17 15-Nov-2017  jmcneill branches: 1.17.2;
honour non-removable and broken-cd properties
 1.16 28-Oct-2017  jmcneill Add support for A83T eMMC.
 1.15 23-Oct-2017  jmcneill Fix swapped BUS_DMASYNC_POST{READ,WRITE} on bounced commands
 1.14 23-Oct-2017  jmcneill SDIO IO_RW_EXTENDED (CMD53) commands have datalen set but no dmamap. Setup
and use a bounce buffer to service these requests.
 1.13 23-Oct-2017  jmcneill Change SUNXI_MMC_DEBUG to a bitmask, allowing for isolation of specific
device units. Useful for debugging sdio without seeing debug spam from the
SD card.
 1.12 22-Oct-2017  jmcneill If an mmc-pwrseq provider is available, use it
 1.11 21-Oct-2017  jmcneill Add support for sdio interrupts
 1.10 08-Oct-2017  jmcneill Add Allwinner A80 (sun9i) support.
 1.9 08-Oct-2017  jmcneill add sun4i-a10 support
 1.8 07-Oct-2017  jmcneill Fix maximum xfer length for sun7i-a20 compatible controllers
 1.7 11-Sep-2017  jmcneill Add support for sun50i new timing mode and calibration.
 1.6 07-Sep-2017  jmcneill Add support for Allwinner A64 SoCs.
 1.5 27-Aug-2017  jmcneill branches: 1.5.2;
"ahb" reset is optional
 1.4 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.3 17-Jul-2017  jmcneill branches: 1.3.2; 1.3.4;
Add support for eMMC DDR52 transfer mode.
 1.2 16-Jul-2017  jmcneill Add SMC_CAPS_POLLING support.
 1.1 29-Jun-2017  jmcneill Add H3 MMC support
 1.3.4.4 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.3.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #139):
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.2
sys/dev/sdmmc/ld_sdmmc.c: revision 1.31
sys/dev/sdmmc/sdmmc_mem.c: revision 1.61
sys/dev/sdmmc/sdmmcreg.h: revision 1.32
sys/dev/sdmmc/sdmmcvar.h: revision 1.28
Add support for eMMC 4.5's optional cache feature. If a cache is present,
and the host controller reports the SMC_CAPS_POLLING capability (needed
to flush cache at shutdown), it will be automatically enabled and used.
--
Add SMC_CAPS_POLLING support.
 1.3.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.3.4.1 17-Jul-2017  snj file sunxi_mmc.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.3.2.2 17-Jul-2017  jmcneill 2360922
 1.3.2.1 17-Jul-2017  jmcneill file sunxi_mmc.c was added on branch perseant-stdc-iso10646 on 2017-07-17 23:31:06 +0000
 1.5.2.2 28-Aug-2017  skrll Sync with HEAD
 1.5.2.1 27-Aug-2017  skrll file sunxi_mmc.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.17.2.2 03-Dec-2017  jdolecek update from HEAD
 1.17.2.1 15-Nov-2017  jdolecek file sunxi_mmc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.20.2.7 18-Jan-2019  pgoyette Synch with HEAD
 1.20.2.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.20.2.5 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20.2.4 25-Jun-2018  pgoyette Sync with HEAD
 1.20.2.3 21-May-2018  pgoyette Sync with HEAD
 1.20.2.2 22-Apr-2018  pgoyette Sync with HEAD
 1.20.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.26.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.26.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.26.2.1 10-Jun-2019  christos Sync with HEAD
 1.33.2.1 06-Sep-2019  martin Pull up following revision(s) (requested by bouyer in ticket #187):

sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.37

The mmc module clock needs to be doubled only for 8bits DDR mode on old
timing hardware.

This makes the lime2-eemc works in 4bits DDR52 mode.
 1.41.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.46.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.47.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 11-Sep-2017  jmcneill branches: 1.3.2;
Add support for sun50i new timing mode and calibration.
 1.2 17-Jul-2017  jmcneill branches: 1.2.2; 1.2.4; 1.2.6;
Add support for eMMC DDR52 transfer mode.
 1.1 29-Jun-2017  jmcneill Add H3 MMC support
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 17-Jul-2017  skrll file sunxi_mmc.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.2.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #143):
sys/arch/arm/sunxi/files.sunxi: revision 1.12
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_phase.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.3
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.2
Add SDMMC[012] sample/output clock phase controls.
--
Add support for eMMC DDR52 transfer mode.
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 17-Jul-2017  snj file sunxi_mmc.h was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.2.2.2 17-Jul-2017  jmcneill 2360922
 1.2.2.1 17-Jul-2017  jmcneill file sunxi_mmc.h was added on branch perseant-stdc-iso10646 on 2017-07-17 23:31:06 +0000
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 11-Sep-2017  jdolecek file sunxi_mmc.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.5 09-Apr-2018  jakllsch branches: 1.5.14;
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.4 08-Apr-2018  jmcneill Remove MOTG_ALLWINNER option
 1.3 03-Dec-2017  jmcneill branches: 1.3.2;
first param for bs funcs is the cookie, not the tag
 1.2 29-Oct-2017  jmcneill branches: 1.2.2;
Create a custom bus space tag and use it to remap registers instead of
relying on options MOTG_ALLWINNER.
 1.1 09-Sep-2017  jmcneill Add support for USB OTG controllers in "host" mode.
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 29-Oct-2017  jdolecek file sunxi_musb.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.5.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.8 24-Aug-2020  skrll branches: 1.8.2;
Appease gcc when building with KASAN which gave this error before

error: stack usage might be unbounded [-Werror=stack-usage=]
 1.7 05-Jul-2020  skrll Trailing whitespace
 1.6 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.5 15-Nov-2017  jmcneill branches: 1.5.2; 1.5.4; 1.5.6;
Wait for irq instead of polling for cmd completion.
 1.4 13-Nov-2017  jmcneill Use nand_attach_mtdparts
 1.3 13-Nov-2017  jmcneill Correct ecc block size for sw ecc case
 1.2 13-Nov-2017  jmcneill Keep the controller enabled when unselecting, otherwise IO fails.
 1.1 10-Nov-2017  jmcneill Allwinner NAND Flash Controller driver. Work in progress.
 1.5.6.1 10-Jun-2019  christos Sync with HEAD
 1.5.4.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 15-Nov-2017  jdolecek file sunxi_nand.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.8.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12 07-Nov-2021  jmcneill sunxi: nmi: add support for #interrupt-cells 3 bindings
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.7 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.6 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.5 16-Feb-2020  thorpej branches: 1.5.6;
Provide a back-end for fdt_intr_mask() / fdt_intr_unmask().
 1.4 07-Jan-2020  skrll branches: 1.4.2;
Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())
 1.3 07-Jan-2020  skrll KNF
 1.2 27-May-2019  jmcneill Add A80 support
 1.1 02-May-2018  jmcneill branches: 1.1.2; 1.1.4;
Add driver for Allwinner NMI / R_INTC interrupt controller.
 1.1.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 02-May-2018  pgoyette file sunxi_nmi.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.4.2.1 29-Feb-2020  ad Sync with head.
 1.5.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.48 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.47 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.46 28-Jun-2022  skrll Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.45 31-Jul-2021  tnn sunxi_platform: declare UART FIFO sizes for SoCs we support
 1.44 30-Jul-2021  tnn com(4): fix FIFO for DW_APB on Allwinner A20 (got broken by com.c 1.360)

Older DesignWare UARTs do not advertise their FIFO length so we must
provide it via device properties.
 1.43 24-Apr-2021  thorpej branches: 1.43.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.40 28-Sep-2020  jmcneill branches: 1.40.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.39 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.38 24-Nov-2019  jmcneill Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.37 17-Jun-2019  mrg branches: 1.37.2;
avoid allocations in the reboot (maybe crash) path and map the
reset registers in new *platform_bootstrap() functions that
merely move the bus_space_map() here, and then call the
original sunxi_platform_bootstrap().

tested on cubietruck and cubietruck plus.
 1.36 30-Apr-2019  mrg turn on the "sun50i-a64-unstable-timer" workaround on "allwinner,sun8i-a83t"
compatible CPUs. avoids triggering the KASSERT() on cubietruck plus.

idea from jmcneill.
 1.35 03-Feb-2019  jmcneill Support "nomodeset" kernel cmdline flag to disable sunxidrm
 1.34 03-Jan-2019  jmcneill Add Allwinner A80 SMP support.
 1.33 03-Jan-2019  jmcneill Add a link set for cpu enable methods.
 1.32 03-Jan-2019  jmcneill Add Allwinner A83T SMP support.
 1.31 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.30 28-Oct-2018  skrll Restore pre-generic arm commit bootstrap behaviour.

Always call arm_fdt_cpu_bootstrap, i.e. don't depend on "/chosen" existing
in the FDT
 1.29 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.28 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.27 16-Sep-2018  jmcneill port-evbarm/53308: evbarm-earmv7hf performance regression under qemu

Revert gtmr.c r1.27 and apply a workaround for Allwinner A64 SoCs based
on analysis of the issue from LKML: https://lkml.org/lkml/2018/5/10/774

Since this bug is specific to the Allwinner A64 SoC, only apply the
workaround when the root ("/") node of the device tree is compatible
with "allwinner,sun50i-a64".
 1.26 10-Sep-2018  ryo cleanup aarch64 mpstart and fdt bootstrap
* arm_cpu_hatch_arg is a bad idea. avoid serializing CPU startup, and eliminate arm_cpu_hatch_arg.
in mpstart, resolve own cpu index using array of cpu_mpidr[] (aarch64)
* add support fdt enable-method "spin-table"
* add support fdt enable-method "brcm,bcm2836-smp" (for 32bit RaspberryPi)
* use arm_fdt_cpu_bootstrap() instead of psci_fdt_bootstrap()
* rename "arm/fdt/psci_fdt.h" to "arm/fdt/psci_fdtvar.h" because of conflict of include file for needs-flag
* add devmap for cpu spin-table of raspberrypi3/aarch64
* no need to force hatch APs for raspberrypi3/arm32 ifndef MULTIPROCESSOR.
* fix to work pmap_extract(kerneltext/data/bss) even if before calling pmap_bootstrap

idea to use cpu_mpidr[] by jmcneill@. reviewd by skrll@. thanks.
 1.25 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.24 09-Jul-2018  jmcneill Use PSCI to spinup secondary CPUs on sun50i family SoCs.
 1.23 07-Apr-2018  bouyer branches: 1.23.2;
Handle 'console=serial' passed from the bootargs. ok jmcneill@
 1.22 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.21 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.20 03-Mar-2018  jmcneill branches: 1.20.2;
Add H6 support
 1.19 27-Jan-2018  jmcneill Apply RTL8211E "no-tx-delay" workaround to NanoPi NEO Plus2 boards as well.
 1.18 23-Dec-2017  jmcneill Apply RTL8211E 'no-rx-delay' workaround on Pine64+ boards
 1.17 19-Dec-2017  skrll Trailing whitespace
 1.16 06-Nov-2017  jmcneill branches: 1.16.2;
Add support for NextThing GR8.
 1.15 24-Oct-2017  jmcneill sun4i: use Timer 1 instead of Timer 0 for delay, and explicitly enable it
 1.14 23-Oct-2017  jakllsch A couple small adjustments to make big endian (BE8) SUNXI work.
 1.13 22-Oct-2017  skrll Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
 1.12 21-Oct-2017  jmcneill Fix sun4i platform delay to sleep the requested number of microseconds
instead of the requested number of clock ticks.
 1.11 11-Oct-2017  jmcneill Add H5 (sun50i) support.
 1.10 08-Oct-2017  jmcneill Add Allwinner A80 (sun9i) support.
 1.9 06-Oct-2017  jmcneill add platform support for allwinner,sun4i-a10 and allwinner,sun7i-a20
 1.8 03-Sep-2017  jmcneill Add 'console=fb' cmdline support.
 1.7 25-Aug-2017  jmcneill branches: 1.7.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.6 23-Jul-2017  jmcneill Add sun50i gpio and platform support.
 1.5 13-Jul-2017  jmcneill branches: 1.5.4;
Add support for Allwinner H2+ as found in the Orange Pi Zero.
 1.4 06-Jul-2017  jmcneill Add support for Allwinner A83T SoC.
 1.3 02-Jul-2017  jmcneill Add basic support for Allwinner A31.
 1.2 30-Jun-2017  jmcneill Remove unused defines
 1.1 28-Jun-2017  jmcneill Add initial support for Allwinner H3 SoC.
 1.5.4.3 25-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #132):
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.17
Add support for Allwinner H2+ as found in the Orange Pi Zero.
--
Build sun8i-h2-plus-orangepi-zero.dts
 1.5.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.5.4.1 13-Jul-2017  snj file sunxi_platform.c was added on branch netbsd-8 on 2017-07-18 19:13:08 +0000
 1.7.2.2 28-Aug-2017  skrll Sync with HEAD
 1.7.2.1 25-Aug-2017  skrll file sunxi_platform.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.16.2.2 03-Dec-2017  jdolecek update from HEAD
 1.16.2.1 06-Nov-2017  jdolecek file sunxi_platform.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.20.2.9 18-Jan-2019  pgoyette Synch with HEAD
 1.20.2.8 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.20.2.7 20-Oct-2018  pgoyette Sync with head
 1.20.2.6 30-Sep-2018  pgoyette Ssync with HEAD
 1.20.2.5 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20.2.4 28-Jul-2018  pgoyette Sync with HEAD
 1.20.2.3 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.20.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.20.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.23.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23.2.1 10-Jun-2019  christos Sync with HEAD
 1.37.2.1 25-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #470):

sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.4
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.16
sys/dev/ic/dw_hdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_hdmiphy.h: revision 1.2
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.17
sys/dev/ic/dw_hdmi.c: revision 1.6
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.18
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.19
sys/dev/ic/dw_hdmi.h: revision 1.5
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.8
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.9
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.22
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.5
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.6
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.7
sys/arch/arm/sunxi/sunxi_dwhdmi.c: revision 1.8
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.20
sys/arch/arm/sunxi/sunxi_mixer.c: revision 1.10
sys/arch/arm/dts/sun50i-a64-pinebook.dts: revision 1.17
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.38
sys/dev/fdt/fdt_port.c: revision 1.3
sys/dev/fdt/fdt_port.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.5
sys/arch/arm/sunxi/sunxi_lcdc.c: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_fractional.c: revision 1.6
sys/arch/arm/sunxi/sunxi_hdmiphy.c: revision 1.3

Fix CLK_BUS_HDMI bit

Enable TMDS clock

Store the flags passed to SUNXI_CCU_FRACTIONAL macro.
Previously the macro dropped the flags argument entirely, and did not
initialize the structure with it.

Allow bus glue to setup DDC clocks

Add TCON0 clock

HDMI PHY and TX share the same clocks. Do not enable clocks until both
reset resources have been deasserted. Explicitly set DDC clock dividers.
Honour SUNXI_CCU_FRACTIONAL_SET_ENABLE in fractional mode

Use fdtbus_get_reg to read "reg" property

Need to initialize the PHY before HPD sense and DDC will work

Set pixel clock on mode set

Set TCON1 parent to PLL_VIDEO1(1X)

Do not assume that an fb's pitch is width * 4 bytes.

Use actual hw mode, not proposed mode.

Set pre-divider M to 0 in fractional mode, as noted in user manual. Spotted by jak.

Support non-zero fb start pixels.

Set video PLLs to 297MHz

Do not assume the cursor pitch is the same as the primary fb

Enable HDMI and HDMI audio

Try to avoid changing hardware settings when the "nomodeset" kernel arg
is present.
 1.40.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.42.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.43.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3 01-Apr-2018  ryo Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.2 08-Oct-2017  jmcneill branches: 1.2.2; 1.2.4;
Add Allwinner A80 (sun9i) support.
 1.1 28-Jun-2017  jmcneill branches: 1.1.4; 1.1.6;
Add initial support for Allwinner H3 SoC.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 28-Jun-2017  skrll file sunxi_platform.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 28-Jun-2017  snj file sunxi_platform.h was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.2.4.1 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 08-Oct-2017  jdolecek file sunxi_platform.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.7 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 13-Oct-2019  skrll branches: 1.3.8;
Use PRIxBUSADDR
 1.2 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.1 06-May-2018  jmcneill branches: 1.1.2; 1.1.4;
Add driver for Allwinner PWM controller.
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.3 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 21-May-2018  pgoyette Sync with HEAD
 1.1.2.1 06-May-2018  pgoyette file sunxi_pwm.c was added on branch pgoyette-compat on 2018-05-21 04:35:59 +0000
 1.3.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 08-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.24;
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
 1.1.24.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 08-Jul-2017  jdolecek file sunxi_resets.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 08-Jul-2017  skrll file sunxi_resets.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 08-Jul-2017  snj file sunxi_resets.c was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.16 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.15 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.14 27-Jan-2021  thorpej branches: 1.14.4; 1.14.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.12 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.11 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.10 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.9 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.8 22-Dec-2019  thorpej branches: 1.8.8;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.7 26-May-2019  jmcneill Rename cv from old driver name "awinp2wi" to new "sunxirsb"
 1.6 17-Nov-2018  jmcneill Serialize RSB requests.
 1.5 16-Jul-2018  christos Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.4 09-Jul-2018  jmcneill Put RSB controller into known state at the start of every transfer.
 1.3 01-Jul-2018  jmcneill Use fdtbus_attach_i2cbus
 1.2 09-May-2018  thorpej branches: 1.2.2;
If we don't get informed (via device properties) of child I2C devices,
don't assign an empty array to iba.iba_child_devices, as it will prevent
indirect configuration of the I2C bus from occurring.

Tested on Raspberry Pi (bcm2835), identical logical fix replicated
(and compile-tested) elsewhere.

PR port-arm/53171
 1.1 02-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Add P2WI/RSB driver, based on awin_p2wi.c.
 1.1.10.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.10.2 28-Jul-2018  pgoyette Sync with HEAD
 1.1.10.1 21-May-2018  pgoyette Sync with HEAD
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 02-Jul-2017  jdolecek file sunxi_rsb.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jul-2017  skrll file sunxi_rsb.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 02-Jul-2017  snj file sunxi_rsb.c was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.2.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.8.8.2 03-Apr-2021  thorpej Sync with HEAD.
 1.8.8.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.14.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.14.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.1 02-Jul-2017  jmcneill branches: 1.1.4; 1.1.6; 1.1.8;
Add P2WI/RSB driver, based on awin_p2wi.c.
 1.1.8.2 03-Dec-2017  jdolecek update from HEAD
 1.1.8.1 02-Jul-2017  jdolecek file sunxi_rsb.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jul-2017  skrll file sunxi_rsb.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 02-Jul-2017  snj file sunxi_rsb.h was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.12 08-Sep-2025  thorpej Garbage-collect fdtbus_todr_attach(); todr_attach() does all the
necessary work now.

kern/59630
 1.11 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.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 27-Mar-2020  thorpej branches: 1.6.4;
Add the clock providers for the sun6i_a31, sun8i_a23, sun8i_r40, sun8i_v3,
sun8i_h3, sun50i_h5 (same as H3), and sun50i_h6 RTC blocks.
 1.5 05-Sep-2019  thorpej Catch up with RTC-related DTS changes for the H3, H5, and A64 SoCs.

mujo AT SDF.ORG, and verified on Pinebook by Jun Ebihara.

XXX pullup-9
 1.4 16-Jul-2018  christos branches: 1.4.4;
Add missing pointer <-> integer casts
Use PRI?64 to print uint64_t instead 'll?'
 1.3 08-Oct-2017  jmcneill branches: 1.3.2; 1.3.4; 1.3.6;
Add sun4i-a10 RTC support.
 1.2 07-Oct-2017  jmcneill Add sun7i RTC support.
 1.1 29-Jun-2017  jmcneill branches: 1.1.4; 1.1.6;
Add RTC driver.
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 29-Jun-2017  skrll file sunxi_rtc.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.1.4.1 29-Jun-2017  snj file sunxi_rtc.c was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.3.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.6.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 08-Oct-2017  jdolecek file sunxi_rtc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4.4.1 06-Sep-2019  martin Pull up following revision(s) (requested by thorpej in ticket #185):

sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.5

Catch up with RTC-related DTS changes for the H3, H5, and A64 SoCs.
mujo AT SDF.ORG, and verified on Pinebook by Jun Ebihara.
XXX pullup-9
 1.6.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.2 13-May-2019  bouyer branches: 1.2.10;
Use new magic values from linux for DMACR. While I couldn't measure any
significant difference with my old, slow laptop drive, linux commiter claims
a 3x write performance boost (from 40 to 120MB/s) and 200MB/s read with
a ssd.
 1.1 07-Oct-2017  jmcneill branches: 1.1.2; 1.1.6;
Add A10/A20 SATA support
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 07-Oct-2017  jdolecek file sunxi_sata.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8 13-Aug-2024  skrll risc-v: Allwinner D1 support

Add the Allwinnder D1 support provided by Rui-Xiang Guo and updated
but me.

https://mail-index.netbsd.org/port-riscv/2024/08/04/msg000127.html

Only driver listed as attaching in

https://github.com/picohive/netbsd-mangopi-mq-pro/blob/main/boot.log

have been added.

There is no need for the platform stuff as the board's u-boot is able
to load bootriscv64.efi and boot a generic kernel.
 1.7 27-Jan-2021  thorpej branches: 1.7.24;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.6 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 30-Jan-2019  jmcneill branches: 1.3.12;
Match allwinner,sun50i-a64-sid
 1.2 02-Jan-2019  jmcneill Support A83T
 1.1 03-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Add a simple Security ID EFUSE driver.
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 03-Oct-2017  jdolecek file sunxi_sid.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7.24.1 02-Aug-2025  perseant Sync with HEAD
 1.1 05-Oct-2017  jmcneill branches: 1.1.2;
export sunxi_sid_read_tscalib
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 05-Oct-2017  jdolecek file sunxi_sid.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 24-Jan-2021  thorpej Change of_search_compable() to return NULL on no-match, which is much more
sensible than the previous behavior. As such, back out rev 1.7 of
sunxi_sramc.c. All other of_search_compable() call sites have been audited.
 1.7 20-Jan-2021  jmcneill Fix previous; of_search_compatible returns the sentinel when there is no
match, so we need to test ->data for NULL, not the return value.
 1.6 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than matching
against multiple sets of compatibility strings.
 1.5 11-Jul-2019  macallan branches: 1.5.10;
add compat string for H5

ok jmcneill@
 1.4 06-Feb-2019  jmcneill Match new sun4i-a10 compat string (allwinner,sun4i-a10-system-control)
 1.3 31-Jan-2019  jmcneill Match H3 system control
 1.2 22-Jan-2019  jmcneill Add support for A64 and H6, and register self as a syscon
 1.1 09-Oct-2017  jmcneill branches: 1.1.2; 1.1.4; 1.1.6;
Add driver for sun4i SRAM controller.
 1.1.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 09-Oct-2017  jdolecek file sunxi_sramc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 09-Oct-2017  jmcneill branches: 1.1.2;
Add driver for sun4i SRAM controller.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 09-Oct-2017  jdolecek file sunxi_sramc.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.13 20-Aug-2021  andvar branches: 1.13.2;
fix various typos in comments and log messages.
 1.12 19-Aug-2021  andvar s/memry/memory+s/softare/software/+s/grapics/graphics+s/ouput/output
 1.11 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.9 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.8 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.7 01-Jun-2018  bouyer branches: 1.7.14;
Defer display hardware reset to pipeline activation. This way, if we have a
pipeline setup which we can't manage, the simple framebuffer will keep working.
 1.6 07-Apr-2018  bouyer Allow the graphic driver to be the kernel's console.
Match either from the allwinner,pipeline entry in the simple-framebuffer
fdt entry, or from console= from the command line.
console=fb0 and console=fb1 selects display backend unit 0 or 1 respectively;
console=fb selects the first activated display backend.
 1.5 06-Apr-2018  bouyer branches: 1.5.2;
Fix bad cut'n'paste, pointed out by David Binderman in PR port-arm/53158
 1.4 04-Apr-2018  bouyer Reset more regs at attach time, just in case.
As the mux is in unit 0 but is used by both units, we have to keep
unit 0's ahb clock enabled.
Properly set sc_output_type.

Now pipeline 1 can be activated without activating pipeline 0 first.
 1.3 03-Apr-2018  bouyer disable all clocks at end of attach function, and re-enable ahb and mod only
in activate function.
enable ram gate (in debe) and video plls (in tcon) only when the video output
is enabled. Saves about 20mw when both video outputs are off.
 1.2 03-Apr-2018  bouyer A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.
 1.1 03-Apr-2018  bouyer work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.5.2.4 25-Jun-2018  pgoyette Sync with HEAD
 1.5.2.3 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.5.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.5.2.1 06-Apr-2018  pgoyette file sunxi_tcon.c was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.7.14.1 03-Apr-2021  thorpej Sync with HEAD.
 1.13.2.3 16-Oct-2022  bouyer sunxi_tcon1_set_videomode: use DRM_MODE_FLAGS_*
 1.13.2.2 16-Oct-2022  bouyer sunxi_tcon1_set_videomode() wants a drm_display_mode
 1.13.2.1 16-Oct-2022  bouyer Abandon sunxi_lcdc for the A20, there's too much pieces missing.
Convert sunxi_tcon to drm. Actually it's connected to DRM only when
in LVDS mode; for HDMI sunxi_hdmi does the interface.
 1.1 03-Apr-2018  bouyer branches: 1.1.2;
work in progress on porting graphics drivers from arm/allwinner to fdt.
sunxidebe: display backend drivers
sunxitcon: lcd controller driver
sunxihdmi: hdmi controller driver
sunxidep: display engine pipeline driver. Its role is only to parse the
fdt display-engine node, and activate de backend drivers based on the
content of allwinner,pipelines

So far HDMI and lvds output works, in dual-framebuffer mode.
It has only been tested on A20. It should be OK on the A10 too, but
will likely need more work for other SoCs.
Console is not handled yet, and it conflicts with the simplefb driver if
it has been activated by u-boot.
 1.1.2.2 07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1 03-Apr-2018  pgoyette file sunxi_tconreg.h was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.16 02-May-2023  jmcneill Cleanup previous: Try new bindings first, document old with DTCOMPAT, KNF
 1.15 02-May-2023  macallan apparently the 'ahb' and 'ths' clocks were renamed to 'bus' and 'mod' in the
fdt at some point, so look for those as well
with this my pinebook's sensors work again
 1.14 07-Nov-2021  jmcneill branches: 1.14.4;
dts: adapt to dts-5.15 bindings
 1.13 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.12 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.11 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.10 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.9 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.8 01-Jan-2020  thorpej branches: 1.8.8;
- Introduce a new global kernel variable "shutting_down" to indicate that
the system is shutting down or rebooting.
- Set this global in a new function called kern_reboot(), which is currently
just a basic wrapper around cpu_reboot().
- Call kern_reboot() instead of cpu_reboot() almost everywhere; a few
places remain where it's still called directly, but those are in early
pre-main() machdep locations.

Eventually, all of the various cpu_reboot() functions should be re-factored
and common functionality moved to kern_reboot(), but that's for another day.
 1.7 02-Jan-2019  jmcneill Clocks and resets are not present on all SoCs
 1.6 21-Aug-2018  bsiegert Fix two typos in the Sunxi thermal driver.

Noticed by rudolf in PR port-arm/53537.

ok jmcneill@
 1.5 28-Jan-2018  jmcneill branches: 1.5.2; 1.5.4;
Add support for H5 CPU and GPU thermal sensors.
 1.4 13-Dec-2017  jmcneill Fix regression introduced in r1.2
 1.3 01-Nov-2017  kre branches: 1.3.2;

Complete last change...
 1.2 01-Nov-2017  pgoyette Simplify, and avoid compiler warning for variable format string.

As discussed on IRC.
 1.1 05-Oct-2017  jmcneill Add driver for thermal sensor controller found in Allwinner H3, A64, and
A83T SoCs.
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 01-Nov-2017  jdolecek file sunxi_thermal.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.4.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.5.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.8.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.14.4.1 04-May-2023  martin Pull up following revision(s) (requested by jmcneill in ticket #156):

sys/arch/arm/sunxi/sunxi_thermal.c: revision 1.15
sys/arch/arm/sunxi/sunxi_thermal.c: revision 1.16

apparently the 'ahb' and 'ths' clocks were renamed to 'bus' and 'mod' in the

fdt at some point, so look for those as well
with this my pinebook's sensors work again

Cleanup previous: Try new bindings first, document old with DTCOMPAT, KNF
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.7 14-Jun-2019  tnn branches: 1.7.10;
fix typo
 1.6 27-Mar-2019  tnn ensure LOSC is configured for external clock
 1.5 27-Mar-2019  tnn fix wrong counter_mask assignment due to typo in previous
 1.4 26-Mar-2019  tnn Register a timecounter source for the 32.768kHz low-power oscillator,
if it is physically present. It is preferable for timekeeping in
offline scenarios because it generally has much better long-term
frequency stability than the platform XO.

XXX: should it have higher quality rating than the 24MOSC?
I made it lower quality for now to avoid surprises for users.
 1.3 16-Dec-2017  jmcneill branches: 1.3.4;
Use Timer 2 instead of the 64-bit counter as a timecounter so we can use it
in MP configurations. Should be faster as well since we don't have to do
the 64-bit counter read latch dance here.
 1.2 25-Aug-2017  jmcneill branches: 1.2.2; 1.2.4;
Use the 64-bit counter as timecounter, and only use it in UP configs.
 1.1 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.2.4.2 03-Dec-2017  jdolecek update from HEAD
 1.2.4.1 25-Aug-2017  jdolecek file sunxi_timer.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.2 28-Aug-2017  skrll Sync with HEAD
 1.2.2.1 25-Aug-2017  skrll file sunxi_timer.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.3.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.4.1 10-Jun-2019  christos Sync with HEAD
 1.7.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

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

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.4 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.3 04-Jun-2019  thorpej branches: 1.3.10;
Only call wsmouse_input() if we have a wsmousedev attached (which only
happens if the DT tells us to connect one).

Fixes a panic on my Lamobo R1 (with no connected touchscreen).
 1.2 09-Oct-2017  jmcneill branches: 1.2.2; 1.2.6;
Add support for sun4i and sun6i, and enable temperature sensor support.
 1.1 27-Aug-2017  jmcneill Add sun5i touchscreen driver.
 1.2.6.1 10-Jun-2019  christos Sync with HEAD
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 09-Oct-2017  jdolecek file sunxi_ts.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.8.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.20 25-Sep-2025  thorpej Don't use a property to set a value in the front end that can simply
be set directly in the softc instead.
 1.19 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.18 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.17 27-Jan-2021  thorpej branches: 1.17.4; 1.17.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.16 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.15 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.14 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.13 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.12 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.11 12-Jan-2020  thorpej branches: 1.11.6;
Clean up gttwsi's register access stuff:
- Garbage-collect the obsolete GTTWSI_ALLWINNER option; it hasn't been
needed since FDT'ization of the Allwinner support code.
- Redefine thw "TWSI_*" register definitions to clearly call out:
-> The Marvell flavor of the offsets
-> The Allwinner flavor of the offsets
...and make the regular definitions indices into a register map.
- Pass the appropriate register map from the front-end to the core.
- Remove the customer register read/write callbacks -- they are no longer
needed now that each front-end passes an appropriate register map to
the core.
 1.10 01-Jul-2018  jmcneill branches: 1.10.6;
Use fdtbus_attach_i2cbus
 1.9 09-May-2018  thorpej branches: 1.9.2;
If we don't get informed (via device properties) of child I2C devices,
don't assign an empty array to iba.iba_child_devices, as it will prevent
indirect configuration of the I2C bus from occurring.

Tested on Raspberry Pi (bcm2835), identical logical fix replicated
(and compile-tested) elsewhere.

PR port-arm/53171
 1.8 02-Dec-2017  jmcneill branches: 1.8.2; 1.8.4;
Support nodes w/o a defined clock.
 1.7 30-Nov-2017  jmcneill Set twi clock based on parent clock, and fix register remapping for writes.
 1.6 29-Oct-2017  jmcneill sunxi_twi: provide custom read/write reg callbacks and remove the
GTTWSI_ALLWINNER option from the kernel config
 1.5 07-Oct-2017  jmcneill Initialize TWI clock rate to 100kHz
 1.4 02-Oct-2017  jmcneill Set iflg-rwc for sun6i-a31 compatible devices.
 1.3 25-Aug-2017  jmcneill branches: 1.3.2;
Add initial support for Allwinner A13 and R8 SoCs.
 1.2 01-Jul-2017  jmcneill branches: 1.2.4;
Fix dmesg
 1.1 29-Jun-2017  jmcneill Add i2c glue.
 1.2.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.2.4.1 01-Jul-2017  snj file sunxi_twi.c was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 25-Aug-2017  skrll file sunxi_twi.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.8.4.2 28-Jul-2018  pgoyette Sync with HEAD
 1.8.4.1 21-May-2018  pgoyette Sync with HEAD
 1.8.2.2 03-Dec-2017  jdolecek update from HEAD
 1.8.2.1 02-Dec-2017  jdolecek file sunxi_twi.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.9.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.1 10-Jun-2019  christos Sync with HEAD
 1.10.6.1 17-Jan-2020  ad Sync with head.
 1.11.6.2 03-Apr-2021  thorpej Sync with HEAD.
 1.11.6.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.17.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.17.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.3 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.2 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.1 01-May-2018  jmcneill branches: 1.1.2; 1.1.16;
Add driver for Allwinner USB3 PHY.
 1.1.16.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 01-May-2018  pgoyette file sunxi_usb3phy.c was added on branch pgoyette-compat on 2018-05-02 07:20:04 +0000
 1.18 13-Aug-2024  skrll risc-v: Allwinner D1 support

Add the Allwinnder D1 support provided by Rui-Xiang Guo and updated
but me.

https://mail-index.netbsd.org/port-riscv/2024/08/04/msg000127.html

Only driver listed as attaching in

https://github.com/picohive/netbsd-mangopi-mq-pro/blob/main/boot.log

have been added.

There is no need for the platform stuff as the board's u-boot is able
to load bootriscv64.efi and boot a generic kernel.
 1.17 28-Jun-2022  skrll branches: 1.17.10;
Add support for Lichee Pi Zero from Rui-Xiang Guo on port-arm
 1.16 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.15 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.14 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.13 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.12 14-May-2020  msaitoh branches: 1.12.2;
Remove extra semicolon.
 1.11 19-Feb-2018  jmcneill Add support for H6 USB PHY
 1.10 28-Oct-2017  jmcneill branches: 1.10.2;
Add A83T USB PHY support
 1.9 06-Oct-2017  jmcneill Add sun4i (A10) and sun7i (A20) USB PHY support
 1.8 09-Sep-2017  jmcneill Add PHY init for OTG ports in host mode.
 1.7 07-Sep-2017  jmcneill Fix A64 PHY enable
 1.6 07-Sep-2017  jmcneill Add support for Allwinner A64 SoCs.
 1.5 25-Aug-2017  jmcneill branches: 1.5.2;
Lookup reg resources by name instead of index; fixes USB on non-H3/A64 SoCs
 1.4 25-Aug-2017  jmcneill Add initial support for Allwinner A13 and R8 SoCs.
 1.3 02-Jul-2017  jmcneill branches: 1.3.4;
Add basic support for Allwinner A31.
 1.2 29-Jun-2017  jmcneill PHY registers start at index 1. Now USB works.
 1.1 29-Jun-2017  jmcneill Add USB stuff. Doesn't quite work yet.
 1.3.4.2 18-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #114):
sys/arch/arm/samsung/exynos_intr.h: revision 1.3
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_gates.c: revision 1.1
distrib/utils/embedded/mkimage: revision 1.66
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_rsb.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.5
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.6
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.7
sys/dev/gpio/gpio.c: revision 1.59
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.1
sys/conf/Makefile.kern.inc: revision 1.257
sys/arch/evbarm/conf/ODROID-XU_INSTALL: file removal
sys/arch/arm/sunxi/sunxi_ccu_prediv.c: revision 1.2
sys/conf/Makefile.kern.inc: revision 1.258
sys/arch/arm/fdt/psci_fdt.h: revision 1.1
sys/arch/arm/sunxi/sunxi_resets.c: revision 1.1
sys/arch/evbarm/conf/files.sunxi: revision 1.1
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.8
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.9
sys/arch/arm/samsung/files.exynos: revision 1.22
distrib/utils/embedded/conf/armv7.conf: revision 1.13
sys/arch/arm/samsung/files.exynos: revision 1.23
sys/arch/evbarm/conf/std.tegra: revision 1.15
distrib/utils/embedded/conf/armv7.conf: revision 1.14
sys/arch/arm/samsung/files.exynos: revision 1.24
distrib/utils/embedded/conf/armv7.conf: revision 1.15
sys/arch/evbarm/sunxi/genassym.cf: revision 1.1
sys/arch/arm/samsung/exynos_fdt.c: file removal
sys/dev/fdt/fdt_pinctrl.c: revision 1.4
sys/arch/arm/samsung/exynos_sysmmu.c: revision 1.2
sys/arch/arm/sunxi/sun8i_h3_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.1
sys/dev/usb/ehci.c: revision 1.255
sys/arch/arm/sunxi/sunxi_twi.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_ccu.h: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.11
sys/arch/arm/cortex/gic.c: revision 1.24
distrib/evbarm/instkernel/ramdisk/Makefile: revision 1.17
etc/etc.evbarm/Makefile.inc: revision 1.87
etc/etc.evbarm/Makefile.inc: revision 1.88
sys/arch/arm/fdt/gic_fdt.c: revision 1.5
etc/Makefile: revision 1.429
sys/arch/arm/fdt/gic_fdt.c: revision 1.6
sys/arch/arm/fdt/gic_fdt.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.2
sys/arch/evbarm/conf/std.sunxi: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.3
sys/arch/evbarm/conf/std.sunxi: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.4
sys/arch/evbarm/conf/std.sunxi: revision 1.3
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu_div.c: revision 1.1
sys/dev/gpio/gpiovar.h: revision 1.17
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.6
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.7
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.8
sys/arch/arm/sunxi/sunxi_rsb.h: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.12
sys/dev/fdt/fdtvar.h: revision 1.21
sys/arch/evbarm/sunxi/sunxi_start.S: revision 1.1
sys/arch/arm/samsung/exynos_i2c.c: revision 1.13
sys/dev/fdt/fdtvar.h: revision 1.22
sys/arch/evbarm/conf/SUNXI: revision 1.10
sys/dev/fdt/fdtvar.h: revision 1.23
sys/arch/evbarm/conf/SUNXI: revision 1.11
sys/dev/fdt/gpioleds.c: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.24
sys/arch/evbarm/conf/SUNXI: revision 1.12
sys/arch/evbarm/conf/SUNXI: revision 1.13
sys/arch/arm/cortex/gic.c: revision 1.30
sys/arch/evbarm/conf/SUNXI: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.16
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.1
etc/Makefile: revision 1.430
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.2
etc/Makefile: revision 1.431
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.17
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.3
sys/arch/arm/sunxi/sunxi_emac.c: revision 1.4
sys/arch/arm/samsung/exynos5422_clock.c: revision 1.6
sys/arch/arm/samsung/exynos_platform.c: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.29
sys/arch/arm/samsung/exynos_platform.c: revision 1.2
sys/arch/evbarm/conf/mk.vexpress: revision 1.3
sys/arch/arm/samsung/exynos_platform.c: revision 1.3
sys/arch/evbarm/conf/mk.vexpress: revision 1.4
sys/arch/arm/samsung/exynos_platform.c: revision 1.4
sys/arch/arm/arm/psci.h: revision 1.1
sys/arch/arm/samsung/exynos_platform.c: revision 1.5
sys/arch/arm/samsung/exynos_platform.c: revision 1.6
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.10
external/bsd/mdocml/bin/mandoc/Makefile: revision 1.12
sys/dev/fdt/files.fdt: revision 1.17
sys/dev/fdt/files.fdt: revision 1.18
sys/dev/fdt/files.fdt: revision 1.19
sys/arch/arm/samsung/exynos_sscom.c: revision 1.8
sys/arch/arm/sunxi/sun8i_a83t_ccu.c: revision 1.1
sys/arch/arm/sunxi/sunxi_mmc.c: revision 1.1
sys/arch/arm/samsung/exynos_sscom.c: revision 1.9
sys/arch/arm/conf/files.arm: revision 1.133
sys/arch/arm/samsung/mct_var.h: revision 1.5
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.2
sys/arch/evbarm/conf/std.vexpress: revision 1.6
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.3
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.1
sys/arch/arm/sunxi/sunxi_platform.c: revision 1.4
sys/arch/arm/sunxi/sun6i_a31_gpio.c: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.1
sys/dev/ofw/ofw_subr.c: revision 1.30
sys/arch/arm/sunxi/files.sunxi: revision 1.2
sys/dev/ofw/openfirm.h: revision 1.35
sys/arch/arm/sunxi/files.sunxi: revision 1.3
sys/dev/ofw/openfirm.h: revision 1.36
sys/arch/arm/sunxi/files.sunxi: revision 1.4
sys/arch/arm/sunxi/files.sunxi: revision 1.5
sys/arch/evbarm/exynos/exynos_machdep.c: file removal
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.1
sys/arch/arm/samsung/sscom.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.6
sys/dev/fdt/ohci_fdt.c: revision 1.1
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.1
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.2
sys/arch/arm/sunxi/files.sunxi: revision 1.7
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.2
sys/arch/arm/sunxi/sunxi_gpio.h: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.8
sys/arch/arm/sunxi/sunxi_usbphy.c: revision 1.3
sys/arch/arm/sunxi/files.sunxi: revision 1.9
sys/arch/arm/samsung/exynos_sscom.c: revision 1.10
sys/arch/evbarm/conf/mk.tegra: revision 1.5
sys/arch/arm/samsung/exynos_dwcmmc.c: revision 1.4
sys/arch/evbarm/conf/mk.tegra: revision 1.6
sys/arch/evbarm/conf/EXYNOS: revision 1.15
sys/arch/evbarm/conf/EXYNOS: revision 1.16
sys/arch/evbarm/conf/EXYNOS: revision 1.17
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.19
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.c: revision 1.5
sys/arch/arm/sunxi/sunxi_emac.h: revision 1.1
sys/arch/evbarm/conf/mk.sunxi: revision 1.1
sys/arch/evbarm/include/bootconfig.h: revision 1.7
sys/arch/evbarm/conf/TEGRA: revision 1.24
sys/arch/arm/arm/psci.c: revision 1.1
sys/dev/led.c: revision 1.1
sys/dev/led.c: revision 1.2
sys/arch/arm/arm/psci_arm.S: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_gate.c: revision 1.2
sys/dev/fdt/ehci_fdt.c: revision 1.1
sys/dev/fdt/ehci_fdt.c: revision 1.2
sys/arch/arm/sunxi/sun6i_a31_ccu.h: revision 1.1
sys/arch/evbarm/conf/EXYNOS: revision 1.21
sys/arch/arm/sunxi/files.sunxi: revision 1.10
sys/arch/arm/sunxi/files.sunxi: revision 1.11
sys/dev/fdt/fdtbus.c: revision 1.14
sys/arch/arm/sunxi/sunxi_mmc.h: revision 1.1
sys/arch/arm/samsung/exynos5422_dma.c: file removal
usr.bin/config/mkmakefile.c: revision 1.69
sys/conf/files: revision 1.1178
sys/arch/arm/sunxi/sunxi_platform.h: revision 1.1
sys/arch/evbarm/exynos/exynos_start.S: revision 1.4
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.11
sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.12
sys/arch/arm/sunxi/sunxi_rtc.c: revision 1.1
sys/arch/arm/sunxi/sun8i_h3_ccu.h: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.1
sys/arch/arm/samsung/exynos5410_clock.c: revision 1.2
sys/arch/evbarm/conf/SUNXI: revision 1.1
external/bsd/elftosb/usr.sbin/elftosb/Makefile: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.2
sys/arch/arm/fdt/psci_fdt.c: revision 1.1
sys/arch/evbarm/conf/SUNXI: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.4
sys/arch/evbarm/conf/files.exynos: revision 1.3
sys/arch/evbarm/conf/SUNXI: revision 1.5
sys/arch/evbarm/conf/SUNXI: revision 1.6
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.1
sys/dev/fdt/fixedfactorclock.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.14
sys/arch/evbarm/conf/SUNXI: revision 1.7
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.2
sys/arch/arm/sunxi/sun8i_a83t_gpio.c: revision 1.1
sys/dev/fdt/fdt_subr.c: revision 1.15
sys/arch/evbarm/conf/SUNXI: revision 1.8
sys/arch/arm/sunxi/sunxi_ccu_nm.c: revision 1.3
sys/dev/ic/dwc_mmc_reg.h: revision 1.6
sys/dev/fdt/fdt_subr.c: revision 1.16
sys/arch/evbarm/conf/SUNXI: revision 1.9
usr.bin/config/mkmakefile.c: revision 1.70
sys/dev/fdt/fdt_phy.c: revision 1.1
sys/arch/evbarm/conf/ODROID-XU: file removal
sys/arch/arm/fdt/arm_fdt.c: revision 1.4
sys/arch/arm/samsung/exynos_reg.h: revision 1.14
sys/conf/files: revision 1.1180
sys/arch/arm/samsung/exynos_reg.h: revision 1.15
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.4
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.5
sys/arch/arm/sunxi/sunxi_ccu.h: revision 1.6
sys/dev/ic/dwc_mmc_var.h: revision 1.6
sys/arch/arm/samsung/exynos_combiner.c: revision 1.7
sys/arch/evbarm/exynos/platform.h: revision 1.2
sys/arch/arm/fdt/files.fdt: revision 1.12
sys/arch/evbarm/conf/std.exynos: revision 1.2
sys/arch/evbarm/conf/std.exynos: revision 1.3
sys/arch/arm/rockchip/rockchip_dwcmmc.c: revision 1.6
sys/arch/arm/sunxi/sunxi_com.c: revision 1.1
sys/dev/led.h: revision 1.1
sys/arch/evbarm/conf/std.exynos: revision 1.5
sys/arch/arm/sunxi/sunxi_com.c: revision 1.2
sys/arch/evbarm/conf/files.evbarm: revision 1.26
usr.bin/config/defs.h: revision 1.99
sys/arch/arm/fdt/arm_fdtvar.h: revision 1.6
sys/arch/arm/samsung/exynos_soc.c: revision 1.32
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.1
sys/arch/arm/sunxi/sun6i_a31_ccu.c: revision 1.2
sys/arch/arm/samsung/mct.c: revision 1.11
sys/arch/evbarm/conf/ODROID-U: file removal
sys/arch/arm/samsung/mct.c: revision 1.12
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.1
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.2
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.3
sys/arch/arm/sunxi/sunxi_ccu_nkmp.c: revision 1.4
Get the EXYNOS kernel building again with recent FDT changes. Untested.
Use arm_fdt_cpu_hatch and add mmu entry for DTB
Fix exynos5 devmap, bootstrap, and implement early_putchar.
Calculate UART frequency based on bootloader config.
Fix KERNEL_BASE_PHYS (how did this ever work?)
Avoid divide-by-zero for unconfigured PLLs
Correctly initialize i2cbus attach args.
Add delay and enable mct timecounter.
Fix build w/o VERBOSE_INIT_ARM
Remove ODROID-U and ODROID-XU kernel configs as they no longer work.
- Replace CONSADDR with SSCOM2CONSOLE in example
- Remove gtmr (Exynos5422 uses mct)
- cinclude EXYNOS.local instead of TEGRA.local
Use fdtbus_intr_establish to hook in block interrupts instead of
intr_establish.
Simplify MCT; just enable it and then attach an ARMv7 generic timer.
Add support for building DTB files during kernel build, from christos.
build vexpress-v2p-ca15-tc1.dtb with the kernel
build tegra124-apalis-eval.dtb, tegra124-jetson-tk1.dtb, tegra124-nyan-big.dtb, tegra124-nyan-blaze.dtb, and tegra124-venice2.dtb with the kernel
Allow multiline makeoptions to work by quoting the newline..
Bump for quoting makeoptions with multiple lines.
un-c99
bump required config version for multiline makeoptions feature
Set DTS makeoption in kernel config
Assign DTB files to a variable so we can make -V DTB
put the dtb files with their kernels.
no need for debug printing.
Don't assume that CPU index = GIC CPU interface number. We can determine
the current CPU interface number by reading from the read-only
GICD_ITARGETSR0 through GICD_ITARGETSR7 registers.
This gets interrupts working on Exynos 5422, where the boot processor has
GIC CPU interface #4.
use -v to get the expanded variable.
Use -v to get the expanded variables.
Get baud rate from sclk_uartN instead of uartN. Print IRQ number at attach.
Fix PLL con0 register locations and add uart clocks
Disable exyortc for now, it doesn't work.
More or less a rewrite of dwc_mmc, based on awin_mmc, adding DMA support.
Update for new dwc_mmc driver
Fix dmesg
Add Exynos 5410 clock controller driver.
Fix a few typos in clock parent names for mmc clocks.
From jmcneill@
Update for new dwc_mmc driver
Implement platform reset for exynos5
Attach fdtbus to a /clocks node with no compatible string.
Add support for ARM Power State Coordination Interface (PSCI).
Support interrupt sharing.
Add initial support for Allwinner H3 SoC.
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.
Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.
Add H3 MMC support
SD/MMC clock fixes
Add FDT PHY interface.
Add glue for generic ehci/ohci bindings.
Rename a variable, NFC.
Support parents in different clock domains.
Add USB stuff. Doesn't quite work yet.
Synopsys DesignWare APB UART needs "options COM_AWIN" for now.
Add i2c glue.
Add RTC driver.
PHY registers start at index 1. Now USB works.
Don't allow sharing edge and level triggered interrupts.
Add arm_fdt_memory_dump helper for dumping physical addresses from ddb
Print clocks with aprint_debug
Remove unused defines
Add fdtbus_get_string helper
Add of_search_compatible, which searches an array of compat_data structures
for a matching "compatible" entry matching the supplied OFW node. This
allows us to associate data with compatible strings.
Add driver for Allwinner Gigabit Ethernet (EMAC) as found in sun8i and
later family SoCs.
This is a port of my FreeBSD driver which has been confirmed to work on
Allwinner H3, A83T, and A64 SoCs.
Fix dmesg
Add basic support for Allwinner A31.
Add basic FDT GPIO support.
Fix the pinctrl api to match the spec. A pinctrl config can have more
than one xref, and an xref may have specifier data associated with it.
Enable sunxi pinctrl support
Adjust to new pinctrl API
Add P2WI/RSB driver, based on awin_p2wi.c.
Fix typo in a compat string.
Configure pin defaults at attach
No need to explicitly set pinctrl config 0 now
Fix some register definitions.
Disallow sharing between MPSAFE and non-MPSAFE handlers.
Add of_match_compat_data.
This routine searches an array of compat_data structures for a
matching "compatible" entry matching the supplied OFW node.
Add options __HAVE_CPU_UAREA_ALLOC_IDLELWP
Add support for reserved memory and MEMORY_DISK_DYNAMIC for FDT-based
kernels.
the extent code cannot use the full range of u_long,
so ignore the last page before 4GB too. ok jmcneill@
Copy install ramdisk to releasedir. Provide both a raw ffs and
Legacy U-Boot version of it.
Replace HUMMINGBIRD_A31 with SUNXI kernel on armv7.img and include .dtb
files for SUNXI and TEGRA kernels on the MSDOS partition.
Let the controller provide a default name for pins. This makes pins easier
to locate when we have multiple banks and a variable number of pins per
bank.
Attach gpio(4) to sunxigpio
Test for kernel build directory before reading DTB list
Add support for Allwinner A83T SoC.
Add A83T files
Fixup busdma sync and locking in the RX path. Disable batch RX/TX ints.
Fix AHB2 register definition and explicitly set AHB2 parent to PLL_PERIPH0/2 -- this gives us 50% more bus bandwidth for emac
Restore TX_INTERVAL_DEFAULT to 64
Drop the sunxi_emac_rx_batch feature. It was originally designed to
reduce the amount of mutex unlock/lock cycles during the RX path on
FreeBSD and if_input, but it is not required to drop the lock before
calling if_percpuq_enqueue on NetBSD.
Write back the data value instead of mask in sunxi_gpio_write
Add a helper for exposing LED controls via sysctl.
Add GPIO LED driver.
add gpioleds
Add misc. gates and resets driver, and explicitly enable PIO clocks
at attach.
Add fdtbus_get_string_index helper.
Add driver for fixed-factor clocks.
Add ffclock
Remove the requirement for ehci to attach after companion devices.
"go for it" - skrll@
Remove the hack to find companion devices and just assume 1 companion if
ETTF flag is not set.
Remove pass numbers for ehci/ohci now that the attach order no longer matters
Use unsigned char for ctype functions, suggested by christos
Add : to body of populate_sunxi to appease bash.
port-evbarm/52388: Fix number of args to a debug printf.
 1.3.4.1 02-Jul-2017  snj file sunxi_usbphy.c was added on branch netbsd-8 on 2017-07-18 19:13:09 +0000
 1.5.2.2 28-Aug-2017  skrll Sync with HEAD
 1.5.2.1 25-Aug-2017  skrll file sunxi_usbphy.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.10.2.2 03-Dec-2017  jdolecek update from HEAD
 1.10.2.1 28-Oct-2017  jdolecek file sunxi_usbphy.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.12.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.17.10.1 02-Aug-2025  perseant Sync with HEAD
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.4 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.3 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.2 07-Oct-2017  jmcneill branches: 1.2.2; 1.2.18;
Add sun4i watchdog support.
 1.1 25-Jul-2017  jmcneill branches: 1.1.2; 1.1.4;
Add watchdog timer support.
 1.1.4.2 28-Aug-2017  skrll Sync with HEAD
 1.1.4.1 25-Jul-2017  skrll file sunxi_wdt.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.1.2.2 26-Jul-2017  martin Pull up following revision(s) (requested by jmcneill in ticket #159):
sys/arch/evbarm/conf/SUNXI: revision 1.18
sys/arch/arm/sunxi/sunxi_wdt.c: revision 1.1
sys/arch/arm/sunxi/files.sunxi: revision 1.14
Add watchdog timer support.
 1.1.2.1 25-Jul-2017  martin file sunxi_wdt.c was added on branch netbsd-8 on 2017-07-26 07:32:06 +0000
 1.2.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 07-Oct-2017  jdolecek file sunxi_wdt.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.5 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.4 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.3 28-Sep-2020  jmcneill Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.2 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.1 29-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 29-Oct-2019  martin file am3_platform.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 29-Oct-2019  martin file am3_platform.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 03-Jun-2020  jmcneill branches: 1.13.2;
Catch up to clock changes in last dts import.
 1.12 29-Nov-2019  jmcneill Add TI OMAP watchdog timer driver.
 1.11 27-Nov-2019  jmcneill Fix mmc and timer indexes.
 1.10 04-Nov-2019  jmcneill Use 297MHz for display clock
 1.9 03-Nov-2019  jmcneill Add support for AM335x display controller (LCDC).
 1.8 30-Oct-2019  jmcneill Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.
 1.7 28-Oct-2019  jmcneill Add support for hardware RNG.
 1.6 28-Oct-2019  jmcneill Add support for GPIO controller.
 1.5 28-Oct-2019  jmcneill enumerate devices under child "clocks" node
 1.4 27-Oct-2019  jmcneill Add I2C support.
 1.3 27-Oct-2019  jmcneill Add USB support.
 1.2 27-Oct-2019  jmcneill Add EDMA TPCC and TPTC drivers.
 1.1 26-Oct-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Add support for enabling modules specified in ti,hwmods property. Very
primitive am3xxx prcm driver added to validate it, needs work.
 1.1.10.3 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #499):

sys/arch/arm/ti/ti_wdt.c: revision 1.1
sys/arch/arm/ti/am3_prcm.c: revision 1.12
sys/arch/arm/ti/files.ti: revision 1.21
sys/arch/evbarm/conf/GENERIC: revision 1.68

Add TI OMAP watchdog timer driver.
Add tiwdt
 1.1.10.2 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #497):

sys/arch/arm/ti/ti_sdhc.c: revision 1.4
sys/arch/arm/ti/ti_sdhc.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.11

Fix mmc and timer indexes.
Fix inverted ti,needs-special-hs-handling property logic and enable EDMA support
Support 1-bit mode and force all xfers to bounce to workaround a transfer error issue for now
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file am3_prcm.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.13.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.23 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.22 20-Jul-2022  riastradh drm: Use CPPFLAGS.drmkms in all local drm drivers too.

This way we don't pollute the NetBSD kernel namespace with all the
Linux compat shim definitions needed to build drm, except for the
local drm drivers that need the API.
 1.21 29-Nov-2019  jmcneill Add TI OMAP watchdog timer driver.
 1.20 03-Nov-2019  jmcneill Add support for AM335x display controller (LCDC).
 1.19 01-Nov-2019  jmcneill Add NAND flash support.
 1.18 31-Oct-2019  jmcneill Add omapfb to FDT-ized TI port.
 1.17 30-Oct-2019  jmcneill Add OMAP3 USB support.
 1.16 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.15 29-Oct-2019  jmcneill Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.14 28-Oct-2019  jmcneill Add support for hardware RNG.
 1.13 28-Oct-2019  jmcneill Add support for GPIO controller.
 1.12 28-Oct-2019  jmcneill Add AM335x DVFS support.
 1.11 27-Oct-2019  jmcneill Add I2C support.
 1.10 27-Oct-2019  jmcneill Add USB support.
 1.9 27-Oct-2019  jmcneill Add MMCHS support.
 1.8 27-Oct-2019  jmcneill Add EDMA TPCC and TPTC drivers.
 1.7 27-Oct-2019  jmcneill Make com work again
 1.6 26-Oct-2019  jmcneill Add bus driver for TI sysc interconncet.
 1.5 26-Oct-2019  jmcneill Adapt ti fdt glue to support GENERIC kernel.
 1.4 21-Nov-2018  skrll branches: 1.4.4;
Make TI compile and convert TI to generic start

Compile tested only (obviously)
 1.3 17-Mar-2018  ryo branches: 1.3.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 26-Oct-2017  jmcneill branches: 1.2.2; 1.2.4;
Add support for enabling modules specified in ti,hwmods property. Very
primitive am3xxx prcm driver added to validate it, needs work.
 1.1 26-Oct-2017  jakllsch Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.2.4.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2.2.2 03-Dec-2017  jdolecek update from HEAD
 1.2.2.1 26-Oct-2017  jdolecek file files.ti was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.4.4.2 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #499):

sys/arch/arm/ti/ti_wdt.c: revision 1.1
sys/arch/arm/ti/am3_prcm.c: revision 1.12
sys/arch/arm/ti/files.ti: revision 1.21
sys/arch/evbarm/conf/GENERIC: revision 1.68

Add TI OMAP watchdog timer driver.
Add tiwdt
 1.4.4.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.17 27-Feb-2023  sekiya Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic. The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitaraâ„¢ Processors Technical
Reference Manual") documents the EOQ bit thus:

(14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
that a descriptor is the last for a given packet received (also sets
the EOP flag), and there are no more descriptors in the receive list
(next descriptor pointer is NULL). The software application can use
this bit to detect when the EMAC receiver for the corresponding channel
has halted. This is useful when the application appends additional free
buffer descriptors to an active receive queue. Note that this flag is
valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.
 1.16 18-Sep-2022  thorpej branches: 1.16.4;
Eliminate use of IFF_OACTIVE.
 1.15 07-Nov-2021  jmcneill ti: cpsw: adapt to dts-5.15 bindings
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.12 04-Feb-2020  thorpej branches: 1.12.6;
Use ifmedia_fini().
 1.11 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.10 06-Jan-2020  msaitoh branches: 1.10.2;
Add ETHER_LOCK() and ETHER_UNLOCK() to protect ec_multiaddrs.

XXX These drivers don't check whether enm_addrlo and enm_addrhi are the same
or not, so it won't work correctly if an multicast address entry has a range.
 1.9 24-Nov-2019  skrll Fix KERNHIST build (and simplify)
 1.8 03-Nov-2019  jmcneill Cleanup and remove dependency on arch/arm/omap
 1.7 27-Oct-2019  jmcneill Get mac address from DT
 1.6 29-May-2019  msaitoh branches: 1.6.2;
No functional change:
- Simplify MII structure initialization and reference.
- KNF
 1.5 29-May-2019  msaitoh KNF. No functional change.
 1.4 05-Mar-2019  msaitoh Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.
 1.3 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

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

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.1 26-Oct-2017  jakllsch branches: 1.1.2; 1.1.4;
Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.1.4.2 26-Jan-2019  pgoyette Sync with HEAD
 1.1.4.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file if_cpsw.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2.2.1 10-Jun-2019  christos Sync with HEAD
 1.6.2.4 03-Mar-2023  martin Pull up following revision(s) (requested by sekiya in ticket #1609):

sys/arch/arm/ti/if_cpsw.c: revision 1.17

Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic. The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical
Reference Manual") documents the EOQ bit thus:

(14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
that a descriptor is the last for a given packet received (also sets
the EOP flag), and there are no more descriptors in the receive list
(next descriptor pointer is NULL). The software application can use
this bit to detect when the EMAC receiver for the corresponding channel
has halted. This is useful when the application appends additional free
buffer descriptors to an active receive queue. Note that this flag is
valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.
 1.6.2.3 20-Feb-2020  martin Pull up following revision(s) (requested by skrll in ticket #711):

sys/arch/arm/ti/if_cpsw.c: revision 1.9

Fix KERNHIST build (and simplify)
 1.6.2.2 28-Jan-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #662):

sys/dev/pcmcia/if_xi.c: revision 1.93
sys/arch/x86/pci/if_vmx.c: revision 1.54
sys/dev/pci/if_de.c: revision 1.165
sys/arch/arm/ti/if_cpsw.c: revision 1.10
sys/arch/arm/omap/if_cpsw.c: revision 1.26
sys/dev/isa/if_iy.c: revision 1.112
sys/dev/pcmcia/if_ray.c: revision 1.96

Add ETHER_LOCK() and ETHER_UNLOCK() to protect ec_multiaddrs.

XXX These drivers don't check whether enm_addrlo and enm_addrhi are the same
or not, so it won't work correctly if an multicast address entry has a range.

Protect ec_multicnt.
 1.6.2.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.10.2.1 29-Feb-2020  ad Sync with head.
 1.12.6.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16.4.1 03-Mar-2023  martin Pull up following revision(s) (requested by sekiya in ticket #109):

sys/arch/arm/ti/if_cpsw.c: revision 1.17

Uncomment and protect sanity checks that would drop into the debugger with a
CPSW_DEBUG_DMA define.

This handles a condition where checking for DMA_RXEOQ in the received packet
results in the console being spammed with "rxeoq" messages, which soon results
in a kernel panic. The corresponding Debugger() call for this check was
commented out.

The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical
Reference Manual") documents the EOQ bit thus:

(14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies
that a descriptor is the last for a given packet received (also sets
the EOP flag), and there are no more descriptors in the receive list
(next descriptor pointer is NULL). The software application can use
this bit to detect when the EMAC receiver for the corresponding channel
has halted. This is useful when the application appends additional free
buffer descriptors to an active receive queue. Note that this flag is
valid on EOP descriptors only.

Moving this check (and the offending printf() ) into a debug #ifdef results in
the BeagleBone Green surviving the nightly checks; it would always drop into
the debugger before this change.
 1.1 03-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
Cleanup and remove dependency on arch/arm/omap
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 03-Nov-2019  martin file if_cpswreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 03-Nov-2019  martin file if_cpswreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.1 01-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
Add NAND flash support.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 01-Nov-2019  martin file omap2_gpmcreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 01-Nov-2019  martin file omap2_gpmcreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 03-Nov-2019  jmcneill branches: 1.2.2; 1.2.10; 1.2.12;
Also match ti,omap2-onenand
 1.1 01-Nov-2019  jmcneill Add NAND flash support.
 1.2.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 03-Nov-2019  martin file omap2_nand.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 03-Nov-2019  martin file omap2_nand.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.3.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.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 01-Nov-2019  jmcneill branches: 1.4.2; 1.4.10; 1.4.12;
Add NAND flash support.
 1.3 31-Oct-2019  jmcneill Remove DPLL5 init ported from old omap code, it is not required
 1.2 30-Oct-2019  jmcneill Add OMAP3 USB support.
 1.1 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.4.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.10.1 01-Nov-2019  martin file omap3_cm.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.4.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.4.2.1 01-Nov-2019  martin file omap3_cm.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.8 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.7 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.6 17-Jul-2022  riastradh wsdisplay(4): Factor out WSDISPLAY_SCROLLSUPPORT logic.

Should find a way to avoid the #ifdefs in the .h file, but this makes
the code a good deal more legible and easier to maitain, at least.
No functional change intended.
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 28-Jun-2020  skrll branches: 1.2.2;
Use prop_data_value (not prop_data_data_nocopy)
 1.1 31-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add omapfb to FDT-ized TI port.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 31-Oct-2019  martin file omap3_dss.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 31-Oct-2019  martin file omap3_dss.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 16-Apr-2020  rin Revert previous for now:
http://mail-index.netbsd.org/source-changes/2020/04/16/msg116278.html

The reasoning turned out to be wrong; __KERNEL_RCSID() in header files
does *not* overwrite RCSID in main source files. The real problem is that
it inserts its RCSID into *every* object files. However, it can be still
useful even if heavily duplicated.
 1.2 16-Apr-2020  rin Stop using __KERNEL_RCSID() in header files; it confuses ident(1) by
overwriting RCSID in main source files.

XXX
The first argument of __KERNEL_RCSID() is neglected for ELF. If we wish
to have RCSID of header files in kernel binary, we need something like
__FBSDID() macro in FreeBSD.
 1.1 31-Oct-2019  jmcneill branches: 1.1.2; 1.1.8; 1.1.10;
Add omapfb to FDT-ized TI port.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 31-Oct-2019  martin file omap3_dssreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 31-Oct-2019  martin file omap3_dssreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.9 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.8 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.7 24-Apr-2021  thorpej Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 05-Feb-2021  skrll branches: 1.6.2;
Fix build
 1.5 04-Feb-2021  thorpej Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.4 28-Sep-2020  jmcneill branches: 1.4.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.3 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.2 30-Oct-2019  jmcneill branches: 1.2.2; 1.2.10;
Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.
 1.1 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 30-Oct-2019  martin file omap3_platform.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 30-Oct-2019  martin file omap3_platform.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 29-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add support for TI OMAP3.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 29-Oct-2019  martin file omap3_prm.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 29-Oct-2019  martin file omap3_prm.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.13 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.12 05-Sep-2023  gutteridge ti_com.c: set sc_type to COM_TYPE_OMAP

Avoid a kernel hang reported by Brook Milligan in PR port-arm/57598.
Patch suggested by RVP, seems correct to several of us. (If this
introduces a regression with some board, sorry, mea culpa. But in
that case we should still be carrying this, just conditionalized.)
 1.11 27-Jan-2021  thorpej branches: 1.11.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.10 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.9 28-Sep-2020  jmcneill branches: 1.9.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.8 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.7 27-Oct-2019  jmcneill Add EDMA TPCC and TPTC drivers.
 1.6 27-Oct-2019  jmcneill Make com work again
 1.5 18-Oct-2019  skrll Use PRIxBUSADDR
 1.4 08-Dec-2018  thorpej branches: 1.4.4;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.3 26-Oct-2017  jmcneill branches: 1.3.2; 1.3.4; 1.3.6;
Add support for enabling modules specified in ti,hwmods property. Very
primitive am3xxx prcm driver added to validate it, needs work.
 1.2 26-Oct-2017  jmcneill UART frequency comes from 'clock-frequency' property here
 1.1 26-Oct-2017  jakllsch Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.3.6.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.6.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3.2.2 03-Dec-2017  jdolecek update from HEAD
 1.3.2.1 26-Oct-2017  jdolecek file ti_com.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4.4.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.9.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11.18.1 18-Oct-2023  martin Pull up following revision(s) (requested by gutteridge in ticket #419):

sys/arch/arm/ti/ti_com.c: revision 1.12

ti_com.c: set sc_type to COM_TYPE_OMAP

Avoid a kernel hang reported by Brook Milligan in PR port-arm/57598.

Patch suggested by RVP, seems correct to several of us. (If this
introduces a regression with some board, sorry, mea culpa. But in
that case we should still be carrying this, just conditionalized.)
 1.5 06-Sep-2025  thorpej Re-factor the operating point defintions into fdt_opp.h
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 03-Jun-2020  jmcneill branches: 1.3.2;
Fix SoC revision detection. BeagleBone Black reports 1GHz as a supported
frequency again.
 1.2 29-Oct-2019  jmcneill branches: 1.2.2; 1.2.10;
Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.1 28-Oct-2019  jmcneill Add AM335x DVFS support.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 29-Oct-2019  martin file ti_cpufreq.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.3 07-Jun-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #943):

sys/arch/arm/ti/ti_cpufreq.c: revision 1.3

Fix SoC revision detection. BeagleBone Black reports 1GHz as a supported
frequency again.
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 29-Oct-2019  martin file ti_cpufreq.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 28-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add AM335x DVFS support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 28-Oct-2019  martin file ti_div_clock.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 28-Oct-2019  martin file ti_div_clock.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.6 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.5 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.4 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.3 03-Jun-2020  jmcneill branches: 1.3.2;
Fix dpll clock setting on am335x
 1.2 29-Oct-2019  jmcneill branches: 1.2.2; 1.2.10;
Add support for TI OMAP3.
 1.1 28-Oct-2019  jmcneill Add AM335x DVFS support.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 29-Oct-2019  martin file ti_dpll_clock.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.3 07-Jun-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #944):

sys/arch/arm/ti/ti_dpll_clock.c: revision 1.3

Fix dpll clock setting on am335x
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 29-Oct-2019  martin file ti_dpll_clock.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5 21-May-2022  andvar s/artifical/artificial/ in comments.
 1.4 16-Sep-2021  andvar fix typos in word "successful".
 1.3 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill Add 'const char *xname' param to fdtbus_intr_establish_byname
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add EDMA TPCC and TPTC drivers.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_edma.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_edma.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add EDMA TPCC and TPTC drivers.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_edma.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_edma.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 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 27-Jan-2021  thorpej branches: 1.3.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.2 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.1 30-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add OMAP3 USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 30-Oct-2019  martin file ti_ehci.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 30-Oct-2019  martin file ti_ehci.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.3.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 25-Sep-2022  riastradh tilcdc(4): Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.3 19-Dec-2021  riastradh drm: Do the attach task dance for ti lcdc drm.
 1.2 19-Dec-2021  riastradh drm: Fix arm/ti drm build.
 1.1 03-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for AM335x display controller (LCDC).
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 03-Nov-2019  martin file ti_fb.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 03-Nov-2019  martin file ti_fb.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.15 01-Apr-2024  jakllsch ti_gpio: add gpio(4) interrupt support

tested with gpiopps(4) on Beagle Bone Black
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 29-Jan-2021  rin branches: 1.12.2;
Fix build without MULTIPROCESSOR.
 1.11 29-Jan-2021  rin Sort headers. No binary changes.
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.5 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.4 03-Jun-2020  jmcneill branches: 1.4.2;
If we can't find a hwmod name, use the device type and mmio address
 1.3 03-Nov-2019  jmcneill branches: 1.3.2; 1.3.10;
Add support for GPIO interrupts and fix reading the state of output pins.
 1.2 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.1 28-Oct-2019  jmcneill Add support for GPIO controller.
 1.3.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.10.1 03-Nov-2019  martin file ti_gpio.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.3.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.3.2.1 03-Nov-2019  martin file ti_gpio.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.12.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 01-Nov-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add NAND flash support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 01-Nov-2019  martin file ti_gpmc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 01-Nov-2019  martin file ti_gpmc.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.15 16-Sep-2025  thorpej As with ACPI, perform the fdtbus_register_i2c_controller() in a centralized
location.
 1.14 16-Sep-2025  thorpej Garbage-collect fdtbus_attach_i2cbus(); the regular iicbus_attach() is
sufficient now.
 1.13 27-Jan-2021  thorpej branches: 1.13.4; 1.13.14;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.12 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.11 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.10 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.9 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.8 23-Dec-2020  thorpej Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway). Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
 1.7 16-Aug-2020  riastradh branches: 1.7.2;
Initialize the i2c controller before using it.

Fixes mutex uninitialized panic in LOCKDEBUG.
 1.6 03-Jun-2020  jmcneill If we can't find a hwmod name, use the device type and mmio address
 1.5 14-May-2020  msaitoh Remove extra semicolon.
 1.4 01-Nov-2019  jmcneill branches: 1.4.2; 1.4.10;
Enable IRQ status bits for omap3 type and set speed properly
 1.3 31-Oct-2019  jmcneill Handle different register layout on OMAP3
 1.2 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.1 27-Oct-2019  jmcneill Add I2C support.
 1.4.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.10.1 01-Nov-2019  martin file ti_iic.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.4.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.4.2.1 01-Nov-2019  martin file ti_iic.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.7.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.7.2.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.13.14.1 09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.
 1.13.4.1 19-May-2021  thorpej fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.
 1.3 31-Oct-2019  jmcneill branches: 1.3.2; 1.3.10;
Handle different register layout on OMAP3
 1.2 29-Oct-2019  jmcneill Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.1 27-Oct-2019  jmcneill Add I2C support.
 1.3.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.10.1 31-Oct-2019  martin file ti_iicreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.3.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.3.2.1 31-Oct-2019  martin file ti_iicreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.15 13-Oct-2025  thorpej Use device_{get,set}prop_bool().
 1.14 25-Sep-2022  riastradh tilcdc(4): Set is_console on the drm device, not the fb child.

The drm device is represented by a rockchip,display-subsystem node in
the device tree. The fb child is a purely software abstraction used
by drm.

The is_console property is used by MD firmware logic to mark which
actual device in hardware bus enumeration like PCI or FDT the system
has chosen for the console early at boot, so hanging it on the node
for the real hardware device makes more sense than hanging it on the
software abstraction, and is consistent with recent changes to drmfb
to respect its setting on other platforms for hardware devices.
 1.13 02-Jul-2022  skrll sort previous
 1.12 02-Jul-2022  skrll Make this compile again.
 1.11 21-Apr-2022  andvar s/subesquent/subsequent/ in copy pasted comments.
 1.10 19-Dec-2021  riastradh drm: Do the attach task dance for ti lcdc drm.
 1.9 19-Dec-2021  riastradh drm: Fix arm/ti drm build.
 1.8 19-Dec-2021  riastradh drm_dev_alloc now returns ERR_PTR, check for that.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
 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 27-Jan-2021  thorpej branches: 1.5.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 15-Dec-2019  mrg branches: 1.4.8; 1.4.10;
ensure to call drm_mode_config_cleanup() when erroring.
tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.3 04-Nov-2019  jmcneill branches: 1.3.2;
Select closest rate to desired pixel clock
 1.2 03-Nov-2019  jmcneill Comment out mode fixup (not needed it seems)
 1.1 03-Nov-2019  jmcneill Add support for AM335x display controller (LCDC).
 1.3.2.3 17-Dec-2019  martin Pull up following revision(s) (requested by mrg in ticket #557):

sys/arch/arm/rockchip/rk_drm.c: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.4
sys/arch/arm/sunxi/sunxi_drm.c: revision 1.10

ensure to call drm_mode_config_cleanup() when erroring.

tripped up 'active lock in free' checks, and perhaps
lead to other lock corruption. (crash with un-init lock
in arpresolve that does not make sense now seems to not
occur either.)
 1.3.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.3.2.1 04-Nov-2019  martin file ti_lcdc.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.4.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.8.1 15-Dec-2019  martin file ti_lcdc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.5.2.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 19-Dec-2021  riastradh drm: Do the attach task dance for ti lcdc drm.
 1.2 19-Dec-2021  riastradh drm: Fix arm/ti drm build.
 1.1 03-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for AM335x display controller (LCDC).
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 03-Nov-2019  martin file ti_lcdc.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 03-Nov-2019  martin file ti_lcdc.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.1 03-Nov-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for AM335x display controller (LCDC).
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 03-Nov-2019  martin file ti_lcdcreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 03-Nov-2019  martin file ti_lcdcreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.5 02-Feb-2024  andvar s/attachement/attachment/ and s/detachement/detachment/.
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.2 03-Jun-2020  jmcneill branches: 1.2.2;
PR# port-evbarm/55263: BeagleBone Black too many interrupts on CPU when
using 5V DC power cable

Handle vbus status change events, and don't busy spin in the hard intr
handler when we see a vbus error (this will always be set when VBUS is not
present).
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add USB support.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_motg.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.3 07-Jun-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #945):

sys/arch/arm/ti/ti_motg.c: revision 1.2

PR# port-evbarm/55263: BeagleBone Black too many interrupts on CPU when
using 5V DC power cable

Handle vbus status change events, and don't busy spin in the hard intr
handler when we see a vbus error (this will always be set when VBUS is not
present).
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_motg.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 28-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add AM335x DVFS support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 28-Oct-2019  martin file ti_mux_clock.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 28-Oct-2019  martin file ti_mux_clock.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.9 11-Feb-2022  riastradh arm/ti: Omit needless dv_private assignment in omap2icu_attach.
 1.8 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.7 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.6 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.5 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.4 15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.3 26-Sep-2020  skrll branches: 1.3.2;
G/C arm/atomic.h
 1.2 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.1 26-Oct-2017  jakllsch branches: 1.1.2; 1.1.6; 1.1.10;
Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_omapintc.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.11 07-Nov-2021  jmcneill arm: ti: adapt to dts-5.15 bindings
 1.10 09-Sep-2021  jakllsch Add license text I forgot to include in 1.1
 1.9 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.8 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.7 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.6 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.5 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.4 30-Oct-2019  jmcneill branches: 1.4.8;
Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.
 1.3 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.2 27-Oct-2019  jmcneill Use Timer2 for timecounter, and enable hw module.
 1.1 26-Oct-2017  jakllsch branches: 1.1.2; 1.1.6; 1.1.10;
Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_omaptimer.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4.8.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_otg.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_otg.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add USB support.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_otgreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_otgreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.10 29-Oct-2019  jmcneill Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.9 27-Oct-2019  jmcneill Fix early putchar, add reset func
 1.8 27-Oct-2019  jmcneill Place devmap above KERNEL_IO_VBASE
 1.7 26-Oct-2019  jmcneill Fix am33xx_platform_early_putchar for pre-MMU output
 1.6 30-Oct-2018  skrll branches: 1.6.4;
Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.5 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.4 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.3 17-Mar-2018  ryo branches: 1.3.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.2 19-Dec-2017  skrll branches: 1.2.2;
Remove duplicate DEVMAP_* macros
 1.1 26-Oct-2017  jakllsch branches: 1.1.2;
Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_platform.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.2.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.3 30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.3.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.2.1 10-Jun-2019  christos Sync with HEAD
 1.6.4.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2 29-Oct-2019  jmcneill Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c
 1.1 26-Oct-2017  jakllsch branches: 1.1.2; 1.1.6; 1.1.10;
Initial FDT support for TI's ARM SoCs.

Currently supports only limited functionality on AM335x.
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_platform.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 03-Jun-2020  jmcneill Catch up to clock changes in last dts import.
 1.3 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.2 27-Oct-2019  jmcneill Add EDMA TPCC and TPTC drivers.
 1.1 26-Oct-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Add support for enabling modules specified in ti,hwmods property. Very
primitive am3xxx prcm driver added to validate it, needs work.
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_prcm.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.4 30-Oct-2019  jmcneill Add OMAP3 USB support.
 1.3 29-Oct-2019  jmcneill Add support for TI OMAP3.
 1.2 27-Oct-2019  jmcneill Add EDMA TPCC and TPTC drivers.
 1.1 26-Oct-2017  jmcneill branches: 1.1.2; 1.1.6; 1.1.10;
Add support for enabling modules specified in ti,hwmods property. Very
primitive am3xxx prcm driver added to validate it, needs work.
 1.1.10.1 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.2.2 03-Dec-2017  jdolecek update from HEAD
 1.1.2.1 26-Oct-2017  jdolecek file ti_prcm.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.7 19-Mar-2022  riastradh rnd(9): Omit needless locks in various HWRNG drivers.

Now that the rnd(9) API guarantees serial callbacks, we can simplify
everything a bit more.

(Some drivers like hifn(4) and sun8icrypto(4) still use locks to
coordinate with other parts of the driver to submit requests to and
process responses from the device.)
 1.6 19-Mar-2022  riastradh rnd(9): Adjust IPL of locks used by rndsource callbacks.

These no longer ever run from hard interrupt context or with a spin
lock held, so there is no longer any need to have them at IPL_VM to
block hard interrupts. Instead, lower them to IPL_SOFTSERIAL.
 1.5 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.4 03-Jun-2020  jmcneill branches: 1.4.2;
Add a line break before rnd_attach_source so the "entropy: ready" announcement does not get mixed with device prints
 1.3 30-Apr-2020  riastradh rnd_attach_source calls the callback itself now.

No need for every driver to explicitly call it to prime the pool.

Eliminate now-unused <sys/rndpool.h>.
 1.2 29-Oct-2019  jmcneill branches: 1.2.2; 1.2.10;
Add support for TI OMAP3.
 1.1 28-Oct-2019  jmcneill Add support for hardware RNG.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 29-Oct-2019  martin file ti_rng.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 29-Oct-2019  martin file ti_rng.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 28-Oct-2019  jmcneill branches: 1.1.2; 1.1.10;
Add support for hardware RNG.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 28-Oct-2019  martin file ti_rngreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 28-Oct-2019  martin file ti_rngreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.12 06-Feb-2022  jmcneill sdhc: Retire SDHC_FLAG_USE_ADMA2 flag.

ADMA2 support in sdhc is mature now, so no need for it to be opt-in.
 1.11 07-Nov-2021  jmcneill arm: ti: adapt to dts-5.15 bindings
 1.10 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.9 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.8 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.7 18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.6 15-Jan-2021  jmcneill use fdtbus_intr_establish_xname
 1.5 28-Nov-2019  jmcneill branches: 1.5.8; 1.5.10;
Support 1-bit mode and force all xfers to bounce to workaround a transfer error issue for now
 1.4 27-Nov-2019  jmcneill Fix inverted ti,needs-special-hs-handling property logic and enable EDMA support
 1.3 29-Oct-2019  jmcneill branches: 1.3.2;
Add support for TI OMAP3.
 1.2 27-Oct-2019  jmcneill Disable autoidle
 1.1 27-Oct-2019  jmcneill Add MMCHS support.
 1.3.2.3 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #497):

sys/arch/arm/ti/ti_sdhc.c: revision 1.4
sys/arch/arm/ti/ti_sdhc.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.11

Fix mmc and timer indexes.
Fix inverted ti,needs-special-hs-handling property logic and enable EDMA support
Support 1-bit mode and force all xfers to bounce to workaround a transfer error issue for now
 1.3.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.3.2.1 29-Oct-2019  martin file ti_sdhc.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.5.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.8.1 28-Nov-2019  martin file ti_sdhc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2 27-Oct-2019  jmcneill branches: 1.2.2; 1.2.10;
Disable autoidle
 1.1 27-Oct-2019  jmcneill Add MMCHS support.
 1.2.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.1 27-Oct-2019  martin file ti_sdhcreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.2.2.1 27-Oct-2019  martin file ti_sdhcreg.h was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 26-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add bus driver for TI sysc interconncet.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 26-Oct-2019  martin file ti_sysc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 26-Oct-2019  martin file ti_sysc.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 27-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add EDMA TPCC and TPTC drivers.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 27-Oct-2019  martin file ti_tptc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 27-Oct-2019  martin file ti_tptc.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 30-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add OMAP3 USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 30-Oct-2019  martin file ti_usb.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 30-Oct-2019  martin file ti_usb.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 30-Oct-2019  jmcneill branches: 1.1.2; 1.1.10; 1.1.12;
Add OMAP3 USB support.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 30-Oct-2019  martin file ti_usbtll.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1.2.2 27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.1.2.1 30-Oct-2019  martin file ti_usbtll.c was added on branch netbsd-9 on 2019-11-27 13:46:44 +0000
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 29-Nov-2019  jmcneill branches: 1.1.2; 1.1.8; 1.1.12;
Add TI OMAP watchdog timer driver.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.8.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.8.1 29-Nov-2019  martin file ti_wdt.c was added on branch phil-wifi on 2020-04-08 14:07:31 +0000
 1.1.2.2 08-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #499):

sys/arch/arm/ti/ti_wdt.c: revision 1.1
sys/arch/arm/ti/am3_prcm.c: revision 1.12
sys/arch/arm/ti/files.ti: revision 1.21
sys/arch/evbarm/conf/GENERIC: revision 1.68

Add TI OMAP watchdog timer driver.
Add tiwdt
 1.1.2.1 29-Nov-2019  martin file ti_wdt.c was added on branch netbsd-9 on 2019-12-08 12:57:21 +0000
 1.7 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.6 11-Aug-2018  jmcneill Fix VEXPRESS_A15 build
 1.5 17-Mar-2018  ryo branches: 1.5.2;
move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.4 19-Feb-2018  jmcneill branches: 1.4.2;
move plfb glue to the correct location
 1.3 26-Aug-2017  jmcneill branches: 1.3.2; 1.3.4;
Until config supports multiple 'attach driver at bus with <foo>' lines,
move plfb from common files.fdt to files.vexpress
 1.2 02-Jun-2017  jmcneill Add driver for ARM Motherboard Express uATX system control registers. Use
this to make "poweroff" DTRT in qemu (and hopefully on real hardware too).
 1.1 02-Jun-2017  jmcneill Switch VEXPRESS_A15 kernel to use FDT and GENERIC.common. The dtb for this
kernel can be found in the sysutils/dtb-arm-vexpress package as
vexpress-v2p-ca15-tc1.dtb
 1.3.4.2 03-Dec-2017  jdolecek update from HEAD
 1.3.4.1 26-Aug-2017  jdolecek file files.vexpress was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.2.2 28-Aug-2017  skrll Sync with HEAD
 1.3.2.1 26-Aug-2017  skrll file files.vexpress was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.4.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5.2.1 10-Jun-2019  christos Sync with HEAD
 1.24 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.23 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.22 24-Apr-2021  thorpej 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.21 05-Feb-2021  skrll branches: 1.21.2;
Fix build
 1.20 04-Feb-2021  thorpej Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.19 30-Oct-2020  skrll branches: 1.19.2;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.18 28-Sep-2020  jmcneill Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.17 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.16 15-Feb-2020  skrll Various updates and improvements to cpu start up on arm/aarch64

- start sharing more code around the AP startup messaging.
- call arm_cpu_topology_set early so that ci_core_id is available for
drivers, e.g. bcm2835_intr.c
- both arm and aarch64 now have
- a static cpu_info_store array
- the same arm_cpu_{hatched,mbox}
 1.15 23-Jul-2019  jmcneill branches: 1.15.4;
No need for console=fb handling with WSDISPLAY_MULTICONS
 1.14 31-Jan-2019  skrll Fix build
 1.13 31-Jan-2019  skrll Change ap_mpstart to return non-zero value if any/all APs don't start.
 1.12 30-Oct-2018  skrll Retire fdt_putchar and ap_early_put_char in favour of uartputc.
 1.11 18-Oct-2018  skrll Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors. AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested. Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@ and aymeric@ for testing on parallella and nanosoc
respectively
 1.10 21-Sep-2018  skrll Centralise defparam CONSADDR, CONSPEED, CONMODE and CONADDR into
opt_console.h and adjust.
 1.9 05-Aug-2018  skrll Add prefixes to struct arm_platform{,_info} members.

No functional change.
 1.8 11-Jun-2018  jakllsch branches: 1.8.2;
fill in vexpress_platform_early_putchar(); make comment about CONSADDR
 1.7 17-Mar-2018  ryo move from sys/arch/arm/arm32/armv7_generic_dma.c to sys/arch/arm/arm/arm_generic_dma.c,
and change variable name from armv7_generic_dma_tag to arm_generic_dma_tag

no functional change. (preliminary changes for merging aarch64)
 1.6 19-Dec-2017  skrll branches: 1.6.2;
Trailing whitespace
 1.5 18-Nov-2017  jmcneill branches: 1.5.2;
Fix clcd node path for newer dtb
 1.4 22-Oct-2017  skrll Centralise defines for DEVMAP_{ALIGN,SIZE,ENTRY,ENTRY_END}
 1.3 06-Jun-2017  jmcneill branches: 1.3.4;
Allow 'console=fb' to act as a shortcut on vexpress for
'stdout-path=/smb@08000000/motherboard/iofpga@3,00000000/clcd@1f0000'
 1.2 02-Jun-2017  jmcneill branches: 1.2.2;
Add SMP support to VEXPRESS_A15 kernel. Enable with '-smp 2' on qemu
command line.
 1.1 02-Jun-2017  jmcneill Switch VEXPRESS_A15 kernel to use FDT and GENERIC.common. The dtb for this
kernel can be found in the sysutils/dtb-arm-vexpress package as
vexpress-v2p-ca15-tc1.dtb
 1.2.2.1 06-Jun-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #13):
sys/arch/arm/fdt/plfb_fdt.c: revision 1.2
sys/arch/arm/vexpress/vexpress_platform.c: revision 1.3
sys/arch/evbarm/conf/VEXPRESS_A15: revision 1.13
sys/arch/evbarm/fdt/fdt_machdep.c: revisions 1.5, 1.6
sys/dev/ic/pl050.c: revision 1.2
Fix spelling of WS_DEFAULT_FG and WS_KERNEL_FG options.
--
Attach kbd slot to console
--
Allow plfb to be the console device
--
Add support for stdout-path= kernel cmdline option to override the
console device specified in the FDT.
--
Initialize boot_args before bootstrap for the benefit of platform code.
--
Allow 'console=fb' to act as a shortcut on vexpress for
'stdout-path=/smb@08000000/motherboard/iofpga@3,00000000/clcd@1f0000'
 1.3.4.2 28-Aug-2017  skrll Sync with HEAD
 1.3.4.1 06-Jun-2017  skrll file vexpress_platform.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.5.2.2 03-Dec-2017  jdolecek update from HEAD
 1.5.2.1 18-Nov-2017  jdolecek file vexpress_platform.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.6.2.6 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.6.2.5 20-Oct-2018  pgoyette Sync with head
 1.6.2.4 30-Sep-2018  pgoyette Ssync with HEAD
 1.6.2.3 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.6.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.6.2.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.8.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.2.1 10-Jun-2019  christos Sync with HEAD
 1.15.4.1 29-Feb-2020  ad Sync with head.
 1.19.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.21.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.1 02-Jun-2017  jmcneill branches: 1.1.6; 1.1.10;
Add SMP support to VEXPRESS_A15 kernel. Enable with '-smp 2' on qemu
command line.
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 02-Jun-2017  jdolecek file vexpress_platform.h was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.1.6.2 28-Aug-2017  skrll Sync with HEAD
 1.1.6.1 02-Jun-2017  skrll file vexpress_platform.h was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.4 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.3 30-Jun-2017  jmcneill branches: 1.3.4; 1.3.6; 1.3.22;
Use of_match_compatible instead of of_compatible
 1.2 02-Jun-2017  jmcneill Sleep before reboot/shutdown to let uart fifo flush
 1.1 02-Jun-2017  jmcneill Add driver for ARM Motherboard Express uATX system control registers. Use
this to make "poweroff" DTRT in qemu (and hopefully on real hardware too).
 1.3.22.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3.6.2 03-Dec-2017  jdolecek update from HEAD
 1.3.6.1 30-Jun-2017  jdolecek file vexpress_sysreg.c was added on branch tls-maxphys on 2017-12-03 11:35:56 +0000
 1.3.4.2 28-Aug-2017  skrll Sync with HEAD
 1.3.4.1 30-Jun-2017  skrll file vexpress_sysreg.c was added on branch nick-nhusb on 2017-08-28 17:51:32 +0000
 1.7 17-Oct-2021  skrll Trailing whitespace
 1.6 31-Dec-2012  matt branches: 1.6.2; 1.6.6;
Switch to using vfp_kernel_{acquire,release} so that softints don't cause
the VFP to become disabled.
 1.5 26-Dec-2012  matt Add not-yet-enabled code to use vfp_kernel_{acquire,release}
 1.4 11-Dec-2012  matt Use RET, not bx lr.
Due to evbarm/conf/INTEGRATOR conditional use of pld.
 1.3 11-Dec-2012  matt These contain to just contain bzero_page_vfp and bcopy_page_vfp
 1.2 10-Dec-2012  matt Make sure we can deal with VA != PA but still we need to have all of PA mapped.
 1.1 10-Dec-2012  matt Add code to use VFP(or Neon) instructions to zero or copy a page via
pmap_zero_page and pmap_copy_page. (Not hooked into vfp_init yet).
Requires FPU_VFP
 1.6.6.2 25-Feb-2013  tls resync with head
 1.6.6.1 31-Dec-2012  tls file pmap_vfp.S was added on branch tls-maxphys on 2013-02-25 00:28:32 +0000
 1.6.2.3 23-Jan-2013  yamt sync with head
 1.6.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.6.2.1 31-Dec-2012  yamt file pmap_vfp.S was added on branch yamt-pagecache on 2013-01-16 05:32:50 +0000
 1.78 20-Aug-2022  riastradh fpu_kern_enter/leave: Disable IPL assertions.

These don't work because mutex_enter/exit on a spin lock may raise an
IPL but not lower it, if another spin lock was already held. For
example,

mutex_enter(some_lock_at_IPL_VM);
printf("foo\n");
fpu_kern_enter();
...
fpu_kern_leave();
mutex_exit(some_lock_at_IPL_VM);

will trigger the panic, because printf takes a lock at IPL_HIGH where
the IPL wil remain until the mutex_exit. (This was a nightmare to
track down before I remembered that detail of spin lock IPL
semantics...)
 1.77 01-Apr-2022  riastradh x86, arm: Allow fpu_kern_enter/leave while cold.

Normally these are forbidden above IPL_VM, so that FPU usage doesn't
block IPL_SCHED or IPL_HIGH interrupts. But while cold, e.g. during
builtin module initialization at boot, all interrupts are blocked
anyway so it's a moot point.

Also initialize x86 cpu_info_primary.ci_kfpu_spl to -1 so we don't
trip over an assertion about it while cold -- the assertion is meant
to detect reentrance into fpu_kern_enter/leave, which is prohibited.

Also initialize cpu0's ci_kfpu_spl.
 1.76 31-Oct-2021  skrll Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.

The AP initialisation code in cpu_init_secondary_processor will read and
initialise the required system registers and state for the BP to attach
and report.

Rework the interrupt handler code for this new sequence. Thankfully,
this removes a bunch of code for bcm2836mp.

The VFP detection handler on <= armv7 relies on the global undefined
handler being in place until the BP attaches vfp. That is, after the
APs have been spun up.

gicv3_its.c has a serialisation issue which is protected against in
the gicv3_its_cpu_init, which is called from cpu_hatch, with a spin
lock. The serialisation issue needs addressing more completely.

Tested on RPI3, Apple M1, QEMU, and lx2k

Fixes PR port-arm/56264:
diagnostic assertion "l->l_stat == LSONPROC" failed on RPI3
 1.75 17-Oct-2021  skrll Trailing whitespace
 1.74 01-Jun-2021  rin PR port-arm/55790

Fix KASSERT failure with floating-point exception in userland.

Consider the case in which curlwp owns enabled FPU in vfp_handler().
If FPE is raised, we must skip pcu_load(9) rather than just falling
through. Otherwise, KASSERT fires in vfp_state_load(), since curlwp
already owns enabled FPU.

No regression for ATF is introduced.
 1.73 01-Jun-2021  rin PR port-arm/55790

Style fix for clarity, in preparation of main fix.

Replace condition ``curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp'' with
``curlwp->l_pcu_cpu[PCU_FPU] == curcpu()''. And add KASSERT to check
the two conditions are equivalent, as done for MI pcu code:

https://nxr.netbsd.org/xref/src/sys/kern/subr_pcu.c#323

No functional changes.
 1.72 30-Oct-2020  skrll branches: 1.72.6;
Retire arm_[di]sb in favour of the isb() and dsb(sy) macro invocations.
 1.71 01-Aug-2020  riastradh Add kthread_fpu_enter/exit support to arm.
 1.70 27-Jul-2020  riastradh Enable ChaCha NEON code on armv7 too.

The 4-blocks-at-a-time assembly helper is disabled for now; adapting
it to armv7 is going to be a little annoying with only 16 128-bit
vector registers.

(Should also do a fifth block in the integer registers for 320 bytes
at a time.)
 1.69 25-Jul-2020  riastradh Split aes_impl declarations out into aes_impl.h.

This will make it less painful to add more operations to struct
aes_impl without having to recompile everything that just uses the
block cipher directly or similar.
 1.68 13-Jul-2020  riastradh Use pcu_save_all_on_cpu, not pcu_save.

We don't care what curlwp is here; we care whose state is in the fpu
registers.
 1.67 13-Jul-2020  riastradh Limit arm32 fpu_kern_enter/leave to IPL_VM or below.
 1.66 29-Jun-2020  riastradh New permutation-based AES implementation using ARM NEON.

Also derived from Mike Hamburg's public-domain vpaes code.
 1.65 29-Jun-2020  riastradh Implement fpu_kern_enter/leave for arm32.
 1.64 29-Oct-2019  joerg Explicitly annotate FPU requirements for LLVM MC.

When using GCC, this annotations change the global state, but there is
no push/pop functionality for .fpu to avoid this problem. The state is
local to each inline assembler block with LLVM MC.
 1.63 07-Sep-2019  tnn Cortex A12 is marketed as A17 but has a distinct part number

observed on Rockchip RK3288
 1.62 06-Apr-2019  skrll Install the undefined instruction handlers only once, i.e. when attaching
on the BP.
 1.61 17-Mar-2019  skrll Trailing whitespace
 1.60 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.59 15-Aug-2018  skrll Sprinkle #include "opt_cputypes.h"
 1.58 15-Aug-2018  skrll Add __KERNEL_RCSID
 1.57 08-Apr-2018  bouyer branches: 1.57.2;
Remove the call to vfp_fpscr_handler() from vfp_handler(). It actually never
avoids a full FPU switch, and costs a function call and a few tests.

Discussed on port-arm@ on october 2017:
http://mail-index.netbsd.org/port-arm/2017/10/16/msg004411.html
 1.56 02-Mar-2018  christos branches: 1.56.2;
Add more vfp directives for gcc-6
 1.55 16-Oct-2017  bouyer We KASSERT((fregs->vfp_fpexc & VFP_FPEXC_EN) == 0) just before, so
enabled is always false. remove.
 1.54 16-Oct-2017  bouyer In the REENABLE case, make sur the fpexc copy in the pcb also has
VFP_FPEXC_EN set. Otherwise we could trap on every context switch even if
the CPU already has the VFP state.
 1.53 26-May-2017  jmcneill branches: 1.53.2;
Recognize Cortex-A57 FPU, GIC, and Generic Timer.
 1.52 22-Mar-2017  chs in vfp_state_load(), fix backwards logic for fpinst vs. fpinst2.
 1.51 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.50 03-Mar-2016  skrll branches: 1.50.2; 1.50.4;
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
 1.49 12-Nov-2015  jmcneill change some register dumps from aprint_verbose to aprint_debug
 1.48 28-Apr-2015  jmcneill isb after writing cpacr, from Andrew Turner
 1.47 23-Mar-2015  matt Fix some inverted return values. Don't return SIGILL if there is an active
FPU exception.
 1.46 20-Mar-2015  matt Remove extra )
 1.45 20-Mar-2015  matt Not only check to see if we own the VFP but that the VFP is enabled.
 1.44 17-Mar-2015  matt Don't try to catch undefined VFP instructions if we own the the FPU.
Let them raise SIGILL.
 1.43 17-Mar-2015  matt If we own the FPU, don't take anymore undefined faults. Instead generate
SIGILLs since we obviously don't understand the instruction.
 1.42 09-Feb-2015  slp Add VFP IDs for QEMU's emulated Cortex-A15.
 1.41 18-Jul-2014  matt branches: 1.41.2; 1.41.4;
fix typo reported in PR/48948
 1.40 15-Jun-2014  matt Cleanup a bit of the init logic.
 1.39 16-May-2014  rmind pcu(9):
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
 1.38 06-Apr-2014  matt propogation -> propagation
 1.37 28-Mar-2014  matt branches: 1.37.2;
Various MP changes.
 1.36 18-Mar-2014  matt Enable VFP on MV88SV58XX
 1.35 04-Mar-2014  matt Add a different version vfp_fpscr_changable if FPU_VFP was not defined.
If no FPU was found, reinit vfp_fpscr_changeable/default to values appropriate
for softfloat.
 1.34 03-Mar-2014  matt Query the media and vfp feature registers to determine what our default
mode should be and what bits in the fpscr can be changed.
Print what features are supported:
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propogation, denormals
 1.33 25-Jan-2014  skrll Improve PCU/VFP handling to the point that the atf tests don't trigger
KASSERTs on the Raspberry PI and its arm1176jzf-s.

XXX Need to emulate bounce instructions to get correct exception codes,
XXX etc.
 1.32 24-Jan-2014  skrll Be consistent about setting fpscr for Runfast. No functional change.
 1.31 23-Jan-2014  skrll Fix typo in #define name
 1.30 21-Jan-2014  skrll Typo in comment
 1.29 27-Dec-2013  matt Switch to using FP instructions instead of cp10/11 instructions.
 1.28 14-Dec-2013  matt If we can't enable VFP/VFP2 via the CPACCESS register, bail since there
isn't a VFP.
 1.27 18-Nov-2013  matt Before checking for an exception, make sure we own the VFP.
 1.26 23-Aug-2013  matt Deal with lack of VFP.
 1.25 23-Aug-2013  matt Reap LWP_VFPUSED and use PCU internal tracking.
Add bool vfp_used_p(void);
 1.24 22-Aug-2013  drochner -extend the pcu(9) API by a function which saves all context on the
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
"LWP has used the coprocessor" flag should be set or reset. The flag
is reported by pcu_used_p(). If set, future accesses should use the
state stored in the PCB. If reset, it should be reset to default.
The former case is useful for setmcontext().
With that, it should not be necessary anymore to manage the "FPU used"
state by an additional MD variable.

approved by matt
 1.23 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.22 03-Aug-2013  matt Add VFP_FPSCR_RN (even though it's 0) just to be explicit.
 1.21 02-Aug-2013  matt Use armreg inlines.
Add exception -> trapsignal code.
 1.20 20-Jun-2013  matt branches: 1.20.2;
Add support for the Cortex-A15 Neon/VFP unit
 1.19 05-Feb-2013  matt Use the mrc form of the vmrs rX, mvfrX instruction to shut up gas.
 1.18 31-Jan-2013  matt Add support for machdep neon_present and id_mvfr sysctls
 1.17 28-Jan-2013  matt Add a machdep.fpu_present sysctl for ld.elf_so to use in ld.so.conf to load
libc_vfp.so.
 1.16 28-Jan-2013  matt Disable bzero_page_vfp and bcopy_page_vfp since it really isn't any faster
than memcpy.
 1.15 31-Dec-2012  matt Always re-enable the VFP when loading for a kernel LWP.
 1.14 31-Dec-2012  matt print the PC of the VFP kernel fault in the panic message.
 1.13 26-Dec-2012  matt Add support for PCU_KERNEL and vfp_kernel_acquire/vfp_kernel_release.
Add an undefined handler to catch NEON instructions.
 1.12 11-Dec-2012  matt Add code to patch pmap_{copy,zero}_page_generic to change calls to
b{copy,zero}_page to b{copy,zero}_page_vfp
 1.11 10-Dec-2012  matt move inlines into FPU_VFP
 1.10 08-Dec-2012  matt On Cortex, make sure to load/save the upper 16 64-FP registers.
When creating a mcontext_t, make sure _UC_ARM_VFP is set.
 1.9 05-Dec-2012  matt For armv7 (cortex), disable access to the upper 16 FP registers (restrict
the register space to 16 64-bit FP registers).
 1.8 05-Dec-2012  matt ARMFPE hasn't compiled since NetBSD 4. Remove it.
Complete support for FPU_VFP.
fpregs now contains vfpreg.
XXX vfpreg only has space for 16 64-bit FP registers though VFPv3 and later
have 32 64-bit FP registers.
 1.7 22-Sep-2012  matt Only use CPACR register for ARM11 and CORTEX cores.
Add VFP ids for other CORTEX CPUs.
 1.6 22-Sep-2012  matt Before testing for VFP, make sure CP10 is enabled. (And CP11 for Neon too).
 1.5 16-Aug-2012  matt branches: 1.5.2;
Add include of <arm/pcb.h>
 1.4 12-Aug-2012  matt Rework VFP support to use PCU.
Add emulation of instruction which save/restore the VFP FPSCR.
Add a sysarch hook to VFP FPSCR manipulation.

[The emulation will be used by libc to store/fetch exception modes and
rounding mode on a per-thread basis.]
 1.3 21-Nov-2009  rmind branches: 1.3.12; 1.3.20;
Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.2 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.1 15-Mar-2008  rearnsha branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.12; 1.1.20; 1.1.26;
VFP support.
 1.1.26.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.20.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.12.2 11-Mar-2010  yamt sync with head
 1.1.12.1 04-May-2009  yamt sync with head.
 1.1.8.2 24-Mar-2008  keiichi sync with head.
 1.1.8.1 15-Mar-2008  keiichi file vfp_init.c was added on branch keiichi-mipv6 on 2008-03-24 07:14:54 +0000
 1.1.6.2 23-Mar-2008  matt sync with HEAD
 1.1.6.1 15-Mar-2008  matt file vfp_init.c was added on branch matt-armv6 on 2008-03-23 02:03:56 +0000
 1.1.4.2 21-Mar-2008  chris Sync with head.
 1.1.4.1 15-Mar-2008  chris file vfp_init.c was added on branch chris-arm-intr-rework on 2008-03-21 13:34:41 +0000
 1.1.2.2 17-Mar-2008  yamt sync with head.
 1.1.2.1 15-Mar-2008  yamt file vfp_init.c was added on branch yamt-lazymbuf on 2008-03-17 09:14:15 +0000
 1.3.20.1 28-Nov-2012  matt Merge improved arm support (especially Cortex) from HEAD
including OMAP and BCM53xx support.
 1.3.12.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.3.12.3 23-Jan-2013  yamt sync with head
 1.3.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.3.12.1 30-Oct-2012  yamt sync with head
 1.5.2.5 03-Dec-2017  jdolecek update from HEAD
 1.5.2.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.3 23-Jun-2013  tls resync from head
 1.5.2.2 25-Feb-2013  tls resync with head
 1.5.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.2.2 18-May-2014  rmind sync with head
 1.20.2.1 28-Aug-2013  rmind sync with head
 1.37.2.1 10-Aug-2014  tls Rebase.
 1.41.4.5 28-Aug-2017  skrll Sync with HEAD
 1.41.4.4 19-Mar-2016  skrll Sync with HEAD
 1.41.4.3 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.41.4.2 06-Jun-2015  skrll Sync with HEAD
 1.41.4.1 06-Apr-2015  skrll Sync with HEAD
 1.41.2.3 26-Jul-2017  snj Pull up following revision(s) (requested by jmcneill in ticket #1435):
sys/arch/arm/arm32/cpu.c: 1.113 via patch
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.6 via patch
sys/arch/arm/broadcom/bcm2835_plcom.c: 1.4 via patch
sys/arch/arm/cortex/gtmr.c: 1.18 via patch
sys/arch/arm/include/armreg.h: 1.110 via patch
sys/arch/arm/include/vfpreg.h: 1.15 via patch
sys/arch/arm/vfp/vfp_init.c: 1.50 via patch
sys/arch/evbarm/rpi/rpi_machdep.c: 1.59, 1.70-1.72 via patch
sys/arch/evbarm/rpi/vcprop.h: 1.16
Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.
My RPI3 works with FB console - the uart needs some help with its clocks.
--
Do invalidate the cache as RPI2 build with Clang can't fetch the memory
config otherwise.
--
Use the VC property mailbox to request the UART clock rate and use it
appropriately
Newer firmwares use 48MHz
--
Disable BSC0 on Raspberry Pi 3 and Zero W boards.
--
Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
--
Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W
 1.41.2.2 26-Mar-2015  snj Pull up following revision(s) (requested by skrll in ticket #643):
sys/arch/arm/vfp/vfp_init.c: revision 1.47
Fix some inverted return values. Don't return SIGILL if there is an active
FPU exception.
 1.41.2.1 21-Mar-2015  snj Pull up following revision(s) (requested by martin in ticket #621):
sys/arch/arm/vfp/vfp_init.c: revisions 1.43-1.46
If we own the FPU, don't take anymore undefined faults. Instead generate
SIGILLs since we obviously don't understand the instruction.
--
Don't try to catch undefined VFP instructions if we own the the FPU.
Let them raise SIGILL.
--
Not only check to see if we own the VFP but that the VFP is enabled.
--
Remove extra )
 1.50.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.50.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.50.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.53.2.1 24-Oct-2017  snj branches: 1.53.2.1.2;
Pull up following revision(s) (requested by bouyer in ticket #326):
sys/arch/arm/vfp/vfp_init.c: revision 1.54-1.55
sys/kern/subr_pcu.c: revision 1.21
PR port-arm/52603:
There is a race here, as seen on arm with FPU:
LWP L is running but not on CPU, has its FPU state on CPU2 which
has not been released yet, so fpexc still has VFP_FPEXC_EN set in the PCB copy.
LWP L is scheduled on CPU1, CPU1 calls cpu_switchto() for L in mi_switch().
cpu_switchto() will set VFP_FPEXC_EN in the FPU's fpexc register per the
PCB fpexc copy.
Before CPU1 calls pcu_switchpoint() for L, CPU2 calls
pcu_do_op(PCU_CMD_SAVE | PCU_CMD_RELEASE) for L because it still holds its
FPU state and wants to load another lwp. This cause VFP_FPEXC_EN to
be cleared in the PCB copy, but not in CPU1's register. L's l_pcu_cpu is
set to NULL.
When CPU1 calls pcu_switchpoint() for L it see l_pcu_cpu is NULL, and doesn't
call the release callback.
Now CPU1 has its FPU enabled but with the wrong FPU state.
Fix by releasing the PCU even if l_pcu_cpu is NULL.
--
In the REENABLE case, make sur the fpexc copy in the pcb also has
VFP_FPEXC_EN set. Otherwise we could trap on every context switch even if
the CPU already has the VFP state.
--
We KASSERT((fregs->vfp_fpexc & VFP_FPEXC_EN) == 0) just before, so
enabled is always false. remove.
 1.53.2.1.2.1 13-Dec-2017  matt Make the VFP is disabled after disabling it.
 1.56.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.56.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.57.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.57.2.1 10-Jun-2019  christos Sync with HEAD
 1.72.6.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.6 06-Sep-2025  thorpej Step towards modularizing the Flattened Device Tree code.

Define attributes for each of the specific device bindings: clock,
dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain,
pwm, regulator, reset controller, spi, system controller, pin
controller. Include these support files only if either a provider
or consumer with one of these attributes is present in the kernel
config.

Add the necessary attributes to the device / attach declarations for
each provider and consumer.

There are some bindings that are consumed by generic code (iommu, pinctrl,
power, power domain). Provide weak stubs for these routines to handle
situations where there is no provider.

No actual code changed; NFCI.
 1.5 11-Nov-2022  jmcneill Add support for Xilinx 7-series ADC.

The temperature and voltage sensors are exposed with sysmon:

# envstat -d zynqxadc0
Current CritMax WarnMax WarnMin CritMin Unit
temperature: 67.426 degC
vccint: 1.010 V
vccaux: 1.801 V
vp/vn: 0.011 V
vrefp: 1.250 V
vrefn: 0.004 V
vccbram: 1.009 V
vccpint: 1.009 V
vccpaux: 1.799 V
vcco_ddr: 1.500 V
 1.4 27-Oct-2022  jmcneill Add driver for Zynq GPIO controller.
 1.3 26-Oct-2022  jmcneill Use generic Arasan SDHCI driver for Zynq-7000.
 1.2 25-Oct-2022  jmcneill Add basic Zynq-7000 PS clock subsystem driver.

PR# kern/57068
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file files.zynq was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.5 11-Nov-2022  jmcneill Support PCAL clock control
 1.4 05-Nov-2022  jmcneill Add I2C clocks
 1.3 26-Oct-2022  jmcneill Since this node is a child of a syscon, the reg property doesn't fully
describe the device physical address. Use syscon accessors to read/write
clock registers instead.
 1.2 26-Oct-2022  jmcneill Use generic Arasan SDHCI driver for Zynq-7000.
 1.1 25-Oct-2022  jmcneill Add basic Zynq-7000 PS clock subsystem driver.

PR# kern/57068
 1.3 26-Oct-2022  jmcneill Use generic Arasan SDHCI driver for Zynq-7000.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 11-Jun-2019  skrll branches: 1.1.10; 1.1.12;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq7000_sdhc.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.4 06-Sep-2025  thorpej Re-factor the console-related code into fdt_console.[ch]
 1.3 25-Oct-2022  jmcneill Fixup some mixed up log messages.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 11-Jun-2019  skrll branches: 1.1.10; 1.1.12;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq7000_uart.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.3 25-Oct-2022  jmcneill Fixup mixed up log messages.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 11-Jun-2019  skrll branches: 1.1.10; 1.1.12;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq7000_usb.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.12 15-Oct-2025  thorpej Remove a now-unnecessary dance with "local-mac-address".
 1.11 03-Oct-2025  thorpej Use device_setprop_data() to set the "mac-address" property.
 1.10 15-Oct-2024  lloyd Allow non-Realtek PHYs to be used with Zynq SoCs.

The cemac driver used to skip the first PHY found in order to work
around a bug where Realtek PHYs attached to a cemac Ethernet would
report at PHY numbers 0 and 1. Unfortunately if you don't have this
bug, then your only PHY would get skipped.

The Zynq FDT always has a working PHY number recorded in it, so we now
simply use that number (if present) instead of searching for all
available PHYs.
 1.9 25-Aug-2024  skrll Re-organise to enable other attachments.
 1.8 25-Aug-2024  skrll More #include maintenance
 1.7 25-Aug-2024  skrll Wrap long lines.
 1.6 25-Aug-2024  skrll #include maintenance
 1.5 24-Aug-2024  skrll G/C
 1.4 26-Oct-2022  jmcneill branches: 1.4.8;
Inherit MAC address from Devicetree "local-mac-address" property.
 1.3 25-Oct-2022  jmcneill Fixup some mixed up log messages.
 1.2 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.1 11-Jun-2019  skrll branches: 1.1.10; 1.1.12;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_cemac.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.4.8.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Oct-2022  jmcneill Fix MASK_DATA logic in previous commit -- the upper 16-bits are a mask
of pin states to preserve, not to set.
 1.3 29-Oct-2022  jmcneill Fix MASK_DATA_SET macro
 1.2 27-Oct-2022  jmcneill Fix bit macros
 1.1 27-Oct-2022  jmcneill Add driver for Zynq GPIO controller.
 1.12 06-Sep-2025  thorpej Refactor the "platform" defitions into fdt_platform.h
 1.11 07-Apr-2023  skrll Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.
 1.10 31-Oct-2022  jmcneill Implement zynq_platform_reset()
 1.9 28-Oct-2022  jmcneill Retire PARALLELLA and ZEDBOARD kernel configs.

The Zynq-7000 port has been converted to Devicetree and is supported
by the GENERIC kernel now.
 1.8 27-Oct-2022  jmcneill Add OCM to devmap
 1.7 27-Oct-2022  jmcneill Add AP startup for Zynq-7000.
 1.6 25-Oct-2022  jmcneill Remove unnecessary code in zynq_platform_device_register
 1.5 24-Apr-2021  thorpej 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 04-Feb-2021  thorpej branches: 1.4.2;
Call acpi_device_register() / fdtbus_device_register() as approrpriate.
 1.3 28-Sep-2020  jmcneill branches: 1.3.2;
Get rid of a4x bus_space tag from fdtbus_attach_args. The only consumer
of this was various com(4) glue so modify all of that to use the new
com_init_regs_stride instead.
 1.2 10-Jul-2020  skrll Add support for KASAN on ARMv[67]

Thanks to maxv for many pointers and reviews.
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_platform.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.3.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.2.1 03-Apr-2021  thorpej - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE.
- fdtbus_device_register() is now obsolete, so G/C it.
- of_device_register() is now obsolete, so G/C it.
 1.6 04-May-2024  dyoung Initialize `struct consdev` members cn_dev and cn_pri like other
UART drivers do. If cn_dev is 0 instead of NODEV, then the kernel
may redirect console writes to major 0, minor 0, which is /dev/mem.
On my Zynq board the kernel overwrote the page free list with a
console message in this way.
 1.5 27-Oct-2022  skrll Fix build.
Sprinkle some consistency
 1.4 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.3 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.2 10-Nov-2019  chs branches: 1.2.8; 1.2.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.1 11-Jun-2019  skrll Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.2.10.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2.8.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.8.1 10-Nov-2019  martin file zynq_uart.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_uartreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_uartvar.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.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.1 11-Jun-2019  skrll branches: 1.1.10; 1.1.14;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.14.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.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_usb.c was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 08-Feb-2024  andvar s/transeiver/transceiver/ in comments.
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_usbreg.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1 11-Jun-2019  skrll branches: 1.1.10;
Initial commit of FDTised Xilinx Zynq-7000 support. Tested with

qemu-system-arm -M xilinx-zynq-a9 -dtb zynq-zed.dtb -kernel netbsd.ub \
-serial /dev/null -serial stdio

Based on a set of diffs/files from rjs@

sys/arch/arm/zynq is kept in place to allow existing kernels (e.g.
ZEDBOARD and PARALLELLA) to continue to build/work during the transition,
but eventually sys/arch/arm/zynq will be deleted.
 1.1.10.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.1 11-Jun-2019  martin file zynq_usbvar.h was added on branch phil-wifi on 2020-04-13 08:03:38 +0000
 1.1 11-Nov-2022  jmcneill Add support for Xilinx 7-series ADC.

The temperature and voltage sensors are exposed with sysmon:

# envstat -d zynqxadc0
Current CritMax WarnMax WarnMin CritMin Unit
temperature: 67.426 degC
vccint: 1.010 V
vccaux: 1.801 V
vp/vn: 0.011 V
vrefp: 1.250 V
vrefn: 0.004 V
vccbram: 1.009 V
vccpint: 1.009 V
vccpaux: 1.799 V
vcco_ddr: 1.500 V
 1.18 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.17 24-Apr-2021  thorpej branches: 1.17.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.16 14-Oct-2012  msaitoh branches: 1.16.52;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.15 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.14 01-Jul-2011  dyoung branches: 1.14.2; 1.14.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.13 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.12 24-Dec-2005  perry branches: 1.12.102; 1.12.108;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 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 30-Aug-2004  drochner 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.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 15-Jun-2003  fvdl branches: 1.6.2;
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.5 30-May-2003  thorpej Make big-endian mode a little closer to working on the BRH. I can talk
to both the EEPROM *and* the PHY on the Ethernet interface now, at least,
though it is still not completely working.

Many thanks to Stephen Goadhouse at ADI for some hints.
 1.4 23-May-2003  briggs Sprinkle a few aprint_normal()s in place of printf().
 1.3 20-Apr-2003  thorpej Fix a typo that prevented the large inbound PCI memory window from
being programmed (guess RedBoot allowed us to get lucky).
 1.2 25-Mar-2003  thorpej Add support for attaching on-chip peripherals to the BECC using
indirect configuration (because the BECC is a soft-core, it could
have a variety of peripherals in the FPGA). Also add support for
local untranslated DMA.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.6.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.2.1 21-Jun-2006  yamt sync with head.
 1.12.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.12.102.1 31-May-2011  rmind sync with head
 1.14.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.1 30-Oct-2012  yamt sync with head
 1.16.52.7 18-Apr-2021  thorpej Need to be explicit about the interface attribute when attaching the
PCI bus instance because "becc" carries 2 interface attributes.
 1.16.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.16.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.16.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.16.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.16.52.2 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.16.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.17.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.3 11-Dec-2005  christos branches: 1.3.114; 1.3.118;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 20-Apr-2003  thorpej branches: 1.1.2;
Add a driver for the reset button on the ADI BECC.
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.118.1 18-Feb-2012  mrg merge to -current.
 1.3.114.1 17-Apr-2012  yamt sync with head
 1.3 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.2 24-Dec-2005  perry branches: 1.2.52; 1.2.76; 1.2.78; 1.2.80;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.1 25-Jan-2003  thorpej branches: 1.1.18;
Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.2.80.1 16-May-2008  yamt sync with head.
 1.2.78.1 18-May-2008  yamt sync with head.
 1.2.76.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.52.1 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.15 20-Nov-2020  thorpej 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 02-Aug-2012  skrll branches: 1.13.40;
Remove irqframe and replace with identical trapframe.
 1.12 20-Dec-2010  matt branches: 1.12.8;
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 11-Dec-2007  ad And you, be ye fruitful, and multiply; bring forth abundantly in the earth,
and multiply therein. (Genesis 9:6-8)
 1.8 11-Dec-2007  ad Make it compile.
 1.7 24-Nov-2006  wiz branches: 1.7.24; 1.7.28; 1.7.30; 1.7.36; 1.7.40; 1.7.42; 1.7.44;
s/heirarchy/hierarchy/, from Zafer.
 1.6 24-Dec-2005  perry branches: 1.6.20; 1.6.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 14-Aug-2005  he Follow up the type change of i80200_extirq_dispatch which now takes
an irqframe* and not a clockframe* as argument.
 1.3 15-Jul-2003  lukem branches: 1.3.16;
__KERNEL_RCSID()
 1.2 16-Jun-2003  thorpej branches: 1.2.2;
Rename IPL_IMP -> IPL_VM.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 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.3.16.3 21-Jan-2008  yamt sync with head
 1.3.16.2 30-Dec-2006  yamt sync with head.
 1.3.16.1 21-Jun-2006  yamt sync with head.
 1.6.22.1 10-Dec-2006  yamt sync with head.
 1.6.20.1 12-Jan-2007  ad Sync with head.
 1.7.44.2 08-Jan-2008  bouyer Sync with HEAD
 1.7.44.1 13-Dec-2007  bouyer Sync with HEAD
 1.7.42.1 13-Dec-2007  yamt sync with head.
 1.7.40.1 26-Dec-2007  ad Sync with head.
 1.7.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.30.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.7.30.1 09-Jan-2008  matt sync with HEAD
 1.7.28.2 20-Jan-2008  chris Sync to HEAD.
 1.7.28.1 01-Jan-2008  chris Sync with HEAD.
 1.7.24.2 28-Feb-2008  rjs Sync with HEAD.
 1.7.24.1 26-Dec-2007  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.12.8.1 30-Oct-2012  yamt sync with head
 1.13.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.7 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.6 05-Feb-2014  christos put back line accidentally deleted before (hi matt)
 1.5 04-Feb-2014  matt _setsoftintr is long dead. reap any leftovers from arm.
 1.4 27-Apr-2008  matt branches: 1.4.34; 1.4.44; 1.4.50;
Merge kernel changes in matt-armv6 to HEAD.
 1.3 06-Jan-2008  matt branches: 1.3.6; 1.3.8; 1.3.10;
Cleanup softint lossage.
 1.2 24-Dec-2005  perry branches: 1.2.46; 1.2.50; 1.2.52; 1.2.58; 1.2.66;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.1 25-Jan-2003  thorpej branches: 1.1.18;
Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.1.18.2 21-Jan-2008  yamt sync with head
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.2.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.2.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.52.2 09-Jan-2008  matt sync with HEAD
 1.2.52.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.2.50.1 20-Jan-2008  chris Sync to HEAD.
 1.2.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.3.10.1 16-May-2008  yamt sync with head.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.50.1 18-May-2014  rmind sync with head
 1.4.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.34.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.21 07-Jul-2020  thorpej 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.20 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.19 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.18 02-Oct-2015  msaitoh branches: 1.18.16; 1.18.18;
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.17 30-Mar-2014  htodd branches: 1.17.6;
Fix typo.
 1.16 30-Mar-2014  christos wrap a few lines
 1.15 29-Mar-2014  christos make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.14 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.13 14-Oct-2012  msaitoh branches: 1.13.2;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.12 07-Sep-2012  matt branches: 1.12.2;
Fix pci_conf_interrupt fallout.
 1.11 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 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.8 24-Dec-2005  perry branches: 1.8.102; 1.8.108;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 31-Oct-2003  thorpej branches: 1.6.16;
"bogus pin" -> "bogus device" in last change.
 1.5 30-Oct-2003  matt Fix (real) uninitialized error. (Someone familiar with this should see
if is really an error).
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 23-May-2003  briggs branches: 1.3.2;
Sprinkle a few aprint_normal()s in place of printf().
 1.2 29-Jan-2003  briggs Get the interrupt mappings right for the slot.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 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 21-Jun-2006  yamt sync with head.
 1.8.108.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.102.1 21-Apr-2011  rmind sync with head
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.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.10.2.2 30-Oct-2012  yamt sync with head
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.2.2 18-May-2014  rmind sync with head
 1.13.2.1 28-Aug-2013  rmind sync with head
 1.17.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.18.18.1 10-Jun-2019  christos Sync with HEAD
 1.18.16.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1 30-May-2003  thorpej Make big-endian mode a little closer to working on the BRH. I can talk
to both the EEPROM *and* the PHY on the Ethernet interface now, at least,
though it is still not completely working.

Many thanks to Stephen Goadhouse at ADI for some hints.
 1.6 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.5 01-Jul-2011  dyoung branches: 1.5.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 30-May-2003  thorpej branches: 1.2.2;
Make big-endian mode a little closer to working on the BRH. I can talk
to both the EEPROM *and* the PHY on the Ethernet interface now, at least,
though it is still not completely working.

Many thanks to Stephen Goadhouse at ADI for some hints.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 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.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.16 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.15 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.14 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.13 06-Jan-2008  matt Cleanup softint lossage.
 1.12 11-Dec-2007  ad Make it compile.
 1.11 06-Jan-2007  christos branches: 1.11.20; 1.11.24; 1.11.26; 1.11.32; 1.11.34; 1.11.36; 1.11.38;
Add generic TOD support. From Bucky Katz.
 1.10 10-Sep-2006  gdamore branches: 1.10.4;
First pass at enabling a lot of ARM ports to convert swiftly to
__HAVE_GENERIC_TODR. Just put #define __HAVE_GENERIC_TODR in types.h
if your port uses one of these files.
 1.9 11-Dec-2005  christos branches: 1.9.8; 1.9.20;
merge ktrace-lwp.
 1.8 04-Jun-2005  he branches: 1.8.2;
Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.7 04-Jun-2005  rearnsha Fix shadowed use of hz, and attempts to cast away volatile on time.
 1.6 26-Feb-2005  simonb Watch out for those unexpected tains.
 1.5 27-Jul-2003  thorpej branches: 1.5.8; 1.5.10;
Fix think'o in last. Pointed out by Izumi Tsutsui.
 1.4 26-Jul-2003  thorpej Flesh out inittodr() and resettodr().
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 23-May-2003  briggs branches: 1.2.2;
Sprinkle a few aprint_normal()s in place of printf().
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.2.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 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.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.8.2.3 21-Jan-2008  yamt sync with head
 1.8.2.2 26-Feb-2007  yamt sync with head.
 1.8.2.1 30-Dec-2006  yamt sync with head.
 1.9.20.2 12-Jan-2007  ad Sync with head.
 1.9.20.1 18-Nov-2006  ad Sync with head.
 1.9.8.1 14-Sep-2006  yamt sync with head.
 1.10.4.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.11.38.3 20-Jan-2008  bouyer Sync with HEAD
 1.11.38.2 08-Jan-2008  bouyer Sync with HEAD
 1.11.38.1 13-Dec-2007  bouyer Sync with HEAD
 1.11.36.1 13-Dec-2007  yamt sync with head.
 1.11.34.1 26-Dec-2007  ad Sync with head.
 1.11.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.26.2 23-Mar-2008  matt sync with HEAD
 1.11.26.1 09-Jan-2008  matt sync with HEAD
 1.11.24.3 27-Jan-2008  chris Sync to HEAD.
 1.11.24.2 20-Jan-2008  chris Sync to HEAD.
 1.11.24.1 01-Jan-2008  chris Sync with HEAD.
 1.11.20.2 28-Feb-2008  rjs Sync with HEAD.
 1.11.20.1 26-Dec-2007  rjs Sync with HEAD.
 1.2 05-Apr-2003  briggs Channel active is bit 10, not 9.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.4 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.3 25-Mar-2003  thorpej branches: 1.3.144; 1.3.154;
Bump copyright date for last.
 1.2 25-Mar-2003  thorpej Add support for attaching on-chip peripherals to the BECC using
indirect configuration (because the BECC is a soft-core, it could
have a variety of peripherals in the FPGA). Also add support for
local untranslated DMA.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.3.154.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.144.1 30-Oct-2012  yamt sync with head
 1.3 30-May-2003  thorpej Make big-endian mode a little closer to working on the BRH. I can talk
to both the EEPROM *and* the PHY on the Ethernet interface now, at least,
though it is still not completely working.

Many thanks to Stephen Goadhouse at ADI for some hints.
 1.2 20-Apr-2003  thorpej Add a driver for the reset button on the ADI BECC.
 1.1 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.5 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.4 07-Aug-2002  briggs branches: 1.4.200; 1.4.202;
Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.3 30-Jan-2002  thorpej branches: 1.3.2; 1.3.4; 1.3.12;
New interrupt framework for NetBSD/evbarm, and accompanying new
interrupt code for the IQ80310 board support package.

XXX The Integrator board support package still uses the old-style
arm32 interrupt code, so some compatibility hacks have been added
for it. When the Integrator uses new-style interrupts, those hacks
can go away.
 1.2 24-Jan-2002  thorpej Fix a typo (thanks Allen).
 1.1 23-Jan-2002  thorpej Add generic code to manipulate the i80200 ICU.
 1.3.12.1 30-Aug-2002  gehenna catch up with -current.
 1.3.4.3 13-Aug-2002  nathanw Catch up to -current.
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 30-Jan-2002  nathanw file files.i80200 was added on branch nathanw_sa on 2002-02-28 04:07:43 +0000
 1.3.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 30-Jan-2002  jdolecek file files.i80200 was added on branch kqueue on 2002-02-11 20:07:22 +0000
 1.4.202.1 10-Jun-2019  christos Sync with HEAD
 1.4.200.1 28-Jul-2018  pgoyette Sync with HEAD
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.6 01-Aug-2002  thorpej branches: 1.6.8;
Move the DMA tag initialization functions into i80312.c.
 1.5 12-Apr-2002  thorpej branches: 1.5.2;
Use the bus_space_generic bus space ops.
 1.4 29-Nov-2001  thorpej branches: 1.4.2;
Add routines for accessing the general purpose I/O facility of
the i80312 Companion I/O chip.
 1.3 09-Nov-2001  thorpej branches: 1.3.2; 1.3.4;
Add support for PCI DMA on the i80312. We currently just do
DMA via the Secondary Inbound window, for now. Will probably
need to revisit this at some point.

Require that the board-specific i80312 front-end slice off a
subregion for the memory controller before calling i80312_attach(),
and fix a bug in the IQ80310 front-end that caused the Secondary
Inbound window to be configured incorrectly.
 1.2 09-Nov-2001  thorpej Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.1 05-Nov-2001  thorpej Config info for the i80312 XScale companion I/O chip.
 1.3.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.3.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.3.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 09-Nov-2001  nathanw file files.i80312 was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.3.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 09-Nov-2001  thorpej file files.i80312 was added on branch thorpej-mips-cache on 2001-11-12 21:16:34 +0000
 1.4.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 29-Nov-2001  thorpej file files.i80312 was added on branch kqueue on 2002-01-10 19:38:32 +0000
 1.5.2.1 30-Aug-2002  gehenna catch up with -current.
 1.6.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.8.1 03-Aug-2004  skrll Sync with HEAD
 1.17 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.16 17-Oct-2007  garbled branches: 1.16.106; 1.16.108;
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.15 12-May-2007  gavan branches: 1.15.10; 1.15.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.14 11-Dec-2005  christos branches: 1.14.26; 1.14.30; 1.14.32; 1.14.38;
merge ktrace-lwp.
 1.13 12-Feb-2005  rearnsha branches: 1.13.6;
Permit the counter frequency to be overridden by a board configuration
 1.12 06-Oct-2003  thorpej branches: 1.12.8; 1.12.10;
Add support for the i80312 and i80321 I2C controllers.
 1.11 25-Jan-2003  thorpej branches: 1.11.2;
Back out unintentional commit.
 1.10 25-Jan-2003  thorpej Support for ADI Engineering's Big Endian Companion Chip for the
Intel i80200 XScale processor. Despite its name, the BECC can
run in both big- and little-endian modes.
 1.9 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.8 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.7 02-Aug-2002  thorpej Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit. The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations. We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
 1.6 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80321.c.
 1.5 29-Jul-2002  thorpej Add support for the i80321 watchdog timer.
 1.4 29-Jul-2002  thorpej Add support for attaching IOP built-in sub-devices (aau, dma, ssp,
watchdog, etc.)
 1.3 25-Jul-2002  thorpej Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
 1.2 12-Apr-2002  thorpej branches: 1.2.2; 1.2.4; 1.2.6;
Use the bus_space_generic bus space ops.
 1.1 27-Mar-2002  thorpej branches: 1.1.2;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.2.6 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.5 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file files.i80321 was added on branch nathanw_sa on 2002-04-01 07:39:15 +0000
 1.2.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 12-Apr-2002  jdolecek file files.i80321 was added on branch kqueue on 2002-06-23 17:34:57 +0000
 1.2.4.3 07-Dec-2002  he Pull up revision 1.3 (requested by thorpej in ticket #568):
Add support for DMA to/from the on-chip devices of the
i80321.
 1.2.4.2 11-Nov-2002  he Pull up revision 1.5 (via patch, requested by thorpej in ticket #575):
Add support for the i80321 watchdog timer.
 1.2.4.1 11-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #571):
Add support for attaching IOP built-in sub-devices (aau,
dma, ssp, watchdog, etc.)
 1.2.2.1 30-Aug-2002  gehenna catch up with -current.
 1.11.2.4 15-Feb-2005  skrll Sync with HEAD.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.10.1 12-Feb-2005  yamt sync with head.
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.13.6.1 03-Sep-2007  yamt sync with head.
 1.14.38.1 22-May-2007  matt Update to HEAD.
 1.14.32.1 11-Jul-2007  mjf Sync with head.
 1.14.30.1 27-May-2007  ad Sync with head.
 1.14.26.1 17-May-2007  yamt sync with head.
 1.15.12.1 06-Nov-2007  matt sync with HEAD
 1.15.10.1 01-Jan-2008  chris Sync with HEAD.
 1.16.108.1 10-Jun-2019  christos Sync with HEAD
 1.16.106.1 28-Jul-2018  pgoyette Sync with HEAD
 1.13 17-Jun-2023  rin Rework microcode for IXP425 npe(4).

Instead of using objcopy(1), which cannot handle EABI version
embedded in e_flags of ELF header, add a dedicated asm file.

If proprietary microcode binary is present, it is incbin'ed
from that asm file.
 1.12 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.11 10-Dec-2006  scw branches: 1.11.136; 1.11.138;
Support the IXP425 watchdog timer.
 1.10 10-Dec-2006  scw Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.9 04-Mar-2006  scw branches: 1.9.14; 1.9.16;
Allow the kernel config file to override the default timer frequency
using "options IXP425_CLOCK_FREQ".
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6;
merge ktrace-lwp.
 1.7 01-May-2004  thorpej branches: 1.7.12;
COM_PXA2X0 is now defflag'd in sys/conf/files
 1.6 08-Dec-2003  scw Add support for picking up the size of SDRAM by reading the memory
controller's config register.
 1.5 16-Nov-2003  scw - Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.4 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.3 25-Sep-2003  ichiro pci bus support
 1.2 01-Jun-2003  ichiro branches: 1.2.2;
add console unit number to configuration parameter.
move structure of uart information
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 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.7.12.2 30-Dec-2006  yamt sync with head.
 1.7.12.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.16.1 18-Dec-2006  yamt sync with head.
 1.9.14.1 12-Jan-2007  ad Sync with head.
 1.11.138.1 10-Jun-2019  christos Sync with HEAD
 1.11.136.1 28-Jul-2018  pgoyette Sync with HEAD
 1.21 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.20 09-Mar-2018  christos branches: 1.20.2; 1.20.4;
fix device attributes
 1.19 16-Jun-2017  pgoyette branches: 1.19.4;
Add gpio support for Xscale

From Stephan Meisenger in PR/52163
 1.18 06-Jun-2012  skrll branches: 1.18.2; 1.18.16;
Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.17 14-May-2011  nonaka branches: 1.17.4; 1.17.10;
PXA2X0_LCD_WRITETHROUGH is defflag'd.
 1.16 21-Apr-2009  nonaka branches: 1.16.4; 1.16.6;
Added SD/MMC support from OpenBSD.
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.
 1.15 03-Dec-2007  ad branches: 1.15.18; 1.15.26; 1.15.32;
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.14 25-Feb-2007  nonaka branches: 1.14.4; 1.14.18; 1.14.20; 1.14.22; 1.14.24; 1.14.30;
Add PXA2x0 RTC driver.
 1.13 02-Feb-2007  ober branches: 1.13.2;
Updates to allow Zaurus screen to rotate 90 degrees to a usable state with the keyboard. Patch from peter@ copied from OpenBSD. Feedback and OK from matt@
 1.12 17-Dec-2006  peter Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.11 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.10 10-Dec-2006  kiyohara Add definition the HWUART (and NSSP).
 1.9 11-Dec-2005  christos branches: 1.9.20; 1.9.22;
merge ktrace-lwp.
 1.8 04-Jul-2005  bsh branches: 1.8.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.7 13-Apr-2005  scw Add support for the DMA and AC97 controllers on PXA2x0, and enable them
on the Lubbock evaluation board.

Many thanks to Hiroyuki Bessho for testing this driver with the new
aurateconv interface, as I no longer have access to the hardware.

Contributed by Wasabi Systems, Inc.
 1.6 01-May-2004  thorpej branches: 1.6.4;
COM_PXA2X0 is now defflag'd in sys/conf/files
 1.5 06-Jun-2003  scw branches: 1.5.2;
Gah, fix previous. s/defopt/defflag/
 1.4 05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.3 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.2 20-Dec-2002  bsh comment out a file that is not in the tree yet.
 1.1 18-Dec-2002  bsh branches: 1.1.2;
Config information for Intel PXA2xx application processors.
 1.1.2.4 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.3 29-Dec-2002  thorpej Sync with HEAD.
 1.1.2.2 19-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 18-Dec-2002  thorpej file files.pxa2x0 was added on branch nathanw_sa on 2002-12-19 00:30:46 +0000
 1.5.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.4.1 29-Apr-2005  kent sync with -current
 1.8.2.3 07-Dec-2007  yamt sync with head
 1.8.2.2 26-Feb-2007  yamt sync with head.
 1.8.2.1 30-Dec-2006  yamt sync with head.
 1.9.22.1 18-Dec-2006  yamt sync with head.
 1.9.20.2 09-Feb-2007  ad Sync with HEAD.
 1.9.20.1 12-Jan-2007  ad Sync with head.
 1.13.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.14.30.1 08-Dec-2007  mjf Sync with HEAD.
 1.14.24.1 09-Jan-2008  matt sync with HEAD
 1.14.22.1 01-Jan-2008  chris Sync with HEAD.
 1.14.20.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.14.18.1 26-Dec-2007  rjs Sync with HEAD.
 1.14.4.1 03-Dec-2007  ad Sync with HEAD.
 1.15.32.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.26.1 28-Apr-2009  skrll Sync with HEAD.
 1.15.18.1 04-May-2009  yamt sync with head.
 1.16.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.16.4.1 31-May-2011  rmind sync with head
 1.17.10.1 10-Aug-2012  jdc Pull up revisions:
src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
src/sys/arch/arm/gemini/files.gemini revision 1.12
src/sys/arch/arm/mpcore/files.mpcore revision 1.2
src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
src/sys/arch/arm/omap/files.omap revision 1.6
src/sys/arch/arm/omap/files.omap2 revision 1.9
src/sys/arch/arm/omap/omap_a2x_io.S delete
src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.17.4.1 30-Oct-2012  yamt sync with head
 1.18.16.1 28-Aug-2017  skrll Sync with HEAD
 1.18.2.1 03-Dec-2017  jdolecek update from HEAD
 1.19.4.1 15-Mar-2018  pgoyette Synch with HEAD
 1.20.4.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.20.2.1 10-Jun-2019  christos Sync with HEAD
 1.10 02-Aug-2012  skrll Remove irqframe and replace with identical trapframe.
 1.9 24-Dec-2005  perry branches: 1.9.114;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 14-Aug-2005  he Follow up the type change of i80200_extirq_dispatch which now takes
an irqframe* and not a clockframe* as argument.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 25-Jun-2002  thorpej branches: 1.5.8;
Interrupt steering register is cp13.8, not cp13.2 (D'oh!).
 1.4 26-Mar-2002  thorpej branches: 1.4.2; 1.4.4;
Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.3 25-Jan-2002  thorpej branches: 1.3.2; 1.3.4;
Make the software copy of INTCTL volatile.
 1.2 24-Jan-2002  thorpej Add an IRQ vector to be shared by all i80200 applications. This
consults the interrupt source bits in the i80200 ICU and calls
a board-specific external IRQ dispatcher if an external IRQ is
pending.
 1.1 23-Jan-2002  thorpej Add generic code to manipulate the i80200 ICU.
 1.3.4.4 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 25-Jan-2002  nathanw file i80200_icu.c was added on branch nathanw_sa on 2002-02-28 04:07:44 +0000
 1.3.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.2.1 25-Jan-2002  jdolecek file i80200_icu.c was added on branch kqueue on 2002-02-11 20:07:22 +0000
 1.4.4.1 25-Jun-2002  lukem Pull up revision 1.5 (requested by thorpej in ticket #363):
Interrupt steering register is cp13.8, not cp13.2 (D'oh!).
 1.4.2.1 16-Jul-2002  gehenna catch up with -current.
 1.5.8.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.9.114.1 30-Oct-2012  yamt sync with head
 1.19 21-Nov-2020  skrll Adjust egister usage so that r4 and r5 are preserved as cur{cpu,lwp}
respectively as required by the change to make ASTs operate per-LWP
rather than per-CPU. DO_AST_AND_RESTORE_ALIGNMENT_FAULTS expects this.

XXX untested
 1.18 12-Jul-2018  maxv branches: 1.18.12;
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.17 18-Aug-2013  matt branches: 1.17.28; 1.17.30;
Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.16 27-Apr-2008  matt branches: 1.16.34; 1.16.44; 1.16.50;
Merge kernel changes in matt-armv6 to HEAD.
 1.15 06-Jan-2008  matt branches: 1.15.6; 1.15.8; 1.15.10;
Truly kill current_intr_depth once and for all.
 1.14 09-Mar-2007  thorpej branches: 1.14.8; 1.14.16; 1.14.20; 1.14.22; 1.14.28; 1.14.34;
Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing. (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
 1.13 11-Dec-2005  christos branches: 1.13.26;
merge ktrace-lwp.
 1.12 31-May-2005  chs branches: 1.12.2;
remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them.
 1.11 05-Nov-2003  scw Enable/Restore alignment fault state on interrupt handler entry/exit.
 1.10 02-Jan-2003  thorpej branches: 1.10.2;
Garbage-collect prev_intr_depth; nothing uses it.
 1.9 25-Oct-2002  briggs Restore .Lpmc_intr_return -- ben only removed one of two references to it.
 1.8 21-Oct-2002  bjh21 Pull down rev 1.7.2.1 [must be careful which branch I commit to!]:
Reinstate .Lextirq_return: it was used in two places, and I only removed one
of them.
 1.7 14-Oct-2002  bjh21 branches: 1.7.2;
Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.6 17-Aug-2002  thorpej Use correct-for-ELF local labels.
 1.5 14-Aug-2002  thorpej Use cpsr_c rather then cpsr_all where appropriate.
 1.4 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.3 29-Jul-2002  thorpej Clean up some comments.
 1.2 25-Jun-2002  thorpej * Interrupt status is in cp13.4, not cp13.1 (D'oh!)
* Fix an inverted test.
 1.1 24-Jan-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.12; 1.1.14;
Add an IRQ vector to be shared by all i80200 applications. This
consults the interrupt source bits in the i80200 ICU and calls
a board-specific external IRQ dispatcher if an external IRQ is
pending.
 1.1.14.2 11-Nov-2002  he Pull up revision 1.3 (requested by thorpej in ticket #579):
Clean up some comments.
 1.1.14.1 25-Jun-2002  lukem Pull up revision 1.2 (requested by thorpej in ticket #364):
* Interrupt status is in cp13.4, not cp13.1 (D'oh!)
* Fix an inverted test.
 1.1.12.2 30-Aug-2002  gehenna catch up with -current.
 1.1.12.1 16-Jul-2002  gehenna catch up with -current.
 1.1.4.9 03-Jan-2003  thorpej Sync with HEAD.
 1.1.4.8 25-Oct-2002  thorpej Sync with HEAD.
 1.1.4.7 22-Oct-2002  thorpej Sync with HEAD.
 1.1.4.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.5 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 24-Jan-2002  nathanw file i80200_irq.S was added on branch nathanw_sa on 2002-02-28 04:07:44 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 24-Jan-2002  jdolecek file i80200_irq.S was added on branch kqueue on 2002-02-11 20:07:22 +0000
 1.7.2.1 21-Oct-2002  bjh21 Reinstate .Lextirq_return: it was used in two places, and I only removed one
of them.
 1.10.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.2 21-Jan-2008  yamt sync with head
 1.12.2.1 03-Sep-2007  yamt sync with head.
 1.13.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.34.1 08-Jan-2008  bouyer Sync with HEAD
 1.14.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.22.3 09-Jan-2008  matt sync with HEAD
 1.14.22.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.14.22.1 29-Aug-2007  matt Adapt to everything in cpu_info
 1.14.20.1 20-Jan-2008  chris Sync to HEAD.
 1.14.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.14.8.1 18-Apr-2007  thorpej Remove _lock_cas() in favor of atomic_cas_32().
 1.15.10.1 16-May-2008  yamt sync with head.
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.50.1 28-Aug-2013  rmind sync with head
 1.16.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.34.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.17.30.1 10-Jun-2019  christos Sync with HEAD
 1.17.28.1 28-Jul-2018  pgoyette Sync with HEAD
 1.18.12.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 25-Jun-2002  thorpej Correct a comment.
 1.3 26-Mar-2002  thorpej branches: 1.3.2; 1.3.4;
Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.2 23-Jan-2002  thorpej Make this usable directly by assembly code.
 1.1 01-Dec-2001  thorpej branches: 1.1.2; 1.1.4;
Add register definitions for the i80200 Interrupt Controller Unit,
Bus Controller Unit, and Performance Monitoring Unit.
 1.1.4.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 01-Dec-2001  thorpej file i80200reg.h was added on branch kqueue on 2002-01-10 19:38:32 +0000
 1.1.2.5 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 01-Dec-2001  nathanw file i80200reg.h was added on branch nathanw_sa on 2002-01-08 00:23:18 +0000
 1.3.4.1 25-Jun-2002  lukem Pull up revision 1.4 (requested by thorpej in ticket #365):
Correct a comment.
 1.3.2.1 16-Jul-2002  gehenna catch up with -current.
 1.6 02-Aug-2012  skrll Remove irqframe and replace with identical trapframe.
 1.5 29-Jul-2012  matt Fix more -fno-common fallout.
Move more variables to common locations.
 1.4 16-Aug-2002  briggs branches: 1.4.150;
i80200_extirq_dispatch takes a struct irqframe * now.
 1.3 26-Mar-2002  thorpej branches: 1.3.2;
Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.2 24-Jan-2002  thorpej branches: 1.2.2; 1.2.4;
Add an IRQ vector to be shared by all i80200 applications. This
consults the interrupt source bits in the i80200 ICU and calls
a board-specific external IRQ dispatcher if an external IRQ is
pending.
 1.1 23-Jan-2002  thorpej Add generic code to manipulate the i80200 ICU.
 1.2.4.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.4.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 24-Jan-2002  nathanw file i80200var.h was added on branch nathanw_sa on 2002-02-28 04:07:44 +0000
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 24-Jan-2002  jdolecek file i80200var.h was added on branch kqueue on 2002-02-11 20:07:22 +0000
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.4.150.1 30-Oct-2012  yamt sync with head
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 24-Apr-2021  thorpej branches: 1.25.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.24 01-Mar-2019  msaitoh branches: 1.24.14;
- Almost all ppbreg.h's definitions are also in pcireg.h. Remove duplicated
definitions from ppbreg.h and move some definitions from ppbreg.h to
pcireg.h.
- Change fast back-to-back "capable" to "enable" in pci_subr.c.
- Print Primary Discard Timer, Secondary Discard Timer, Discard Timer Status
and Discard Timer SERR# Enable bit in pci_subr.c.
- PCI_BRIDGE_PREFETCHBASE32_REG and PCI_BRIDGE_PREFETCHLIMIT32_REG are
"upper" 32bit registers, rename to *UP32_REG to avoid confusion.
- Use macro.
 1.23 14-Oct-2012  msaitoh branches: 1.23.38;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.22 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.21 01-Jul-2011  dyoung branches: 1.21.2; 1.21.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.20 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.19 25-Feb-2006  wiz branches: 1.19.96; 1.19.102;
Fix some typos.
 1.18 11-Dec-2005  christos branches: 1.18.2; 1.18.4; 1.18.6;
merge ktrace-lwp.
 1.17 30-Aug-2004  drochner branches: 1.17.12;
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.16 06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.15 15-Jul-2003  lukem __KERNEL_RCSID()
 1.14 15-Jun-2003  fvdl branches: 1.14.2;
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.13 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.12 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.11 17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.10 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80312.c.
 1.9 16-May-2002  thorpej * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.8 14-Feb-2002  briggs branches: 1.8.8;
Actually set the i80312_softc global.
 1.7 04-Jan-2002  briggs branches: 1.7.2;
Initialize pba_intrswiz and pba_intrtag before configuring PCI bus.
 1.6 30-Nov-2001  thorpej Clarify a comment to state that it is intentional that we attach
only the Secondary PCI bus (it's the only bus which can have a
device space hidden from any PCI host on the Primary bus).

Also, use the bus number from the PPB businfo register seecondary bus
field rather than hard-coding "1".
 1.5 29-Nov-2001  thorpej Add routines for accessing the general purpose I/O facility of
the i80312 Companion I/O chip.
 1.4 28-Nov-2001  thorpej Disable MRL, MRM, and MWI for now.
 1.3 10-Nov-2001  thorpej branches: 1.3.2; 1.3.4;
Add a comment explaining that we expect the memory controller
registers to already be subregion'd off, and actually init
the PCI DMA tag.
 1.2 09-Nov-2001  thorpej Disable the ATU interrupt sources (i.e. interrupts that occur when
we get Master or Target aborts).
 1.1 09-Nov-2001  thorpej Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.3.4.9 03-Jan-2003  thorpej Sync with HEAD.
 1.3.4.8 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.7 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.3.4.6 13-Aug-2002  nathanw Catch up to -current.
 1.3.4.5 20-Jun-2002  nathanw Catch up to -current.
 1.3.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.3 11-Jan-2002  nathanw More catchup.
 1.3.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 10-Nov-2001  nathanw file i80312.c was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.3.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 10-Nov-2001  thorpej file i80312.c was added on branch thorpej-mips-cache on 2001-11-12 21:16:34 +0000
 1.7.2.6 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.2.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.7.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.1 04-Jan-2002  thorpej file i80312.c was added on branch kqueue on 2002-01-10 19:38:32 +0000
 1.8.8.2 30-Aug-2002  gehenna catch up with -current.
 1.8.8.1 30-May-2002  gehenna Catch up with -current.
 1.14.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.14.2.2 03-Sep-2004  skrll Sync with HEAD
 1.14.2.1 03-Aug-2004  skrll Sync with HEAD
 1.17.12.1 21-Jun-2006  yamt sync with head.
 1.18.6.1 22-Apr-2006  simonb Sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.18.2.1 01-Mar-2006  yamt sync with head.
 1.19.102.1 06-Jun-2011  jruoho Sync with HEAD.
 1.19.96.1 31-May-2011  rmind sync with head
 1.21.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.2.1 30-Oct-2012  yamt sync with head
 1.23.38.1 10-Jun-2019  christos Sync with HEAD
 1.24.14.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.25.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 29-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.22;
Add routines for accessing the general purpose I/O facility of
the i80312 Companion I/O chip.
 1.1.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.22.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1 29-Nov-2001  thorpej file i80312_gpio.c was added on branch kqueue on 2002-01-10 19:38:32 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.2.1 29-Nov-2001  nathanw file i80312_gpio.c was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.7 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.6 10-Jan-2012  jakllsch branches: 1.6.48;
split iopi2c(4) device/softc
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 06-Dec-2007  ad lockmgr -> mutex
 1.3 08-Mar-2006  lukem branches: 1.3.24; 1.3.36; 1.3.38; 1.3.40; 1.3.42; 1.3.48; 1.3.52;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10;
merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4; 1.1.18;
Add support for the i80312 and i80321 I2C controllers.
 1.1.18.2 07-Dec-2007  yamt sync with head
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file i80312_i2c.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.2.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.8.1 13-Mar-2006  yamt sync with head.
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.3.52.1 08-Dec-2007  ad Sync with head.
 1.3.48.1 08-Dec-2007  mjf Sync with HEAD.
 1.3.42.1 09-Jan-2008  matt sync with HEAD
 1.3.40.1 01-Jan-2008  chris Sync with HEAD.
 1.3.38.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.3.36.1 26-Dec-2007  rjs Sync with HEAD.
 1.3.24.1 09-Dec-2007  reinoud Pullup to HEAD
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.6.48.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 31-Jul-2018  skrll Sprinkle #include "opt_arm_debug.h" where VERBOSE_INIT_ARM is used
 1.5 01-Jul-2011  dyoung branches: 1.5.52; 1.5.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 18-Dec-2001  thorpej branches: 1.2.2; 1.2.20;
Change some #if 0 to #ifdef VERBOSE_INIT_ARM.
 1.1 05-Nov-2001  thorpej branches: 1.1.2; 1.1.4;
Routines for handling the i80312 memory controller for XScale.
Currently includes a routine to determine memory size from the
SDRAM configuration registers.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 05-Nov-2001  nathanw file i80312_mem.c was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 05-Nov-2001  thorpej file i80312_mem.c was added on branch thorpej-mips-cache on 2001-11-12 21:16:34 +0000
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 18-Dec-2001  thorpej file i80312_mem.c was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.5.54.1 10-Jun-2019  christos Sync with HEAD
 1.5.52.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.19 07-Jul-2020  thorpej 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.18 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.17 01-Mar-2019  msaitoh - Almost all ppbreg.h's definitions are also in pcireg.h. Remove duplicated
definitions from ppbreg.h and move some definitions from ppbreg.h to
pcireg.h.
- Change fast back-to-back "capable" to "enable" in pci_subr.c.
- Print Primary Discard Timer, Secondary Discard Timer, Discard Timer Status
and Discard Timer SERR# Enable bit in pci_subr.c.
- PCI_BRIDGE_PREFETCHBASE32_REG and PCI_BRIDGE_PREFETCHLIMIT32_REG are
"upper" 32bit registers, rename to *UP32_REG to avoid confusion.
- Use macro.
 1.16 02-Oct-2015  msaitoh branches: 1.16.18;
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.15 28-Jan-2014  martin branches: 1.15.6;
Remove an unused variable
 1.14 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.13 14-Oct-2012  msaitoh branches: 1.13.2;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.12 07-Sep-2012  matt branches: 1.12.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.11 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 23-May-2003  briggs branches: 1.7.2;
Sprinkle a few aprint_normal()s in place of printf().
 1.6 30-Nov-2001  thorpej branches: 1.6.2;
Clarify a comment.
 1.5 29-Nov-2001  thorpej Use the new arm_dcache_align variable to set the PCI device BHLC
register.
 1.4 28-Nov-2001  thorpej Add a "cacheline_size" argument to pci_configure_bus(). It is used
to set the cacheline size in the BHLC register. This should be the
size of the largest D-cache line on a system.
 1.3 09-Nov-2001  thorpej branches: 1.3.2; 1.3.4;
Add support for configuring the PCI bus (starting with the Secondary
bus only, for now).

XXX Some cleanup wrt. pci_conf_interrupt() needs to happen.
 1.2 09-Nov-2001  thorpej Clear the Master Abort after reading config space for a non-existent
PCI device. Disable debugging messages, as PCI config space works now.
 1.1 09-Nov-2001  thorpej Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.3.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.3.4.1 09-Nov-2001  nathanw file i80312_pci.c was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.3.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.3.2.1 09-Nov-2001  thorpej file i80312_pci.c was added on branch thorpej-mips-cache on 2001-11-12 21:16:34 +0000
 1.6.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.1 30-Nov-2001  thorpej file i80312_pci.c was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.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.10.2.2 30-Oct-2012  yamt sync with head
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.12.2.3 03-Dec-2017  jdolecek update from HEAD
 1.12.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.2.2 18-May-2014  rmind sync with head
 1.13.2.1 28-Aug-2013  rmind sync with head
 1.15.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.16.18.1 10-Jun-2019  christos Sync with HEAD
 1.6 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80312.c.
 1.5 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.4 28-Jul-2002  thorpej Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that. This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
 1.3 02-May-2002  thorpej branches: 1.3.2; 1.3.4;
Fix error reporting in the bus_dmamap_load_mbuf() routines.
 1.2 25-Jan-2002  thorpej Overhaul bus_dmamap_sync for the ARM:
* Track which process (XXX really, vmspace) owns the mapping. When
we sync the map, if the mapping doesn't belong to the kernel or to
the current process (XXX really, vmspace), then no cache fobbing
is necessary, since the cache is Wb-Inv'd on context switch (XXX need
to revisit this when we support FCSE).
* Be smarter about which cache operation we do when sync'ing the map:
- PREREAD -- Invalidate D$ (XXX right now, we actually do Wb-Inv)
- PREWRITE -- Write-back D$ (note, we do NOT invalidate here)
- PREREAD|PREWRITE -- Wb-Inv D$

More work is needed here. In particular, a version for CPUs
with write-through caches should be provided, to eliminate
the write-back steps (which are noops on such CPUs, but skipping
two branches would be nice).
 1.1 09-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Add support for PCI DMA on the i80312. We currently just do
DMA via the Secondary Inbound window, for now. Will probably
need to revisit this at some point.

Require that the board-specific i80312 front-end slice off a
subregion for the memory controller before calling i80312_attach(),
and fix a bug in the IQ80310 front-end that caused the Secondary
Inbound window to be configured incorrectly.
 1.1.6.5 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 09-Nov-2001  thorpej file i80312_pci_dma.c was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.1.4.5 13-Aug-2002  nathanw Catch up to -current.
 1.1.4.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.1 09-Nov-2001  nathanw file i80312_pci_dma.c was added on branch nathanw_sa on 2002-02-28 04:07:45 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 09-Nov-2001  thorpej file i80312_pci_dma.c was added on branch thorpej-mips-cache on 2001-11-12 21:16:35 +0000
 1.3.4.1 07-Dec-2002  he Pull up revision 1.4 (requested by thorpej in ticket #568):
Change the way DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a
pointer to the original buffer/buftype used to load the
DMA map, and use that. Shrinks bus_dma_segment_t from 12
to 8 bytes, and the cache flushing is also more efficient.
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.12 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.11 01-Jul-2011  dyoung branches: 1.11.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 24-Feb-2010  skrll Typo in comment.
 1.9 24-Nov-2005  yamt branches: 1.9.80; 1.9.100;
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.8 01-Apr-2005  yamt branches: 1.8.2; 1.8.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.7 06-Oct-2003  thorpej branches: 1.7.8; 1.7.10;
Make sure to pass mod/ref seeds with PMAP_WIRED.
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 27-Sep-2002  provos branches: 1.5.8;
remove trailing \n in panic(). approved perry.
 1.4 29-Aug-2002  briggs Use generic_bs_sr_4 for bus_space_set_region_4.
 1.3 12-Apr-2002  thorpej branches: 1.3.2; 1.3.4;
Use the bus_space_generic bus space ops.
 1.2 28-Nov-2001  thorpej branches: 1.2.2;
Oops, make sure to add in the physical base of the PCI memory
window when mapping PCI mem space. (Whee, I can take out my
local hack, now).
 1.1 09-Nov-2001  thorpej branches: 1.1.2; 1.1.4;
Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.1.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.4 29-Aug-2002  briggs Sync with head.
 1.1.4.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.1.4.1 09-Nov-2001  nathanw file i80312_space.c was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 09-Nov-2001  thorpej file i80312_space.c was added on branch thorpej-mips-cache on 2001-11-12 21:16:35 +0000
 1.2.2.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.1 28-Nov-2001  thorpej file i80312_space.c was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.3.4.1 07-Dec-2002  he Pull up revision 1.4 (requested by briggs in ticket #749):
Use generic_bs_sr_4 for bus_space_set_region_4.
 1.3.2.1 31-Aug-2002  gehenna catch up with -current.
 1.5.8.5 11-Dec-2005  christos Sync with head.
 1.5.8.4 01-Apr-2005  skrll Sync with HEAD.
 1.5.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.8.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.8.1 29-Nov-2005  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.9.100.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9.80.1 11-Mar-2010  yamt sync with head
 1.11.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.2 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.1 09-Nov-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 09-Nov-2001  thorpej file i80312_space_asm.S was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.1.4.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.4.1 09-Nov-2001  nathanw file i80312_space_asm.S was added on branch nathanw_sa on 2002-04-17 00:02:36 +0000
 1.1.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.1 09-Nov-2001  thorpej file i80312_space_asm.S was added on branch thorpej-mips-cache on 2001-11-12 21:16:35 +0000
 1.12 08-Feb-2018  dholland Typos.
 1.11 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10 24-Jan-2002  thorpej branches: 1.10.2; 1.10.124; 1.10.126; 1.10.128;
Clean up the i80312 PMU definitions.
 1.9 29-Nov-2001  thorpej Update copyright.
 1.8 09-Nov-2001  thorpej branches: 1.8.2;
Disable the ATU interrupt sources (i.e. interrupts that occur when
we get Master or Target aborts).
 1.7 09-Nov-2001  thorpej Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.6 08-Nov-2001  thorpej Adjust the way the PMMRs are defined -- offsets from a base, not
absolutes. Also, add PPB and more ATU registers.
 1.5 04-Nov-2001  thorpej Add PCI window addresses.
 1.4 04-Nov-2001  thorpej Add a comment describing what this file is.
 1.3 04-Nov-2001  thorpej Add missing RCS ID, add missing name.
 1.2 05-Sep-2001  matt branches: 1.2.4;
Fix some register definitions.
 1.1 26-Aug-2001  matt Add i80312 register definitions (just registers for now).
 1.2.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.8.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.8.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.8.2.1 09-Nov-2001  nathanw file i80312reg.h was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.10.128.1 16-May-2008  yamt sync with head.
 1.10.126.1 18-May-2008  yamt sync with head.
 1.10.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.10.2.1 24-Jan-2002  jdolecek file i80312reg.h was added on branch kqueue on 2002-02-11 20:07:22 +0000
 1.11 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.7 01-Aug-2002  thorpej branches: 1.7.8;
Move the DMA tag initialization functions into i80312.c.
 1.6 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.5 29-Nov-2001  thorpej branches: 1.5.2; 1.5.10;
Add routines for accessing the general purpose I/O facility of
the i80312 Companion I/O chip.
 1.4 09-Nov-2001  thorpej branches: 1.4.2; 1.4.4;
Add support for PCI DMA on the i80312. We currently just do
DMA via the Secondary Inbound window, for now. Will probably
need to revisit this at some point.

Require that the board-specific i80312 front-end slice off a
subregion for the memory controller before calling i80312_attach(),
and fix a bug in the IQ80310 front-end that caused the Secondary
Inbound window to be configured incorrectly.
 1.3 09-Nov-2001  thorpej Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
 1.2 05-Nov-2001  thorpej RCS ID.
 1.1 05-Nov-2001  thorpej Prototypes for i80312 routines.
 1.4.4.4 13-Aug-2002  nathanw Catch up to -current.
 1.4.4.3 01-Aug-2002  nathanw Catch up to -current.
 1.4.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.4.1 09-Nov-2001  nathanw file i80312var.h was added on branch nathanw_sa on 2002-01-08 00:23:19 +0000
 1.4.2.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.2.1 09-Nov-2001  thorpej file i80312var.h was added on branch thorpej-mips-cache on 2001-11-12 21:16:35 +0000
 1.5.10.1 30-Aug-2002  gehenna catch up with -current.
 1.5.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.2.1 29-Nov-2001  thorpej file i80312var.h was added on branch kqueue on 2002-01-10 19:38:33 +0000
 1.7.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.8.1 03-Aug-2004  skrll Sync with HEAD
 1.10.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.2.1 30-Oct-2012  yamt sync with head
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 24-Apr-2021  thorpej branches: 1.25.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.24 18-Sep-2012  matt branches: 1.24.52;
Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.23 12-Feb-2012  matt branches: 1.23.6;
Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.22 01-Jul-2011  dyoung branches: 1.22.2; 1.22.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21 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.20 17-Oct-2007  garbled branches: 1.20.42; 1.20.48;
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.19 12-May-2007  gavan branches: 1.19.10; 1.19.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.18 25-Feb-2006  wiz branches: 1.18.20; 1.18.24; 1.18.26; 1.18.32;
Fix some typos.
 1.17 11-Dec-2005  christos branches: 1.17.2; 1.17.4; 1.17.6;
merge ktrace-lwp.
 1.16 30-Aug-2004  drochner branches: 1.16.12;
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.15 06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.14 15-Jul-2003  lukem __KERNEL_RCSID()
 1.13 15-Jun-2003  fvdl branches: 1.13.2;
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.12 06-Feb-2003  briggs Define the iopmu (even though it's not being used yet).
Export i80321_local_dma_init().
Make !sc->sc_is_host configuration a little more friendly.
Go back to using IABAR2 instead of IABAR3 for inbound SDRAM access.
 1.11 23-Jan-2003  briggs Use iwin[3] instead of iwin[2] for RAM access and leave iwin[2] unused.
 1.10 23-Jan-2003  briggs Program the BARs after the limit regs. When the BARs are written, the
value actually stored in the BAR is masked by the limit register.
 1.9 01-Jan-2003  thorpej * Use a device node for each DMA channel.
* Use aprint_normal() for cfprint routines.
 1.8 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.7 17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.6 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80321.c.
 1.5 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.4 29-Jul-2002  thorpej Add support for attaching IOP built-in sub-devices (aau, dma, ssp,
watchdog, etc.)
 1.3 25-Jul-2002  thorpej Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
 1.2 16-May-2002  thorpej branches: 1.2.2; 1.2.4;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.4;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 30-May-2002  gehenna Catch up with -current.
 1.1.2.8 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.6 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.5 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.2.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1 16-May-2002  jdolecek file i80321.c was added on branch kqueue on 2002-06-23 17:34:57 +0000
 1.2.2.2 07-Dec-2002  he Pull up revision 1.3 (requested by thorpej in ticket #568):
Add support for DMA to/from the on-chip devices of the
i80321.
 1.2.2.1 11-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #571):
Add support for attaching IOP built-in sub-devices (aau,
dma, ssp, watchdog, etc.)
 1.13.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.2 03-Sep-2004  skrll Sync with HEAD
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.12.2 03-Sep-2007  yamt sync with head.
 1.16.12.1 21-Jun-2006  yamt sync with head.
 1.17.6.1 22-Apr-2006  simonb Sync with head.
 1.17.4.1 09-Sep-2006  rpaulo sync with head
 1.17.2.1 01-Mar-2006  yamt sync with head.
 1.18.32.1 22-May-2007  matt Update to HEAD.
 1.18.26.1 11-Jul-2007  mjf Sync with head.
 1.18.24.1 27-May-2007  ad Sync with head.
 1.18.20.1 17-May-2007  yamt sync with head.
 1.19.12.1 06-Nov-2007  matt sync with HEAD
 1.19.10.1 01-Jan-2008  chris Sync with HEAD.
 1.20.48.1 06-Jun-2011  jruoho Sync with HEAD.
 1.20.42.1 31-May-2011  rmind sync with head
 1.22.6.1 18-Feb-2012  mrg merge to -current.
 1.22.2.2 30-Oct-2012  yamt sync with head
 1.22.2.1 17-Apr-2012  yamt sync with head
 1.23.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.52.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.25.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.15 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.14 05-Jan-2009  briggs branches: 1.14.14; 1.14.18;
Don't try to use iopaau_desc_4/8_cache before they're initialized.
 1.13 27-Apr-2008  matt branches: 1.13.8; 1.13.10;
Merge kernel changes in matt-armv6 to HEAD.
 1.12 05-Jan-2008  ad branches: 1.12.6; 1.12.8; 1.12.10;
Fix includes.
 1.11 20-Nov-2007  ad branches: 1.11.6;
For the last time, compile!
 1.10 17-Nov-2007  ad Make it compile.
 1.9 29-Apr-2003  thorpej branches: 1.9.18; 1.9.60; 1.9.76; 1.9.78; 1.9.80; 1.9.82; 1.9.86; 1.9.88;
Use aprint*().
 1.8 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.5 04-Aug-2002  thorpej branches: 1.5.2; 1.5.4; 1.5.6;
Add support for "xor5", "xor6", "xor7", and "xor8".
 1.4 03-Aug-2002  thorpej Restructure the iopaau_function slightly to provide greater
flexibility when using different descriptor formats.
 1.3 02-Aug-2002  thorpej Add support for xor2, xor3, and xor4. Fix inverted direction
indications in some bus_dma operations.
 1.2 02-Aug-2002  thorpej Grr, RCS ID tag typo.
 1.1 02-Aug-2002  thorpej Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit. The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations. We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
 1.5.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.6.1 04-Aug-2002  jdolecek file i80321_aau.c was added on branch kqueue on 2002-09-06 08:33:08 +0000
 1.5.4.2 30-Aug-2002  gehenna catch up with -current.
 1.5.4.1 04-Aug-2002  gehenna file i80321_aau.c was added on branch gehenna-devsw on 2002-08-30 00:19:18 +0000
 1.5.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.5.2.1 04-Aug-2002  nathanw file i80321_aau.c was added on branch nathanw_sa on 2002-08-13 02:17:58 +0000
 1.9.88.3 18-Feb-2008  mjf Sync with HEAD.
 1.9.88.2 08-Dec-2007  mjf Sync with HEAD.
 1.9.88.1 19-Nov-2007  mjf Sync with HEAD.
 1.9.86.2 21-Nov-2007  bouyer Sync with HEAD
 1.9.86.1 18-Nov-2007  bouyer Sync with HEAD
 1.9.82.2 09-Jan-2008  matt sync with HEAD
 1.9.82.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.9.80.2 20-Jan-2008  chris Sync to HEAD.
 1.9.80.1 01-Jan-2008  chris Sync with HEAD.
 1.9.78.1 21-Nov-2007  joerg Sync with HEAD.
 1.9.76.2 28-Feb-2008  rjs Sync with HEAD.
 1.9.76.1 26-Dec-2007  rjs Sync with HEAD.
 1.9.60.1 03-Dec-2007  ad Sync with HEAD.
 1.9.18.2 21-Jan-2008  yamt sync with head
 1.9.18.1 07-Dec-2007  yamt sync with head
 1.11.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.10.2 04-May-2009  yamt 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.2 17-Jan-2009  mjf Sync with HEAD.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.10.1 09-Jan-2009  snj Pull up following revision(s) (requested by briggs in ticket #237):
sys/arch/arm/xscale/i80321_aau.c: revision 1.14
Don't try to use iopaau_desc_4/8_cache before they're initialized.
 1.13.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.14.18.1 18-Feb-2012  mrg merge to -current.
 1.14.14.1 17-Apr-2012  yamt sync with head
 1.3 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4;
Add support for the i80312 and i80321 I2C controllers.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file i80321_gpio.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.6 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.5 10-Jan-2012  jakllsch branches: 1.5.48;
split iopi2c(4) device/softc
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 06-Dec-2007  ad lockmgr -> mutex
 1.2 11-Dec-2005  christos branches: 1.2.34; 1.2.46; 1.2.48; 1.2.50; 1.2.52; 1.2.58; 1.2.62;
merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4; 1.1.18;
Add support for the i80312 and i80321 I2C controllers.
 1.1.18.1 07-Dec-2007  yamt sync with head
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file i80321_i2c.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.2.62.1 08-Dec-2007  ad Sync with head.
 1.2.58.1 08-Dec-2007  mjf Sync with HEAD.
 1.2.52.1 09-Jan-2008  matt sync with HEAD
 1.2.50.1 01-Jan-2008  chris Sync with HEAD.
 1.2.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.2.46.1 26-Dec-2007  rjs Sync with HEAD.
 1.2.34.1 09-Dec-2007  reinoud Pullup to HEAD
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.5.48.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.27 06-Aug-2021  rin Simplify i80321_intr_calculate_masks().

G/C unused members of struct intrq.

No functional changes intended.
 1.26 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.25 10-Nov-2019  chs branches: 1.25.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.24 02-Aug-2012  skrll branches: 1.24.40;
Remove irqframe and replace with identical trapframe.
 1.23 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.22 01-Jul-2011  dyoung branches: 1.22.2; 1.22.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21 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.20 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.19 05-Jan-2009  briggs branches: 1.19.4; 1.19.6;
Ifdef out and comment a KASSERT() that's a bit too aggressive. There
are never any interrupts masked at IPL_VM before any interrupts have
been registered.
 1.18 27-Apr-2008  matt branches: 1.18.8; 1.18.10;
Merge kernel changes in matt-armv6 to HEAD.
 1.17 06-Jan-2008  matt branches: 1.17.6; 1.17.8; 1.17.10;
Cleanup softint lossage.
 1.16 11-Dec-2007  ad And you, be ye fruitful, and multiply; bring forth abundantly in the earth,
and multiply therein. (Genesis 9:6-8)
 1.15 03-Dec-2007  ad branches: 1.15.2; 1.15.4; 1.15.6;
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.14 24-Nov-2006  wiz branches: 1.14.8; 1.14.24; 1.14.26; 1.14.28; 1.14.30; 1.14.36;
s/heirarchy/hierarchy/, from Zafer.
 1.13 08-Nov-2006  scw If I80321_HPI_ENABLED is defined, add support for handling interrupts from
devices hooked up to the HPI pin.

HPIs cannot be masked at the interrupt controller; they can only be masked
by disabling IRQs in the XScale core. To deal with this, we tweak the
interrupt frame so that IRQs are disabled when the interrupt dispatcher
returns due to a masked HPI interrupt. IRQs will be re-enabled by a
subsequent splx(9).

Fortunately the only instance where HPI is used is for the console UART
on a couple of boards, so this hack does not adversely affect performance.

Contributed by Wasabi Systems.
 1.12 17-May-2006  mrg branches: 1.12.8; 1.12.10;
remove 'inline' from the xxx_do_pending() function that is called from
external sources, and conflicts with it's prototype.
 1.11 24-Dec-2005  perry branches: 1.11.4; 1.11.6; 1.11.8; 1.11.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 03-Dec-2003  scw branches: 1.9.16;
As per the recent ixp425 fix (which is based on this code):

In the interrupt dispatch loop, make sure to handle any pending interrupts
which came in while we were dealing with the first interrupt(s), and which
are enabled at the current spl.

This fixes a problem where the intr_enabled/hw mask is not updated to
allow pending interrupts through until the next splx(). In some case,
interrupts could be delayed until the next clock tick.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 16-Jun-2003  thorpej branches: 1.7.2;
Rename IPL_IMP -> IPL_VM.
 1.6 09-Oct-2002  thorpej Clean up some bad interaction between the spl inlining stuff and
strict-prototypes.
 1.5 17-Aug-2002  briggs Add a new option EVBARM_BOARDTYPE to differentiate between different
evbarm ports. Inline _splraise/_spllower/splx for i80321 and iq80310
for more performance.
 1.4 14-Aug-2002  thorpej Don't need to frob CPSR in _splraise().
 1.3 30-Jul-2002  thorpej Use more descriptive interrupt names.
 1.2 28-Mar-2002  thorpej branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Fix soft interrupts.
 1.1 27-Mar-2002  thorpej Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.2.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.8.1 28-Mar-2002  jdolecek file i80321_icu.c was added on branch kqueue on 2002-06-23 17:34:57 +0000
 1.2.6.2 18-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #679):
Don't need to frob CPSR in _splraise().
 1.2.6.1 11-Nov-2002  he Pull up revision 1.3 (requested by thorpej in ticket #583):
Use more descriptive interrupt names.
 1.2.4.1 30-Aug-2002  gehenna catch up with -current.
 1.2.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.2.2.3 01-Aug-2002  nathanw Catch up to -current.
 1.2.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.1 28-Mar-2002  nathanw file i80321_icu.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.4 21-Jan-2008  yamt sync with head
 1.9.16.3 07-Dec-2007  yamt sync with head
 1.9.16.2 30-Dec-2006  yamt sync with head.
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.8.1 24-May-2006  yamt sync with head.
 1.11.6.1 01-Jun-2006  kardel Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.10.1 10-Dec-2006  yamt sync with head.
 1.12.8.2 12-Jan-2007  ad Sync with head.
 1.12.8.1 18-Nov-2006  ad Sync with head.
 1.14.36.3 18-Feb-2008  mjf Sync with HEAD.
 1.14.36.2 27-Dec-2007  mjf Sync with HEAD.
 1.14.36.1 08-Dec-2007  mjf Sync with HEAD.
 1.14.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.14.30.2 09-Jan-2008  matt sync with HEAD
 1.14.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.14.28.2 20-Jan-2008  chris Sync to HEAD.
 1.14.28.1 01-Jan-2008  chris Sync with HEAD.
 1.14.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.14.24.2 28-Feb-2008  rjs Sync with HEAD.
 1.14.24.1 26-Dec-2007  rjs Sync with HEAD.
 1.14.8.2 03-Dec-2007  ad Sync with HEAD.
 1.14.8.1 03-Dec-2007  ad Sync with HEAD.
 1.15.6.2 08-Jan-2008  bouyer Sync with HEAD
 1.15.6.1 13-Dec-2007  bouyer Sync with HEAD
 1.15.4.1 13-Dec-2007  yamt sync with head.
 1.15.2.1 26-Dec-2007  ad Sync with head.
 1.17.10.3 11-Aug-2010  yamt sync with head.
 1.17.10.2 04-May-2009  yamt sync with head.
 1.17.10.1 16-May-2008  yamt sync with head.
 1.17.8.1 18-May-2008  yamt sync with head.
 1.17.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.10.1 09-Jan-2009  snj Pull up following revision(s) (requested by briggs in ticket #237):
sys/arch/arm/xscale/i80321_icu.c: revision 1.19
Ifdef out and comment a KASSERT() that's a bit too aggressive. There
are never any interrupts masked at IPL_VM before any interrupts have
been registered.
 1.18.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.19.6.2 05-Mar-2011  rmind sync with head
 1.19.6.1 03-Jul-2010  rmind sync with head
 1.19.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.6.1 18-Feb-2012  mrg merge to -current.
 1.22.2.2 30-Oct-2012  yamt sync with head
 1.22.2.1 17-Apr-2012  yamt sync with head
 1.24.40.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.13 06-Aug-2021  rin Do *NOT* lower IPL in i80321_splraise().

Fix various strange crashes for DIAGNOSTIC kernel on evbarm/HDL_G,
including one worked around by if_wm.c rev 1.706:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/if_wm.c#rev1.706
 1.12 24-Jan-2018  skrll Remove port-acorn26

OK core@
 1.11 04-Feb-2014  matt _setsoftintr is long dead. reap any leftovers from arm.
 1.10 27-Apr-2008  matt branches: 1.10.34; 1.10.44; 1.10.50;
Merge kernel changes in matt-armv6 to HEAD.
 1.9 08-Nov-2006  scw branches: 1.9.30; 1.9.54; 1.9.56; 1.9.58;
If I80321_HPI_ENABLED is defined, add support for handling interrupts from
devices hooked up to the HPI pin.

HPIs cannot be masked at the interrupt controller; they can only be masked
by disabling IRQs in the XScale core. To deal with this, we tweak the
interrupt frame so that IRQs are disabled when the interrupt dispatcher
returns due to a masked HPI interrupt. IRQs will be re-enabled by a
subsequent splx(9).

Fortunately the only instance where HPI is used is for the console UART
on a couple of boards, so this hack does not adversely affect performance.

Contributed by Wasabi Systems.
 1.8 10-Apr-2006  simonb branches: 1.8.8; 1.8.10;
Tab Police.
 1.7 24-Dec-2005  perry branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 12-Jan-2004  scw branches: 1.5.16;
Use __insn_barrier() to prevent the compiler reordering splx/splraise
relative to the code they're supposed to protect.
 1.4 21-Sep-2003  matt Fix GCC 3.3.1 nits.
 1.3 03-Jan-2003  thorpej branches: 1.3.2;
Use the generic irq_dispatch.S
 1.2 09-Oct-2002  thorpej Clean up some bad interaction between the spl inlining stuff and
strict-prototypes.
 1.1 17-Aug-2002  briggs branches: 1.1.2; 1.1.4; 1.1.6;
Add a new option EVBARM_BOARDTYPE to differentiate between different
evbarm ports. Inline _splraise/_spllower/splx for i80321 and iq80310
for more performance.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 17-Aug-2002  jdolecek file i80321_intr.h was added on branch kqueue on 2002-09-06 08:33:09 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 17-Aug-2002  gehenna file i80321_intr.h was added on branch gehenna-devsw on 2002-08-30 00:19:18 +0000
 1.1.2.4 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.1 17-Aug-2002  thorpej file i80321_intr.h was added on branch nathanw_sa on 2002-08-19 21:39:22 +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.2 30-Dec-2006  yamt sync with head.
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.7.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.1 11-Apr-2006  yamt sync with head
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.10.1 10-Dec-2006  yamt sync with head.
 1.8.8.1 18-Nov-2006  ad Sync with head.
 1.9.58.1 16-May-2008  yamt sync with head.
 1.9.56.1 18-May-2008  yamt sync with head.
 1.9.54.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.30.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.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.10.50.1 18-May-2014  rmind sync with head
 1.10.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.34.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 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.6 02-Jan-2003  thorpej Garbage-collect prev_intr_depth; nothing uses it.
 1.5 14-Oct-2002  bjh21 Continue the " - . - 8" purge. Specifically:

add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
 1.4 17-Aug-2002  thorpej Use correct-for-ELF local labels.
 1.3 14-Aug-2002  thorpej Use cpsr_c rather then cpsr_all where appropriate.
 1.2 29-Jul-2002  thorpej Clean up some comments.
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 27-Mar-2002  jdolecek file i80321_irq.S was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.1.6.1 11-Nov-2002  he Pull up revision 1.2 (requested by thorpej in ticket #579):
Clean up some comments.
 1.1.4.1 30-Aug-2002  gehenna catch up with -current.
 1.1.2.6 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.4 19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_irq.S was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.4 01-Aug-2002  thorpej branches: 1.4.4;
Move the DMA tag initialization functions into i80321.c.
 1.3 31-Jul-2002  thorpej branches: 1.3.2;
Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.2 28-Jul-2002  thorpej Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that. This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
 1.1 25-Jul-2002  thorpej Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
 1.3.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.3.2.2 01-Aug-2002  nathanw Catch up to -current.
 1.3.2.1 31-Jul-2002  nathanw file i80321_local_dma.c was added on branch nathanw_sa on 2002-08-01 02:41:21 +0000
 1.4.4.2 07-Dec-2002  he Pull up revision 1.2 (requested by thorpej in ticket #568):
Change the way DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a
pointer to the original buffer/buftype used to load the
DMA map, and use that. Shrinks bus_dma_segment_t from 12
to 8 bytes, and the cache flushing is also more efficient.
 1.4.4.1 07-Dec-2002  he Pull up revision 1.1 (new, requested by thorpej in ticket #568):
Add support for DMA to/from the on-chip devices of the
i80321.
 1.4 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.8; 1.1.16;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.16.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 27-Mar-2002  jdolecek file i80321_mcu.c was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_mcu.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.19 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.18 07-Jul-2020  thorpej 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.17 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.16 02-Oct-2015  msaitoh 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.15 18-Aug-2013  matt branches: 1.15.6;
<arm/locore.h> fallout (fixes some include ordering errors)
 1.14 14-Oct-2012  msaitoh branches: 1.14.2;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.13 07-Sep-2012  matt branches: 1.13.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.12 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.11 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 17-Oct-2007  garbled 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.8 12-May-2007  gavan branches: 1.8.10; 1.8.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.7 15-Dec-2005  briggs branches: 1.7.26; 1.7.30; 1.7.32; 1.7.38;
Add an offset to the I/O port translations. This allows IQ80321
and others to avoid providing PCI I/O space at address 0.
Iyonix, however, needs to provide PCI I/O space at 0.
The others require I/O space to be offset in part due to a bug
work-around in wm(4) which requires that I/O space access be used
to reset the controllers. If I/O space is mapped at zero, the card
claims, but ignores, the transactions, and the controller doesn't
get reset properly and can't then be used.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 09-Dec-2004  briggs branches: 1.5.10;
Start I/O range at base+0x1000 to avoid 0.
 1.4 15-Jul-2003  lukem branches: 1.4.6;
__KERNEL_RCSID()
 1.3 30-Jun-2003  thorpej branches: 1.3.2;
PCI-X requires that that devices updated their PCIXSR on every
config write with the device number specified in AD[15:11]. If
we don't set this field when issuing a Type 0 cycle, each device
could end of thinking it is at device 0, which can cause a number
of problems. Doing this unconditionally should be OK when only
PCI devices are present.
 1.2 29-Apr-2003  thorpej Use aprint*().
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.8;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 27-Mar-2002  jdolecek file i80321_pci.c was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_pci.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.3.2.4 18-Dec-2004  skrll Sync with HEAD.
 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.4.6.1 16-Apr-2005  tron Pull up revision 1.5 (requested by briggs in ticket #1092):
Start I/O range at base+0x1000 to avoid 0.
 1.5.10.2 03-Sep-2007  yamt sync with head.
 1.5.10.1 21-Jun-2006  yamt sync with head.
 1.7.38.1 22-May-2007  matt Update to HEAD.
 1.7.32.1 11-Jul-2007  mjf Sync with head.
 1.7.30.1 27-May-2007  ad Sync with head.
 1.7.26.1 17-May-2007  yamt sync with head.
 1.8.12.1 06-Nov-2007  matt sync with HEAD
 1.8.10.1 01-Jan-2008  chris Sync with HEAD.
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.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.10.2.2 30-Oct-2012  yamt sync with head
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.13.2.3 03-Dec-2017  jdolecek update from HEAD
 1.13.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.2.1 28-Aug-2013  rmind sync with head
 1.15.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.6 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80321.c.
 1.5 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.4 28-Jul-2002  thorpej Change the way that DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a pointer to the
original buffer/buftype used to load the DMA map, and use that. This
lets us shrink the bus_dma_segment_t down from 12 bytes to 8, and the
cache flushing is also more efficient.

Tested on an i80321 -- changes to others are mechanical.
 1.3 02-May-2002  thorpej branches: 1.3.2; 1.3.4; 1.3.6;
Fix error reporting in the bus_dmamap_load_mbuf() routines.
 1.2 27-Mar-2002  thorpej branches: 1.2.2;
iwin_base_lo is a BAR value; make sure to mask off the non-address
bits when using it.
 1.1 27-Mar-2002  thorpej Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.2.2.5 13-Aug-2002  nathanw Catch up to -current.
 1.2.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.2.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.2.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.1 27-Mar-2002  nathanw file i80321_pci_dma.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.3.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.6.1 02-May-2002  jdolecek file i80321_pci_dma.c was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.3.4.1 07-Dec-2002  he Pull up revision 1.4 (requested by thorpej in ticket #568):
Change the way DMA map syncs are done. Instead of remembering
the virtual address for each DMA segment, just cache a
pointer to the original buffer/buftype used to load the
DMA map, and use that. Shrinks bus_dma_segment_t from 12
to 8 bytes, and the cache flushing is also more efficient.
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.18 21-Nov-2018  macallan further de-cargocult the new mmap() methods
 1.17 21-Nov-2018  thorpej EINVAL (22) is a valid return value for ARM mmap routines; we need to
return -1 for invalid mmap attempts.
 1.16 18-Nov-2018  macallan - support *_mmap()
- support BUS_SPACE_MAP_PREFETCHABLE for memory spaces
- fill in *_stream methods if needed
With this Xorg with wsfb works on iyonix. The nv driver still crashes ( and
needs options INSECURE ), something seems to be wrong with accessing IO space.
But, progress.
 1.15 16-Mar-2018  ryo branches: 1.15.2;
use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.14 02-Mar-2014  joerg branches: 1.14.28;
Skip a tautologic check if we know it is one.
 1.13 01-Jul-2011  dyoung branches: 1.13.2; 1.13.12; 1.13.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 24-Feb-2010  skrll Typo in comment.
 1.11 17-Oct-2007  garbled branches: 1.11.20; 1.11.40;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.10 12-May-2007  gavan branches: 1.10.10; 1.10.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.9 24-Nov-2005  yamt branches: 1.9.26; 1.9.30; 1.9.32; 1.9.38;
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.8 01-Apr-2005  yamt branches: 1.8.2; 1.8.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.7 17-May-2004  thorpej branches: 1.7.4; 1.7.6;
Supply rr_1 and wr_1.
 1.6 06-Oct-2003  thorpej Make sure to pass mod/ref seeds with PMAP_WIRED.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 27-Sep-2002  provos branches: 1.4.8;
remove trailing \n in panic(). approved perry.
 1.3 29-Aug-2002  briggs Use generic_bs_sr_4 for bus_space_set_region_4.
 1.2 12-Apr-2002  thorpej branches: 1.2.2; 1.2.4; 1.2.6;
Use the bus_space_generic bus space ops.
 1.1 27-Mar-2002  thorpej branches: 1.1.2;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.4 29-Aug-2002  briggs Sync with head.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_space.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.2.6.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 12-Apr-2002  jdolecek file i80321_space.c was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.2.4.1 07-Dec-2002  he Pull up revision 1.3 (requested by briggs in ticket #749):
Use generic_bs_sr_4 for bus_space_set_region_4.
 1.2.2.1 31-Aug-2002  gehenna catch up with -current.
 1.4.8.5 11-Dec-2005  christos Sync with head.
 1.4.8.4 01-Apr-2005  skrll Sync with HEAD.
 1.4.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.8.1 03-Aug-2004  skrll Sync with HEAD
 1.7.6.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.7.4.1 29-Apr-2005  kent sync with -current
 1.8.8.1 29-Nov-2005  yamt sync with head.
 1.8.2.2 03-Sep-2007  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.9.38.1 22-May-2007  matt Update to HEAD.
 1.9.32.1 11-Jul-2007  mjf Sync with head.
 1.9.30.1 27-May-2007  ad Sync with head.
 1.9.26.1 17-May-2007  yamt sync with head.
 1.10.12.1 06-Nov-2007  matt sync with HEAD
 1.10.10.1 01-Jan-2008  chris Sync with HEAD.
 1.11.40.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11.20.1 11-Mar-2010  yamt sync with head
 1.13.16.1 18-May-2014  rmind sync with head
 1.13.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.28.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.14.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.15.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 12-Apr-2002  thorpej Use the bus_space_generic bus space ops.
 1.1 27-Mar-2002  thorpej branches: 1.1.2;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_space_asm.S was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.22 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.21 17-Dec-2013  joerg branches: 1.21.28; 1.21.30;
Mark tmr0_read and tmr1_read as unused.
 1.20 01-Jul-2011  dyoung branches: 1.20.2; 1.20.12; 1.20.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.18 20-Jan-2008  joerg branches: 1.18.6; 1.18.8; 1.18.10;
Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 1.17 03-Dec-2007  ad branches: 1.17.6;
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.16 06-Jan-2007  christos branches: 1.16.6; 1.16.20; 1.16.22; 1.16.24; 1.16.26; 1.16.32;
Add generic TOD support. From Bucky Katz.
 1.15 10-Sep-2006  gavan branches: 1.15.4;
i80321 timecounter support.

Patch from Garrett D'Amore, tested by me.
 1.14 10-Sep-2006  gdamore Do not supply our own versions of inittodr, etc. if a port declares
__HAVE_GENERIC_TODR.
 1.13 24-Dec-2005  perry branches: 1.13.8; 1.13.20;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 04-Jun-2005  he branches: 1.11.2;
Rename an (unused) argument to avoid shadowing.
 1.10 04-Jun-2005  he Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.9 26-Feb-2005  simonb Watch out for those unexpected tains.
 1.8 12-Feb-2005  rearnsha Permit the counter frequency to be overridden by a board configuration
 1.7 27-Jul-2003  thorpej branches: 1.7.8; 1.7.10;
Fix think'o in last. Pointed out by Izumi Tsutsui.
 1.6 26-Jul-2003  thorpej Flesh out inittodr() and resettodr().
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 29-Apr-2003  thorpej branches: 1.4.2;
Use aprint*().
 1.3 08-Oct-2002  thorpej Move XScale common prototypes to xscalevar.h. Add xscale_pmc_dispatch()
prototype. Include xscalevar.h has necessary to being prototypes into
scope.
 1.2 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.8;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 27-Mar-2002  jdolecek file i80321_timer.c was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.1.4.1 30-Aug-2002  gehenna catch up with -current.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321_timer.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.4.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.2.4 15-Feb-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.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.10.1 12-Feb-2005  yamt sync with head.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.11.2.5 21-Jan-2008  yamt sync with head
 1.11.2.4 07-Dec-2007  yamt sync with head
 1.11.2.3 26-Feb-2007  yamt sync with head.
 1.11.2.2 30-Dec-2006  yamt sync with head.
 1.11.2.1 21-Jun-2006  yamt sync with head.
 1.13.20.2 12-Jan-2007  ad Sync with head.
 1.13.20.1 18-Nov-2006  ad Sync with head.
 1.13.8.1 14-Sep-2006  yamt sync with head.
 1.15.4.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.16.32.2 18-Feb-2008  mjf Sync with HEAD.
 1.16.32.1 08-Dec-2007  mjf Sync with HEAD.
 1.16.26.2 23-Mar-2008  matt sync with HEAD
 1.16.26.1 09-Jan-2008  matt sync with HEAD
 1.16.24.2 27-Jan-2008  chris Sync to HEAD.
 1.16.24.1 01-Jan-2008  chris Sync with HEAD.
 1.16.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.16.20.2 28-Feb-2008  rjs Sync with HEAD.
 1.16.20.1 26-Dec-2007  rjs Sync with HEAD.
 1.16.6.1 03-Dec-2007  ad Sync with HEAD.
 1.17.6.1 20-Jan-2008  bouyer Sync with HEAD
 1.18.10.1 16-May-2008  yamt sync with head.
 1.18.8.1 18-May-2008  yamt sync with head.
 1.18.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.16.1 18-May-2014  rmind sync with head
 1.20.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.30.1 10-Jun-2019  christos Sync with HEAD
 1.21.28.1 28-Jul-2018  pgoyette Sync with HEAD
 1.10 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.9 01-Jul-2011  dyoung branches: 1.9.2; 1.9.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.8 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 15-Jul-2003  lukem branches: 1.6.16;
__KERNEL_RCSID()
 1.5 29-Apr-2003  thorpej branches: 1.5.2;
Use aprint*().
 1.4 02-Oct-2002  thorpej branches: 1.4.4;
Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.1 29-Jul-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Add support for the i80321 watchdog timer.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 29-Jul-2002  jdolecek file i80321_wdog.c was added on branch kqueue on 2002-09-06 08:33:11 +0000
 1.1.4.2 30-Aug-2002  gehenna catch up with -current.
 1.1.4.1 29-Jul-2002  gehenna file i80321_wdog.c was added on branch gehenna-devsw on 2002-08-30 00:19:19 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 29-Jul-2002  nathanw file i80321_wdog.c was added on branch nathanw_sa on 2002-08-01 02:41:21 +0000
 1.4.4.2 11-Nov-2002  he Pull up revision 1.1 (new, requested by thorpej in ticket #575):
Add support for the i80321 watchdog timer.
 1.4.4.1 02-Oct-2002  he file i80321_wdog.c was added on branch netbsd-1-6 on 2002-11-11 23:03:47 +0000
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 21-Jun-2006  yamt sync with head.
 1.9.6.1 18-Feb-2012  mrg merge to -current.
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.17 17-Oct-2007  garbled 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.16 12-May-2007  gavan branches: 1.16.10; 1.16.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.15 11-Dec-2005  christos branches: 1.15.26; 1.15.30; 1.15.32; 1.15.38;
merge ktrace-lwp.
 1.14 19-Dec-2003  gavan branches: 1.14.16;
Correct masks for PCIXSR decomposition
 1.13 16-Dec-2003  gavan The PIRSR is at location 0xffffe1ec, not 0xffffe2ec.

Source: Intel(R) 80321 I/O Processor Developer's Manual, page 578
 1.12 06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.11 28-Jul-2003  thorpej Add PBIU register bits.
 1.10 06-Feb-2003  briggs branches: 1.10.2;
Add some more register definitions.
 1.9 06-Feb-2003  thorpej Remove the DMA controller register defns from this file (much like
the AAU registers are not in this file) -- iopdma is not specific to
i80321.
 1.8 06-Feb-2003  briggs Actually make a bitmask for ICU_INT_HWMASK.
 1.7 01-Jan-2003  thorpej Define a base for each DMA channel.
 1.6 03-Oct-2002  thorpej Add a symbolic constant for where external interrupts start.
 1.5 02-Aug-2002  thorpej Delete all the AAU register definitions; they are moved to a separate
file in a future commit.
 1.4 29-Jul-2002  thorpej * Remove some AAU definitions -- they will be defined elsewhere in
a future commit.
* Fix a typo in the watchdog enable names.
* Add SSP (synchronous serial port, for SPI, Microwire, etc.) definitions.
 1.3 16-Apr-2002  thorpej branches: 1.3.2; 1.3.4; 1.3.6;
Add Application Accelerator Unit registers.
 1.2 16-Apr-2002  thorpej Add i80321 DMA controller registers.
 1.1 27-Mar-2002  thorpej branches: 1.1.2;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.2.8 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.7 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.6 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.5 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.4 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321reg.h was added on branch nathanw_sa on 2002-04-01 07:39:17 +0000
 1.3.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.6.1 16-Apr-2002  jdolecek file i80321reg.h was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.3.4.1 11-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #570):
Several changes:
o Remove some AAU definitions, will be defined elsewhere
in a future commit.
o Fix a typo in the watchdog enable names.
o Add SSP (synchronous serial port, for SPI, Microwire, etc.)
definitions.
 1.3.2.1 30-Aug-2002  gehenna catch up with -current.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.16.1 03-Sep-2007  yamt sync with head.
 1.15.38.1 22-May-2007  matt Update to HEAD.
 1.15.32.1 11-Jul-2007  mjf Sync with head.
 1.15.30.1 27-May-2007  ad Sync with head.
 1.15.26.1 17-May-2007  yamt sync with head.
 1.16.12.1 06-Nov-2007  matt sync with HEAD
 1.16.10.1 01-Jan-2008  chris Sync with HEAD.
 1.14 06-Aug-2021  rin Simplify i80321_intr_calculate_masks().

G/C unused members of struct intrq.

No functional changes intended.
 1.13 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.12 27-Apr-2008  matt branches: 1.12.34; 1.12.38;
Merge kernel changes in matt-armv6 to HEAD.
 1.11 10-Apr-2006  simonb branches: 1.11.40; 1.11.64; 1.11.66; 1.11.68;
Tab Police.
 1.10 15-Dec-2005  briggs branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
Add an offset to the I/O port translations. This allows IQ80321
and others to avoid providing PCI I/O space at address 0.
Iyonix, however, needs to provide PCI I/O space at 0.
The others require I/O space to be offset in part due to a bug
work-around in wm(4) which requires that I/O space access be used
to reset the controllers. If I/O space is mapped at zero, the card
claims, but ignores, the transactions, and the controller doesn't
get reset properly and can't then be used.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 06-Oct-2003  thorpej branches: 1.8.16;
Add support for the i80312 and i80321 I2C controllers.
 1.7 06-Feb-2003  briggs branches: 1.7.2;
Define the iopmu (even though it's not being used yet).
Export i80321_local_dma_init().
Make !sc->sc_is_host configuration a little more friendly.
Go back to using IABAR2 instead of IABAR3 for inbound SDRAM access.
 1.6 01-Aug-2002  thorpej Move the DMA tag initialization functions into i80321.c.
 1.5 31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.4 30-Jul-2002  thorpej Use more descriptive interrupt names.
 1.3 29-Jul-2002  thorpej Add support for attaching IOP built-in sub-devices (aau, dma, ssp,
watchdog, etc.)
 1.2 25-Jul-2002  thorpej Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
 1.1 27-Mar-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 27-Mar-2002  jdolecek file i80321var.h was added on branch kqueue on 2002-06-23 17:34:58 +0000
 1.1.6.3 07-Dec-2002  he Pull up revision 1.2 (requested by thorpej in ticket #568):
Add support for DMA to/from the on-chip devices of the
i80321.
 1.1.6.2 11-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #583):
Use more descriptive interrupt names.
 1.1.6.1 11-Nov-2002  he Pull up revision 1.3 (requested by thorpej in ticket #571):
Add support for attaching IOP built-in sub-devices (aau,
dma, ssp, watchdog, etc.)
 1.1.4.1 30-Aug-2002  gehenna catch up with -current.
 1.1.2.4 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.3 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 27-Mar-2002  nathanw file i80321var.h was added on branch nathanw_sa on 2002-04-01 07:39:17 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.8.1 11-Apr-2006  yamt sync with head
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.68.1 16-May-2008  yamt sync with head.
 1.11.66.1 18-May-2008  yamt sync with head.
 1.11.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.40.1 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.12.38.1 18-Feb-2012  mrg merge to -current.
 1.12.34.1 17-Apr-2012  yamt sync with head
 1.18 17-Mar-2019  maxv Hard-align the fields of the structures with __aligned(32), and pass ioff=0
in the pool cache.
 1.17 12-Feb-2012  matt branches: 1.17.48;
Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.16 05-Jan-2008  ad branches: 1.16.44; 1.16.48;
Fix includes.
 1.15 13-Nov-2007  ad branches: 1.15.6;
Make it build again.
 1.14 07-Nov-2007  ad Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
 1.13 12-Mar-2007  ad branches: 1.13.14; 1.13.16; 1.13.18; 1.13.20; 1.13.24; 1.13.26;
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
 1.12 11-Dec-2005  christos branches: 1.12.26; 1.12.30;
merge ktrace-lwp.
 1.11 30-Oct-2003  matt branches: 1.11.16;
Stop some (bogus) gcc unitialized variable warning.
 1.10 29-Apr-2003  thorpej branches: 1.10.2;
Use aprint*().
 1.9 04-Mar-2003  thorpej Cast the argument passed to vtophys() to a vaddr_t.
 1.8 10-Dec-2002  thorpej Error out if we get an unexpected buffer type.
 1.7 04-Aug-2002  thorpej branches: 1.7.2; 1.7.4; 1.7.6;
Add support for "xor5", "xor6", "xor7", and "xor8".
 1.6 03-Aug-2002  thorpej * Define the 8-input, 16-input, and 32-input descriptors.
* Adjust descriptor sync'ing to work with the additional descriptor
formats.
 1.5 03-Aug-2002  thorpej Restructure the iopaau_function slightly to provide greater
flexibility when using different descriptor formats.
 1.4 02-Aug-2002  thorpej Add support for xor2, xor3, and xor4. Fix inverted direction
indications in some bus_dma operations.
 1.3 02-Aug-2002  thorpej Let the "zero" and "fill8" functions share a bunch of code.
 1.2 02-Aug-2002  thorpej Grr, RCS ID tag typo.
 1.1 02-Aug-2002  thorpej Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit. The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations. We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
 1.7.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.6.1 04-Aug-2002  jdolecek file iopaau.c was added on branch kqueue on 2002-09-06 08:33:13 +0000
 1.7.4.2 30-Aug-2002  gehenna catch up with -current.
 1.7.4.1 04-Aug-2002  gehenna file iopaau.c was added on branch gehenna-devsw on 2002-08-30 00:19:20 +0000
 1.7.2.3 11-Dec-2002  thorpej Sync with HEAD.
 1.7.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.7.2.1 04-Aug-2002  nathanw file iopaau.c was added on branch nathanw_sa on 2002-08-13 02:17:59 +0000
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.3 21-Jan-2008  yamt sync with head
 1.11.16.2 15-Nov-2007  yamt sync with head.
 1.11.16.1 03-Sep-2007  yamt sync with head.
 1.12.30.2 03-Dec-2007  ad Sync with HEAD.
 1.12.30.1 13-Mar-2007  ad Sync with head.
 1.12.26.1 24-Mar-2007  yamt sync with head.
 1.13.26.2 18-Feb-2008  mjf Sync with HEAD.
 1.13.26.1 19-Nov-2007  mjf Sync with HEAD.
 1.13.24.2 18-Nov-2007  bouyer Sync with HEAD
 1.13.24.1 13-Nov-2007  bouyer Sync with HEAD
 1.13.20.3 09-Jan-2008  matt sync with HEAD
 1.13.20.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.13.20.1 08-Nov-2007  matt sync with -HEAD
 1.13.18.2 20-Jan-2008  chris Sync to HEAD.
 1.13.18.1 01-Jan-2008  chris Sync with HEAD.
 1.13.16.2 14-Nov-2007  joerg Sync with HEAD.
 1.13.16.1 11-Nov-2007  joerg Sync with HEAD.
 1.13.14.2 28-Feb-2008  rjs Sync with HEAD.
 1.13.14.1 26-Dec-2007  rjs Sync with HEAD.
 1.15.6.1 08-Jan-2008  bouyer Sync with HEAD
 1.16.48.1 18-Feb-2012  mrg merge to -current.
 1.16.44.1 17-Apr-2012  yamt sync with head
 1.17.48.1 10-Jun-2019  christos Sync with HEAD
 1.4 17-Mar-2019  maxv Hard-align the fields of the structures with __aligned(32), and pass ioff=0
in the pool cache.
 1.3 03-Aug-2002  thorpej branches: 1.3.2; 1.3.4; 1.3.6; 1.3.208;
* Define the 8-input, 16-input, and 32-input descriptors.
* Adjust descriptor sync'ing to work with the additional descriptor
formats.
 1.2 02-Aug-2002  thorpej Add support for xor2, xor3, and xor4. Fix inverted direction
indications in some bus_dma operations.
 1.1 02-Aug-2002  thorpej Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit. The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations. We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
 1.3.208.1 10-Jun-2019  christos Sync with HEAD
 1.3.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.6.1 03-Aug-2002  jdolecek file iopaaureg.h was added on branch kqueue on 2002-09-06 08:33:13 +0000
 1.3.4.2 30-Aug-2002  gehenna catch up with -current.
 1.3.4.1 03-Aug-2002  gehenna file iopaaureg.h was added on branch gehenna-devsw on 2002-08-30 00:19:21 +0000
 1.3.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.3.2.1 03-Aug-2002  nathanw file iopaaureg.h was added on branch nathanw_sa on 2002-08-13 02:18:00 +0000
 1.8 12-Feb-2012  matt Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.7 27-Apr-2008  matt branches: 1.7.34; 1.7.38;
Merge kernel changes in matt-armv6 to HEAD.
 1.6 17-Nov-2007  ad branches: 1.6.14; 1.6.16; 1.6.18;
Make it compile.
 1.5 13-Nov-2007  ad Make it build again.
 1.4 04-Aug-2002  thorpej branches: 1.4.2; 1.4.4; 1.4.6; 1.4.30; 1.4.72; 1.4.88; 1.4.90; 1.4.92; 1.4.94; 1.4.98; 1.4.100;
Add support for "xor5", "xor6", "xor7", and "xor8".
 1.3 03-Aug-2002  thorpej Restructure the iopaau_function slightly to provide greater
flexibility when using different descriptor formats.
 1.2 02-Aug-2002  thorpej Add support for xor2, xor3, and xor4. Fix inverted direction
indications in some bus_dma operations.
 1.1 02-Aug-2002  thorpej Add support for the Intel i80321 I/O Processor's Application Accelerator
Unit. The AAU provides block fill, block copy, XOR, and XOR-parity-check
operations. We currently provide dmover(9) functions for "zero", "fill8",
and "copy".

Much of this code can be shared with the i80312 Companion I/O AAU, and
will be when support for the older chip is implemented.
 1.4.100.1 19-Nov-2007  mjf Sync with HEAD.
 1.4.98.1 18-Nov-2007  bouyer Sync with HEAD
 1.4.94.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.4.92.1 01-Jan-2008  chris Sync with HEAD.
 1.4.90.2 21-Nov-2007  joerg Sync with HEAD.
 1.4.90.1 14-Nov-2007  joerg Sync with HEAD.
 1.4.88.1 26-Dec-2007  rjs Sync with HEAD.
 1.4.72.1 03-Dec-2007  ad Sync with HEAD.
 1.4.30.2 07-Dec-2007  yamt sync with head
 1.4.30.1 15-Nov-2007  yamt sync with head.
 1.4.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.6.1 04-Aug-2002  jdolecek file iopaauvar.h was added on branch kqueue on 2002-09-06 08:33:14 +0000
 1.4.4.2 30-Aug-2002  gehenna catch up with -current.
 1.4.4.1 04-Aug-2002  gehenna file iopaauvar.h was added on branch gehenna-devsw on 2002-08-30 00:19:21 +0000
 1.4.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.4.2.1 04-Aug-2002  nathanw file iopaauvar.h was added on branch nathanw_sa on 2002-08-13 02:18:00 +0000
 1.6.18.1 16-May-2008  yamt sync with head.
 1.6.16.1 18-May-2008  yamt sync with head.
 1.6.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.38.1 18-Feb-2012  mrg merge to -current.
 1.7.34.1 17-Apr-2012  yamt sync with head
 1.12 15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.11 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10 24-Apr-2021  thorpej branches: 1.10.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.9 22-Dec-2019  thorpej branches: 1.9.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.8 14-Feb-2016  chs branches: 1.8.18;
zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
 1.7 10-Jan-2012  jakllsch branches: 1.7.6; 1.7.24;
split iopi2c(4) device/softc
 1.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 06-Dec-2007  ad lockmgr -> mutex
 1.4 26-Jun-2006  drochner branches: 1.4.18; 1.4.30; 1.4.32; 1.4.34; 1.4.36; 1.4.42; 1.4.46;
use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8; 1.3.16;
merge ktrace-lwp.
 1.2 06-Jan-2005  scw branches: 1.2.10;
In iopiic_wait(), latched status bits in the ISR is cleared by writing
ones to the appropriate bits, not zeroes. In this case, just write the
value from a previous read of the register.
 1.1 06-Oct-2003  thorpej branches: 1.1.4;
Add support for the i80312 and i80321 I2C controllers.
 1.1.4.5 17-Jan-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 06-Oct-2003  skrll file iopi2c.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.2.10.2 07-Dec-2007  yamt sync with head
 1.2.10.1 30-Dec-2006  yamt sync with head.
 1.3.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.46.1 08-Dec-2007  ad Sync with head.
 1.4.42.1 08-Dec-2007  mjf Sync with HEAD.
 1.4.36.1 09-Jan-2008  matt sync with HEAD
 1.4.34.1 01-Jan-2008  chris Sync with HEAD.
 1.4.32.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.4.30.1 26-Dec-2007  rjs Sync with HEAD.
 1.4.18.1 09-Dec-2007  reinoud Pullup to HEAD
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.7.24.1 19-Mar-2016  skrll Sync with HEAD
 1.7.6.1 03-Dec-2017  jdolecek update from HEAD
 1.8.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.10.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.10.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4;
Add support for the i80312 and i80321 I2C controllers.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file iopi2creg.h was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.5 22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.4 10-Jan-2012  jakllsch branches: 1.4.48;
split iopi2c(4) device/softc
 1.3 08-Dec-2007  ad branches: 1.3.50; 1.3.54;
struct lock -> kmutex_t
 1.2 11-Dec-2005  christos branches: 1.2.34; 1.2.46; 1.2.48; 1.2.50; 1.2.52; 1.2.62;
merge ktrace-lwp.
 1.1 06-Oct-2003  thorpej branches: 1.1.4; 1.1.18;
Add support for the i80312 and i80321 I2C controllers.
 1.1.18.1 21-Jan-2008  yamt sync with head
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file iopi2cvar.h was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.2.62.1 08-Dec-2007  ad Sync with head.
 1.2.52.1 09-Jan-2008  matt sync with HEAD
 1.2.50.1 01-Jan-2008  chris Sync with HEAD.
 1.2.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.2.46.1 26-Dec-2007  rjs Sync with HEAD.
 1.2.34.1 09-Dec-2007  reinoud Pullup to HEAD
 1.3.54.1 18-Feb-2012  mrg merge to -current.
 1.3.50.1 17-Apr-2012  yamt sync with head
 1.4.48.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7 18-Jun-2023  gutteridge ixp425-fw.README: fix spelling: s/Cypto/Crypto/
 1.6 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.5 30-Jan-2020  thorpej Update the URL for IPL_ixp400NpeLibrary-2_4.zip. Note the URL For
IPL_ixp400NpeLibraryWithCrypto-2_4.zip for reference purposes.
 1.4 10-Feb-2017  tnn branches: 1.4.14; 1.4.20;
remove misleading comment about version 3.0 microcode

The last known microcode to work is 2.4. Version 3.0 changes
the header signature and fails with "block too big for NPE memory".
Provide a backup download URL since intel removed version < 3.0.
 1.3 10-Feb-2017  tnn update firmware download URL
 1.2 24-Mar-2010  scw branches: 1.2.18; 1.2.36; 1.2.40; 1.2.44;
Update with new download link provided by Marcin M. Jessa in
http://mail-index.netbsd.org/port-arm/2010/03/24/msg000912.html.

Add a note about version 3.0 microcode.
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56; 1.1.76; 1.1.78;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.78.1 30-May-2010  rmind sync with head
 1.1.76.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.56.1 11-Aug-2010  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425-fw.README was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425-fw.README was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425-fw.README was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.44.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.40.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2.36.1 28-Aug-2017  skrll Sync with HEAD
 1.2.18.1 03-Dec-2017  jdolecek update from HEAD
 1.4.20.1 29-Feb-2020  ad Sync with head.
 1.4.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4 17-Jun-2023  rin Fix typo...
 1.3 17-Jun-2023  rin Rework microcode for IXP425 npe(4).

Instead of using objcopy(1), which cannot handle EABI version
embedded in e_flags of ELF header, add a dedicated asm file.

If proprietary microcode binary is present, it is incbin'ed
from that asm file.
 1.2 26-Mar-2010  jakllsch Use objcopy rather than ld to copy Intel NPE firmware blob into ELF.
Avoids internal error in newer binutils ld.
Should fix PR/42864 and PR/43057.
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56; 1.1.76; 1.1.78;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.78.1 30-May-2010  rmind sync with head
 1.1.76.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.56.1 11-Aug-2010  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425-fw.mk was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425-fw.mk was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425-fw.mk was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.18 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.17 24-Apr-2021  thorpej branches: 1.17.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.16 14-Oct-2012  msaitoh branches: 1.16.52;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 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.13 21-Oct-2009  rmind branches: 1.13.4; 1.13.6;
Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.12 17-Mar-2009  msaitoh Make it compile without PCI.
 1.11 10-Dec-2006  scw branches: 1.11.50; 1.11.58; 1.11.64;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.10 11-Dec-2005  christos branches: 1.10.20; 1.10.22;
merge ktrace-lwp.
 1.9 30-Aug-2004  drochner branches: 1.9.12;
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 02-Nov-2003  scw It makes more sense to map the expansion bus registers in ixpsip
instead of the pci bridge driver.
 1.7 23-Oct-2003  scw Map the expansion bus registers.
 1.6 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.5 25-Sep-2003  ichiro pci bus support
 1.4 02-Jul-2003  ichiro use struct pmap_devmap
 1.3 24-May-2003  ichiro branches: 1.3.2;
add IXDP425 PCI interrupt
fix some typo
 1.2 23-May-2003  ichiro hide debug messages(mapping)
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Sep-2004  skrll Sync with HEAD
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.12.1 30-Dec-2006  yamt sync with head.
 1.10.22.1 18-Dec-2006  yamt sync with head.
 1.10.20.1 12-Jan-2007  ad Sync with head.
 1.11.64.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.58.1 28-Apr-2009  skrll Sync with HEAD.
 1.11.50.2 11-Mar-2010  yamt sync with head
 1.11.50.1 04-May-2009  yamt sync with head.
 1.13.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.4.1 31-May-2011  rmind sync with head
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.2.1 30-Oct-2012  yamt sync with head
 1.16.52.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.17.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-Oct-2003  scw branches: 1.1.4;
Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 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 08-Oct-2003  skrll file ixp425_a4x_io.S was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.4 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.3 01-Jul-2011  dyoung branches: 1.3.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-Oct-2003  scw branches: 1.1.4;
Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 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 08-Oct-2003  skrll file ixp425_a4x_space.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.3.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.19 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.18 01-Jul-2011  dyoung branches: 1.18.52; 1.18.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.17 14-Mar-2008  cube Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.16 13-Jul-2006  gdamore branches: 1.16.34; 1.16.36; 1.16.56; 1.16.60;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

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

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

Approved by core@. Fixes PR port-evbmips/32362.
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.8; 1.15.16;
merge ktrace-lwp.
 1.14 08-Oct-2003  scw branches: 1.14.16;
Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.13 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.12 07-Aug-2003  ichiro fix dont reset register when every interrupt.
pointed by Shoichi Miyake port-arm/22392
 1.11 02-Jul-2003  ichiro backout to recent changes w/o lwp changes
 1.10 29-Jun-2003  fvdl branches: 1.10.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.9 29-Jun-2003  ichiro struct proc * -> struct lwp *

ixp425_com:
add some status flags
 1.8 03-Jun-2003  ichiro delete unneed bit for uart initialize.
and bug fix mistaken function
 1.7 01-Jun-2003  ichiro change into the form KNF
 1.6 01-Jun-2003  ichiro add console unit number to configuration parameter.
move structure of uart information
 1.5 31-May-2003  ichiro print description of Console and enable ixpcom0/1 in configuration
 1.4 31-May-2003  ichiro cosmetic change & some bugfix
 1.3 31-May-2003  ichiro some bug fix
 1.2 23-May-2003  ichiro delete definition (DEBUG)
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.16.2 17-Mar-2008  yamt sync with head.
 1.14.16.1 30-Dec-2006  yamt sync with head.
 1.15.16.1 20-Jun-2006  gdamore Add support for pretty much all ARM com(4) variants. There are a few ARM
serial devices that are not com(4)-like enough to be supported under com(4).
 1.15.8.1 11-Aug-2006  yamt sync with head
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.16.60.1 03-Apr-2008  mjf Sync with HEAD.
 1.16.56.1 24-Mar-2008  keiichi sync with head.
 1.16.36.1 23-Mar-2008  matt sync with HEAD
 1.16.34.1 21-Mar-2008  chris Sync with head.
 1.18.54.1 10-Jun-2019  christos Sync with HEAD
 1.18.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.7 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.6 02-Jul-2003  ichiro backout to recent changes w/o lwp changes
 1.5 29-Jun-2003  fvdl branches: 1.5.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.4 29-Jun-2003  ichiro struct proc * -> struct lwp *

ixp425_com:
add some status flags
 1.3 01-Jun-2003  ichiro add console unit number to configuration parameter.
move structure of uart information
 1.2 31-May-2003  ichiro print description of Console and enable ixpcom0/1 in configuration
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.54 29-Jun-2024  riastradh if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377
 1.53 27-Sep-2022  skrll malloc -> kmem
 1.52 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.51 22-May-2022  andvar fix various small typos, mainly in comments.
 1.50 31-Dec-2021  riastradh sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.49 31-Dec-2021  riastradh sys: Use if_stop wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
 1.48 19-Sep-2021  andvar fix various typos in comments, messages and documentation.
 1.47 18-Feb-2020  thorpej Use ether_mediastatus().
 1.46 04-Feb-2020  thorpej Add a comment that ifmedia_fini() should be used here someday.
 1.45 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.44 27-Dec-2019  msaitoh branches: 1.44.2;
s/recive/receive/ in comment.
 1.43 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.42 13-Sep-2019  msaitoh if_flags is neither int nor short. It's unsigned short.
 1.41 28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.40 23-May-2019  msaitoh -No functional change:
- Simplify struct ethercom's pointer near ETHER_FIRST_MULTI().
- Simplify MII structure initialization.
- u_int*_t -> uint*_t.
- KNF
 1.39 26-Apr-2019  msaitoh No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.38 24-Apr-2019  msaitoh This driver uses MII(4) and have hook SIOCGIFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). This driver might require some additional fixes
for SIOCSIFMTU and other ioctl()s.
 1.37 05-Mar-2019  msaitoh Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.
 1.36 22-Jan-2019  msaitoh Change MII PHY read/write API from:

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

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

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

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

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

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


Tested with the following device:

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

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

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.35 22-Dec-2018  maxv Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.
 1.34 26-Jun-2018  msaitoh branches: 1.34.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.33 22-Feb-2017  nonaka branches: 1.33.12;
Apply deferred if_start to more MD drivers.
 1.32 15-Dec-2016  ozaki-r branches: 1.32.2;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

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

Proposed on tech-kern and tech-net
 1.31 10-Jun-2016  ozaki-r branches: 1.31.2;
Introduce m_set_rcvif and m_reset_rcvif

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

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

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

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

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

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

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.29 28-Jun-2015  maxv Initialize 'error'.

Can't test, but obvious enough apparently.

Found by Brainy.
 1.28 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.27 18-Oct-2014  snj branches: 1.27.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.26 10-Aug-2014  tls branches: 1.26.2;
Merge tls-earlyentropy branch into HEAD.
 1.25 20-Mar-2014  skrll branches: 1.25.2;
Mechanically replace simplelock with kmutex_t.
 1.24 24-Feb-2014  martin Explicitly include <sys/simplelock.h> for now (untill Nick kills it
for real), to make it compile.
 1.23 22-Jul-2012  matt branches: 1.23.2;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.22 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.21 19-Nov-2011  tls branches: 1.21.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.20 01-Jul-2011  dyoung branches: 1.20.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.18 19-Jan-2010  pooka branches: 1.18.2; 1.18.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

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

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.17 12-Mar-2009  msaitoh Add rnd stuff.
 1.16 11-Mar-2009  msaitoh Bug fixes phase5.

- Catch NPE_NOTIFYMACRECOVERYDONE from NPE, reset MAC and send
NPE_MACRECOVERYSTART to NPE. This sequence is very important :-|
(It's easy to reproduce)

- Don't call tsleep() in interrupt context.

- Add randomness of the transmit deferwhen a collision occured (like CSR)

- fix DPRINTFn() in npe_cpu_reset()
 1.15 11-Mar-2009  msaitoh Make MII stuff more generic.
Use macro.
 1.14 11-Mar-2009  msaitoh Read MAC address register before reset (to get IPL(e.g. redboot)'s setting).
 1.13 11-Mar-2009  msaitoh Bug fixes phase 3 (and one enhancement).

- fix if_init(), if_stop(), if_start() and ifioctl().
Some of these bugfixes are required to use multicast filter's fix(rev. 1.11)

- Prevent linkdown when only the promisc flag changed.
 1.12 11-Mar-2009  msaitoh Change TX threshold from 0x08 to 0x18. This value is the same as CSR 2.4.
Use macro.
 1.11 10-Mar-2009  msaitoh some bug fixes

- Set the flag to use multicast filter...
Without this flag and with a shared hub, the MAC gets ALL packets and the
packets will be forwarded if the forwarding is enabled. It results in DUP!

- Workaround for "Non-Intel XScale Technology Eratta" No. 29.
AA:BB:CC:DD:EE:xF's packet (the 2nd nibble from LSB is the same as the
MAC's one) had matched the filter (both unicast and multicast).

- Check if too {short,long} frame.

- Add the MD hook to get MAC address
 1.10 10-Mar-2009  msaitoh some bugfixes

- Fix incorrect memset from FreeBSD CVS rev. 1.10 (SVN rev 183886)

- Fix the bus_dmamap_create() call to prevent extra npe_defrag() call.
Fixed by Hikaru Abe.

- Add missing bpf_mtap() call in RX.

- Add ETHERCAP_VLAN_MTU flag
 1.9 27-Apr-2008  matt branches: 1.9.8; 1.9.14;
Merge kernel changes in matt-armv6 to HEAD.
 1.8 26-Jan-2008  scw branches: 1.8.6; 1.8.8; 1.8.10;
g/c an unused variable.

From Donald T Hayford on port-arm@
 1.7 19-Jan-2008  dyoung Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

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

I have made a few miscellaneous changes, too:

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

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

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.6 08-Jan-2008  matt As of this commit, all arm32 kernel now build.
 1.5 17-Oct-2007  garbled branches: 1.5.2; 1.5.8;
Merge the ppcoea-renovation branch to HEAD.

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

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

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

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.3 04-Mar-2007  christos branches: 1.3.2; 1.3.4; 1.3.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.2 10-Dec-2006  scw branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Repeat after me: Compile/Test before commit.
 1.1 10-Dec-2006  scw Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.2.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.2.6.2 12-Jan-2007  ad Sync with head.
 1.2.6.1 10-Dec-2006  ad file ixp425_if_npe.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.2.4.5 04-Feb-2008  yamt sync with head.
 1.2.4.4 21-Jan-2008  yamt sync with head
 1.2.4.3 03-Sep-2007  yamt sync with head.
 1.2.4.2 30-Dec-2006  yamt sync with head.
 1.2.4.1 10-Dec-2006  yamt file ixp425_if_npe.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.2.2.2 18-Dec-2006  yamt sync with head.
 1.2.2.1 10-Dec-2006  yamt file ixp425_if_npe.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.10.1 03-Oct-2007  garbled Sync with HEAD
 1.3.4.1 11-Jul-2007  mjf Sync with head.
 1.3.2.1 15-Jul-2007  ad Sync with head.
 1.4.12.3 23-Mar-2008  matt sync with HEAD
 1.4.12.2 09-Jan-2008  matt sync with HEAD
 1.4.12.1 06-Nov-2007  matt sync with HEAD
 1.4.10.3 27-Jan-2008  chris Sync to HEAD.
 1.4.10.2 20-Jan-2008  chris Sync to HEAD.
 1.4.10.1 01-Jan-2008  chris Sync with HEAD.
 1.4.6.1 28-Feb-2008  rjs Sync with HEAD.
 1.5.8.2 20-Jan-2008  bouyer Sync with HEAD
 1.5.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.5.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.10.4 11-Aug-2010  yamt sync with head.
 1.8.10.3 11-Mar-2010  yamt sync with head
 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.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.4.1 30-May-2010  rmind sync with head
 1.18.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.20.2.2 30-Oct-2012  yamt sync with head
 1.20.2.1 17-Apr-2012  yamt sync with head
 1.21.2.1 18-Feb-2012  mrg merge to -current.
 1.23.2.2 03-Dec-2017  jdolecek update from HEAD
 1.23.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.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.26.2.1 05-Jul-2015  snj Pull up following revision(s) (requested by maxv in ticket #857):
sys/arch/arm/xscale/ixp425_if_npe.c: revision 1.29
Initialize 'error'.
Can't test, but obvious enough apparently.
Found by Brainy.
 1.27.2.6 28-Aug-2017  skrll Sync with HEAD
 1.27.2.5 05-Feb-2017  skrll Sync with HEAD
 1.27.2.4 09-Jul-2016  skrll Sync with HEAD
 1.27.2.3 19-Mar-2016  skrll Sync with HEAD
 1.27.2.2 22-Sep-2015  skrll Sync with HEAD
 1.27.2.1 06-Jun-2015  skrll Sync with HEAD
 1.31.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.31.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.33.12.3 26-Jan-2019  pgoyette Sync with HEAD
 1.33.12.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.33.12.1 28-Jul-2018  pgoyette Sync with HEAD
 1.34.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.34.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.34.2.1 10-Jun-2019  christos Sync with HEAD
 1.44.2.1 29-Feb-2020  ad Sync with head.
 1.3 11-Mar-2009  msaitoh Bug fixes phase5.

- Catch NPE_NOTIFYMACRECOVERYDONE from NPE, reset MAC and send
NPE_MACRECOVERYSTART to NPE. This sequence is very important :-|
(It's easy to reproduce)

- Don't call tsleep() in interrupt context.

- Add randomness of the transmit deferwhen a collision occured (like CSR)

- fix DPRINTFn() in npe_cpu_reset()
 1.2 11-Mar-2009  msaitoh Change TX threshold from 0x08 to 0x18. This value is the same as CSR 2.4.
Use macro.
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56; 1.1.64; 1.1.70;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.70.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.64.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.56.1 04-May-2009  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_if_npereg.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_if_npereg.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_if_npereg.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.28 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.27 10-Nov-2019  chs branches: 1.27.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.26 26-Mar-2014  christos branches: 1.26.30;
kill sprintf
 1.25 12-Nov-2012  skrll branches: 1.25.2;
C99 types
 1.24 28-Sep-2012  ryo Defer attaching interrupt evcnts in the same way as i80321.c by matt@
 1.23 01-Jul-2011  dyoung branches: 1.23.2; 1.23.8; 1.23.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.22 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.21 13-Jun-2010  tsutsui Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.20 21-Oct-2009  rmind branches: 1.20.2; 1.20.4;
Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.19 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.18 08-Jan-2008  matt branches: 1.18.6; 1.18.8; 1.18.10;
As of this commit, all arm32 kernel now build.
 1.17 11-Dec-2007  ad And you, be ye fruitful, and multiply; bring forth abundantly in the earth,
and multiply therein. (Genesis 9:6-8)
 1.16 03-Dec-2007  ad branches: 1.16.2; 1.16.4; 1.16.6;
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.15 24-Nov-2006  wiz branches: 1.15.8; 1.15.24; 1.15.26; 1.15.28; 1.15.30; 1.15.36;
s/heirarchy/hierarchy/, from Zafer.
 1.14 17-May-2006  mrg branches: 1.14.8; 1.14.10;
remove 'inline' from the xxx_do_pending() function that is called from
external sources, and conflicts with it's prototype.
 1.13 10-Apr-2006  simonb Tab Police.
 1.12 24-Dec-2005  perry branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 27-Feb-2004  scw branches: 1.10.16;
Must Test Before Committing...
 1.9 13-Feb-2004  scw Avoid using two 'GPIO' bits of the interrupt mask to signify soft
interrupts; some boards actually use those GPIO pins as external
interrupt sources.

Instead, assign soft interrupt bits to on-chip sources which are
not used by the IXP425 port.
 1.8 03-Dec-2003  scw In the interrupt dispatch loop, make sure to handle any pending interrupts
which came in while we were dealing with the first interrupt(s), and which
are enabled at the current spl.

This fixes a problem where the intr_enabled/hw mask is not updated to
allow pending interrupts through until the next splx(). In some case,
interrupts could be delayed until the next clock tick.
 1.7 08-Oct-2003  scw Ok, I give up for now. There's no easy/reliable way to deal with
these spurious interrupts.
 1.6 08-Oct-2003  scw Simplify the last change to just check for spurious GPIO interrupts.
 1.5 08-Oct-2003  scw If no interrupt handler claims to have dealt with a level-triggered
GPIO interrupt, check the GPIO interrupt status register after clearing
it down to see if the interrupt source has disappeared. If it does,
assume it was a spurious event. Otherwise, panic.
 1.4 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.3 25-Sep-2003  ichiro pci bus support
 1.2 16-Jun-2003  thorpej branches: 1.2.2;
Rename IPL_IMP -> IPL_VM.
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 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.10.16.4 21-Jan-2008  yamt sync with head
 1.10.16.3 07-Dec-2007  yamt sync with head
 1.10.16.2 30-Dec-2006  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.12.8.2 24-May-2006  yamt sync with head.
 1.12.8.1 11-Apr-2006  yamt sync with head
 1.12.6.2 01-Jun-2006  kardel Sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.14.10.1 10-Dec-2006  yamt sync with head.
 1.14.8.1 12-Jan-2007  ad Sync with head.
 1.15.36.3 18-Feb-2008  mjf Sync with HEAD.
 1.15.36.2 27-Dec-2007  mjf Sync with HEAD.
 1.15.36.1 08-Dec-2007  mjf Sync with HEAD.
 1.15.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.15.30.2 09-Jan-2008  matt sync with HEAD
 1.15.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.15.28.2 20-Jan-2008  chris Sync to HEAD.
 1.15.28.1 01-Jan-2008  chris Sync with HEAD.
 1.15.26.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.15.24.2 28-Feb-2008  rjs Sync with HEAD.
 1.15.24.1 26-Dec-2007  rjs Sync with HEAD.
 1.15.8.2 03-Dec-2007  ad Sync with HEAD.
 1.15.8.1 03-Dec-2007  ad Sync with HEAD.
 1.16.6.2 08-Jan-2008  bouyer Sync with HEAD
 1.16.6.1 13-Dec-2007  bouyer Sync with HEAD
 1.16.4.1 13-Dec-2007  yamt sync with head.
 1.16.2.1 26-Dec-2007  ad Sync with head.
 1.18.10.3 11-Aug-2010  yamt sync with head.
 1.18.10.2 11-Mar-2010  yamt sync with head
 1.18.10.1 16-May-2008  yamt sync with head.
 1.18.8.1 18-May-2008  yamt sync with head.
 1.18.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.4.2 05-Mar-2011  rmind sync with head
 1.20.4.1 03-Jul-2010  rmind sync with head
 1.20.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.23.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.8.1 17-Oct-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #600):
sys/arch/arm/xscale/ixp425_intr.c: revision 1.24
sys/arch/evbarm/ixdp425/ixdp425_mainbus.c: revision 1.8
sys/arch/evbarm/nslu2/nslu2_mainbus.c: revision 1.3
sys/arch/arm/xscale/ixp425var.h: revision 1.14
Defer attaching interrupt evcnts in the same way as i80321.c by matt@
 1.23.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.23.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.23.2.1 30-Oct-2012  yamt sync with head
 1.25.2.1 18-May-2014  rmind sync with head
 1.26.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.27.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.11 01-Aug-2023  rin arm/xscale: Do not lower IPL by splraise(9)

XXX
I have fixed similar bug for xscale/i80321.
There should be more in codes written at that time...
 1.10 12-Nov-2012  skrll C99 types
 1.9 27-Feb-2009  msaitoh branches: 1.9.12; 1.9.22;
add missing <arm/cpu.h> to compile
 1.8 27-Apr-2008  matt branches: 1.8.8; 1.8.14;
Merge kernel changes in matt-armv6 to HEAD.
 1.7 08-Jan-2008  matt branches: 1.7.6; 1.7.8; 1.7.10;
As of this commit, all arm32 kernel now build.
 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 13-Feb-2004  scw branches: 1.4.16;
Avoid using two 'GPIO' bits of the interrupt mask to signify soft
interrupts; some boards actually use those GPIO pins as external
interrupt sources.

Instead, assign soft interrupt bits to on-chip sources which are
not used by the IXP425 port.
 1.3 12-Jan-2004  scw Use __insn_barrier() to prevent the compiler reordering splx/splraise
relative to the code they're supposed to protect.
 1.2 21-Sep-2003  matt Fix GCC 3.3.1 nits.
 1.1 23-May-2003  ichiro branches: 1.1.2;
support IXP425 Intel Network Processor
running on BigEndian
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 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.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.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.2 04-May-2009  yamt 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.8.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.8.1 03-Mar-2009  skrll Sync with HEAD.
 1.9.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.9.12.1 16-Jan-2013  yamt sync with (a bit old) head
 1.3 25-Sep-2003  ichiro pci bus support
 1.2 01-Jun-2003  ichiro branches: 1.2.2;
change into the form KNF
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 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 14-Oct-2012  msaitoh branches: 1.5.52;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.4 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.52; 1.1.54; 1.1.56;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.56.1 16-May-2008  yamt sync with head.
 1.1.54.1 18-May-2008  yamt sync with head.
 1.1.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_ixme.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_ixme.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_ixme.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.5.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.5.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.5.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.5.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.5.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.5.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.52; 1.1.54; 1.1.56;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.56.1 16-May-2008  yamt sync with head.
 1.1.54.1 18-May-2008  yamt sync with head.
 1.1.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_ixmevar.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_ixmevar.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_ixmevar.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3 24-Jun-2023  msaitoh Fix typo in error message.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-Dec-2003  scw branches: 1.1.4;
Add support for picking up the size of SDRAM by reading the memory
controller's config register.
 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 08-Dec-2003  skrll file ixp425_mem.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.17 17-Jun-2023  rin Rework microcode for IXP425 npe(4).

Instead of using objcopy(1), which cannot handle EABI version
embedded in e_flags of ELF header, add a dedicated asm file.

If proprietary microcode binary is present, it is incbin'ed
from that asm file.
 1.16 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.15 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14 02-Aug-2021  andvar fix various typos in comments and log messages.
 1.13 24-Jul-2021  andvar branches: 1.13.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.12 24-Apr-2021  thorpej branches: 1.12.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11 14-Aug-2014  joerg branches: 1.11.34;
Remove tautologies.
 1.10 20-Mar-2014  skrll Mechanically replace simplelock with kmutex_t.
 1.9 14-Oct-2012  msaitoh branches: 1.9.2;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.8 01-Jul-2011  dyoung branches: 1.8.2; 1.8.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 13-May-2011  rmind Eliminate few references to ltsleep.
 1.6 26-Oct-2009  cegger branches: 1.6.4; 1.6.6;
kill extra whitespaces
reviewed by tsutsui@
 1.5 18-Mar-2009  cegger bcopy -> memcpy
 1.4 11-Mar-2009  msaitoh Bug fixes phase5.

- Catch NPE_NOTIFYMACRECOVERYDONE from NPE, reset MAC and send
NPE_MACRECOVERYSTART to NPE. This sequence is very important :-|
(It's easy to reproduce)

- Don't call tsleep() in interrupt context.

- Add randomness of the transmit deferwhen a collision occured (like CSR)

- fix DPRINTFn() in npe_cpu_reset()
 1.3 08-Jan-2008  matt branches: 1.3.10; 1.3.18; 1.3.24;
As of this commit, all arm32 kernel now build.
 1.2 22-Feb-2007  thorpej branches: 1.2.18; 1.2.22; 1.2.24; 1.2.30; 1.2.36;
TRUE -> true, FALSE -> false
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_npe.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.4 21-Jan-2008  yamt sync with head
 1.1.4.3 26-Feb-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_npe.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_npe.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.36.1 08-Jan-2008  bouyer Sync with HEAD
 1.2.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.24.1 09-Jan-2008  matt sync with HEAD
 1.2.22.1 20-Jan-2008  chris Sync to HEAD.
 1.2.18.1 28-Feb-2008  rjs Sync with HEAD.
 1.3.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.18.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.10.2 11-Mar-2010  yamt sync with head
 1.3.10.1 04-May-2009  yamt sync with head.
 1.6.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.4.1 31-May-2011  rmind sync with head
 1.8.12.3 03-Dec-2017  jdolecek update from 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.11.34.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 1.11.34.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.11.34.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.11.34.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.11.34.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.11.34.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.12.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.13.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 17-Jun-2023  rin Rework microcode for IXP425 npe(4).

Instead of using objcopy(1), which cannot handle EABI version
embedded in e_flags of ELF header, add a dedicated asm file.

If proprietary microcode binary is present, it is incbin'ed
from that asm file.
 1.2 24-Jul-2021  andvar Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.160;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.160.1 01-Aug-2021  thorpej Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_npereg.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_npereg.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_npereg.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.5 20-Mar-2014  skrll Mechanically replace simplelock with kmutex_t.
 1.4 14-Oct-2012  msaitoh branches: 1.4.2;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.3 11-Mar-2009  msaitoh branches: 1.3.12; 1.3.22;
Bug fixes phase5.

- Catch NPE_NOTIFYMACRECOVERYDONE from NPE, reset MAC and send
NPE_MACRECOVERYSTART to NPE. This sequence is very important :-|
(It's easy to reproduce)

- Don't call tsleep() in interrupt context.

- Add randomness of the transmit deferwhen a collision occured (like CSR)

- fix DPRINTFn() in npe_cpu_reset()
 1.2 10-Mar-2009  msaitoh some bug fixes

- Set the flag to use multicast filter...
Without this flag and with a shared hub, the MAC gets ALL packets and the
packets will be forwarded if the forwarding is enabled. It results in DUP!

- Workaround for "Non-Intel XScale Technology Eratta" No. 29.
AA:BB:CC:DD:EE:xF's packet (the 2nd nibble from LSB is the same as the
MAC's one) had matched the filter (both unicast and multicast).

- Check if too {short,long} frame.

- Add the MD hook to get MAC address
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56; 1.1.64; 1.1.70;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.70.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.64.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.56.1 04-May-2009  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_npevar.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_npevar.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:37 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_npevar.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.12.1 30-Oct-2012  yamt sync with head
 1.4.2.1 18-May-2014  rmind sync with head
 1.15 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.14 07-Jul-2020  thorpej 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.13 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.12 02-Oct-2015  msaitoh 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.11 12-Nov-2012  skrll branches: 1.11.14;
C99 types
 1.10 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.9 07-Sep-2012  matt branches: 1.9.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.8 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.7 01-Jul-2011  dyoung branches: 1.7.2; 1.7.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.5 10-Apr-2006  simonb branches: 1.5.68;
Tab Police.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10; 1.4.12;
merge ktrace-lwp.
 1.3 08-Dec-2003  scw branches: 1.3.4; 1.3.18;
Oops, map PCI memory space at VA 0xf8000000 instead of in the middle
of user VM space at 0x48000000.
 1.2 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.1 25-Sep-2003  ichiro pci bus support
 1.3.18.1 21-Jun-2006  yamt sync with head.
 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 08-Dec-2003  skrll file ixp425_pci.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.4.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.1 11-Apr-2006  yamt sync with head
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.68.1 11-Mar-2010  yamt sync with head
 1.7.6.1 18-Feb-2012  mrg merge to -current.
 1.7.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.7.2.2 30-Oct-2012  yamt sync with head
 1.7.2.1 17-Apr-2012  yamt sync with head
 1.9.2.2 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.14.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 25-Sep-2003  ichiro branches: 1.1.4;
pci bus support
 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 25-Sep-2003  skrll file ixp425_pci_asm.S was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.7 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.6 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.3 11-Dec-2005  christos branches: 1.3.80;
merge ktrace-lwp.
 1.2 08-Oct-2003  scw branches: 1.2.4;
Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.1 25-Sep-2003  ichiro pci bus support
 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 08-Oct-2003  skrll file ixp425_pci_dma.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.3.80.1 11-Mar-2010  yamt sync with head
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.15 21-Apr-2023  skrll Trailing whitespace
 1.14 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.13 24-Feb-2014  martin branches: 1.13.28;
Fix compilation
 1.12 22-Feb-2014  matt Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.11 12-Nov-2012  skrll branches: 1.11.2;
C99 types
 1.10 11-Jul-2011  matt branches: 1.10.2; 1.10.12;
Remove inline from global routines
 1.9 01-Jul-2011  dyoung #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 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.6 10-Apr-2006  simonb branches: 1.6.68;
Tab Police.
 1.5 24-Dec-2005  perry branches: 1.5.4; 1.5.6; 1.5.8; 1.5.10; 1.5.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 24-Nov-2005  yamt 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.3 01-Apr-2005  yamt branches: 1.3.2; 1.3.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.2 25-Sep-2003  ichiro branches: 1.2.4; 1.2.10; 1.2.12;
add comment and delete unused definition
 1.1 25-Sep-2003  ichiro pci bus support
 1.2.12.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.2.10.1 29-Apr-2005  kent sync with -current
 1.2.4.6 11-Dec-2005  christos Sync with head.
 1.2.4.5 01-Apr-2005  skrll Sync with HEAD.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 25-Sep-2003  skrll file ixp425_pci_space.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.3.8.1 29-Nov-2005  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.5.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.5.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.8.1 11-Apr-2006  yamt sync with head
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.68.1 11-Mar-2010  yamt sync with head
 1.10.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.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.10.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.11.2.1 18-May-2014  rmind sync with head
 1.13.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.12 27-Sep-2022  skrll malloc -> kmem
 1.11 10-Dec-2021  andvar s/occured/occurred/ in comments, log messages and man pages.
 1.10 27-Dec-2019  msaitoh s/inital/initial/
 1.9 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.8 03-Jun-2019  msaitoh Fix typo in comment (s/seperate/separate/).
 1.7 01-Jul-2011  dyoung branches: 1.7.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 05-Mar-2009  msaitoh Fix typo(s/interupt/interrupt/)
 1.5 05-Mar-2009  msaitoh Fix typo(s/interupt/interrupt/)
 1.4 17-Oct-2007  garbled branches: 1.4.20; 1.4.28; 1.4.34;
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.3 21-Jun-2007  scw branches: 1.3.10; 1.3.12;
Apply the patch, with some minor modifications, provided in:

http://mail-index.netbsd.org/port-arm/2007/06/04/0000.html

Addresses:
- an array index overflow in ixpqmgr_intr().
- ixpqmgr_sc must be initialised before calling ixp425_intr_establish().
 1.2 22-Feb-2007  thorpej branches: 1.2.4; 1.2.6; 1.2.12;
TRUE -> true, FALSE -> false
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_qmgr.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.4 03-Sep-2007  yamt sync with head.
 1.1.4.3 26-Feb-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_qmgr.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_qmgr.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.12.1 26-Jun-2007  garbled Sync with HEAD.
 1.2.6.1 11-Jul-2007  mjf Sync with head.
 1.2.4.1 15-Jul-2007  ad Sync with head.
 1.3.12.1 06-Nov-2007  matt sync with HEAD
 1.3.10.1 01-Jan-2008  chris Sync with HEAD.
 1.4.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.20.1 04-May-2009  yamt sync with head.
 1.7.54.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.54.1 10-Jun-2019  christos Sync with HEAD
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_qmgr.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_qmgr.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_qmgr.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +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 14-Oct-2012  msaitoh branches: 1.13.52;
struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.12 01-Jul-2011  dyoung branches: 1.12.2; 1.12.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.11 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.10 10-Apr-2006  simonb branches: 1.10.68;
Tab Police.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 26-Aug-2005  drochner s/locdesc_t/int/g
 1.7 30-Jun-2005  drochner branches: 1.7.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.6 16-Nov-2003  scw - Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.5 02-Nov-2003  scw It makes more sense to map the expansion bus registers in ixpsip
instead of the pci bridge driver.
 1.4 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.3 01-Jun-2003  ichiro branches: 1.3.2;
change into the form KNF
 1.2 01-Jun-2003  ichiro add console unit number to configuration parameter.
move structure of uart information
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.3.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 11-Apr-2006  yamt sync with head
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.68.1 11-Mar-2010  yamt sync with head
 1.12.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.2.1 30-Oct-2012  yamt sync with head
 1.13.52.6 05-Apr-2021  thorpej Treat config_probe() as if it were a boolean function; don't compare
return value > 0... except for the odd balls, which are now really easy
to spot.
 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.4 16-Nov-2003  scw - Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.3 02-Nov-2003  scw Add generic read/write region 1 ops.
 1.2 01-Jun-2003  ichiro branches: 1.2.2;
change into the form KNF
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.4 11-Dec-2005  christos branches: 1.4.80;
merge ktrace-lwp.
 1.3 02-Nov-2003  scw It makes more sense to map the expansion bus registers in ixpsip
instead of the pci bridge driver.
 1.2 01-Jun-2003  ichiro branches: 1.2.2;
add console unit number to configuration parameter.
move structure of uart information
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 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.80.1 11-Mar-2010  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.10 21-Apr-2023  skrll Trailing whitespace
 1.9 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.8 01-Jul-2011  dyoung branches: 1.8.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.6 10-Apr-2006  simonb branches: 1.6.68;
Tab Police.
 1.5 24-Nov-2005  yamt branches: 1.5.4; 1.5.6; 1.5.8; 1.5.10; 1.5.12;
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.4 01-Apr-2005  yamt branches: 1.4.2; 1.4.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.3 16-Nov-2003  scw branches: 1.3.4; 1.3.10; 1.3.12;
- Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.2 23-Oct-2003  scw Use pmap_enter() instead of pmap_kenter_pa() as the former automatically
ensures the mapping is cache-inhibited, so we don't have to frob the PTE
directly.
 1.1 25-Sep-2003  ichiro pci bus support
 1.3.12.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.3.10.1 29-Apr-2005  kent sync with -current
 1.3.4.6 11-Dec-2005  christos Sync with head.
 1.3.4.5 01-Apr-2005  skrll Sync with HEAD.
 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 16-Nov-2003  skrll file ixp425_space.c was added on branch ktrace-lwp on 2004-08-03 10:32:58 +0000
 1.4.8.1 29-Nov-2005  yamt sync with head.
 1.4.2.1 21-Jun-2006  yamt sync with head.
 1.5.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.5.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.5.8.1 11-Apr-2006  yamt sync with head
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.68.1 11-Mar-2010  yamt sync with head
 1.8.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.20 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.19 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.18 12-Nov-2012  skrll branches: 1.18.36; 1.18.38;
C99 types
 1.17 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.14 20-Jan-2008  joerg branches: 1.14.10;
Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 1.13 06-Jan-2007  christos branches: 1.13.20; 1.13.24; 1.13.26; 1.13.32; 1.13.38;
Add generic TOD support. From Bucky Katz.
 1.12 10-Sep-2006  gdamore branches: 1.12.4;
First pass at enabling a lot of ARM ports to convert swiftly to
__HAVE_GENERIC_TODR. Just put #define __HAVE_GENERIC_TODR in types.h
if your port uses one of these files.
 1.11 10-Apr-2006  simonb branches: 1.11.8;
Tab Police.
 1.10 04-Mar-2006  scw branches: 1.10.2; 1.10.4; 1.10.6;
Allow the kernel config file to override the default timer frequency
using "options IXP425_CLOCK_FREQ".
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6;
merge ktrace-lwp.
 1.8 04-Jun-2005  he branches: 1.8.2;
Fix shadowing warning.
 1.7 04-Jun-2005  he Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.6 26-Feb-2005  simonb Watch out for those unexpected tains.
 1.5 16-Nov-2003  scw branches: 1.5.8; 1.5.10;
- Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.4 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.3 27-Jul-2003  thorpej Fix think'o in last. Pointed out by Izumi Tsutsui.
 1.2 26-Jul-2003  thorpej Flesh out inittodr() and resettodr().
 1.1 23-May-2003  ichiro branches: 1.1.2;
support IXP425 Intel Network Processor
running on BigEndian
 1.1.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.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.8.2.4 21-Jan-2008  yamt sync with head
 1.8.2.3 26-Feb-2007  yamt sync with head.
 1.8.2.2 30-Dec-2006  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.10.2.2 14-Sep-2006  yamt sync with head.
 1.10.2.1 11-Apr-2006  yamt sync with head
 1.11.8.2 12-Jan-2007  ad Sync with head.
 1.11.8.1 18-Nov-2006  ad Sync with head.
 1.12.4.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.13.38.1 20-Jan-2008  bouyer Sync with HEAD
 1.13.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.13.26.1 23-Mar-2008  matt sync with HEAD
 1.13.24.1 27-Jan-2008  chris Sync to HEAD.
 1.13.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.14.10.1 11-Mar-2010  yamt sync with head
 1.16.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.16.2.1 30-Oct-2012  yamt sync with head
 1.18.38.1 10-Jun-2019  christos Sync with HEAD
 1.18.36.1 28-Jul-2018  pgoyette Sync with HEAD
 1.4 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.3 01-Jul-2011  dyoung branches: 1.3.2; 1.3.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 10-Dec-2006  scw branches: 1.1.2; 1.1.4; 1.1.6; 1.1.52; 1.1.54; 1.1.56;
Support the IXP425 watchdog timer.
 1.1.56.1 16-May-2008  yamt sync with head.
 1.1.54.1 18-May-2008  yamt sync with head.
 1.1.52.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 10-Dec-2006  ad file ixp425_wdog.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 10-Dec-2006  yamt file ixp425_wdog.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 10-Dec-2006  yamt file ixp425_wdog.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.2.1 30-Oct-2012  yamt sync with head
 1.23 12-Feb-2020  thorpej Correct the location of SDRAM in the comment describing the IXP425
memory map. SDRAM is located at 0x00000000 and has aliases at 0x10000000,
0x20000000, and 0x30000000.
 1.22 12-Nov-2012  skrll branches: 1.22.38; 1.22.44;
C99 types
 1.21 21-Oct-2009  rmind branches: 1.21.12; 1.21.22;
Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.20 10-Dec-2006  scw branches: 1.20.50;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.19 11-Dec-2005  christos branches: 1.19.20; 1.19.22;
merge ktrace-lwp.
 1.18 13-Feb-2004  scw branches: 1.18.16;
Avoid using two 'GPIO' bits of the interrupt mask to signify soft
interrupts; some boards actually use those GPIO pins as external
interrupt sources.

Instead, assign soft interrupt bits to on-chip sources which are
not used by the IXP425 port.
 1.17 08-Dec-2003  scw Scoot the SDRAM controller's mapping forward to the next 1MB boundary
so it can be mapped easily at startup.
 1.16 08-Dec-2003  scw Add support for picking up the size of SDRAM by reading the memory
controller's config register.
 1.15 08-Dec-2003  scw Oops, map PCI memory space at VA 0xf8000000 instead of in the middle
of user VM space at 0x48000000.
 1.14 16-Nov-2003  scw - Remove ixpsip_bs_tag (ixp425_sip_io.c). It just duplicated some of
the functionality of ixp425_bs_tag.
- Add missing stream_{read,write}_1 ops to ixp425_bs_tag.
- Re-work the delay() implementation to use the free-running Time-
Stamp counter. This removes the need to bootstrap TMR0 early on.
 1.13 23-Oct-2003  scw Add a few more register definitions.
 1.12 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.11 25-Sep-2003  ichiro add comment and delete unused definition
 1.10 25-Sep-2003  ichiro pci bus support
 1.9 02-Jul-2003  ichiro add sdram configration register
 1.8 02-Jul-2003  ichiro backout to recent changes w/o lwp changes
 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 *

ixp425_com:
add some status flags
 1.5 03-Jun-2003  ichiro fix interrupt number
swap uart0 and uart1
 1.4 02-Jun-2003  ichiro add pci configuration register and commands
 1.3 31-May-2003  ichiro bug fix
 1.2 24-May-2003  ichiro add registers
Performance Monitoring Unit - Coprocessor14
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 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.18.16.1 30-Dec-2006  yamt sync with head.
 1.19.22.1 18-Dec-2006  yamt sync with head.
 1.19.20.1 12-Jan-2007  ad Sync with head.
 1.20.50.1 11-Mar-2010  yamt sync with head
 1.21.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.12.1 16-Jan-2013  yamt sync with (a bit old) head
 1.22.44.1 29-Feb-2020  ad Sync with head.
 1.22.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16 12-Nov-2012  skrll C99 types
 1.15 14-Oct-2012  msaitoh struct device * -> device_t for IXP4xx (and nslu2).
Tested with my NSLU2.
 1.14 28-Sep-2012  ryo Defer attaching interrupt evcnts in the same way as i80321.c by matt@
 1.13 01-Jul-2011  dyoung branches: 1.13.2; 1.13.8; 1.13.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 21-Oct-2009  rmind Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
 1.11 10-Dec-2006  scw branches: 1.11.50;
Add a port of Sam Leffler's IXP425 micro-engine support (from FreeBSD).

This is very much a work in progress. At the present time, only Ethernet
is supported.
 1.10 10-Apr-2006  simonb branches: 1.10.8; 1.10.10;
Tab Police.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 08-Dec-2003  scw branches: 1.8.16;
Add support for picking up the size of SDRAM by reading the memory
controller's config register.
 1.7 02-Nov-2003  scw It makes more sense to map the expansion bus registers in ixpsip
instead of the pci bridge driver.
 1.6 23-Oct-2003  scw Map the expansion bus registers.
 1.5 08-Oct-2003  scw Make it easier to support different types of IXP425 board:

- Move board-specific PCI/GPIO initialisation to its rightful place.

- Handle clearing down latched GPIO interrupts in a board-independent way.

- Use MI com(4) driver for on-chip UARTs.

- Misc. tidying up.

Tested on IXDP425.
 1.4 25-Sep-2003  ichiro pci bus support
 1.3 02-Jul-2003  ichiro use struct pmap_devmap
 1.2 24-May-2003  ichiro branches: 1.2.2;
add IXDP425 PCI interrupt
fix some typo
 1.1 23-May-2003  ichiro support IXP425 Intel Network Processor
running on BigEndian
 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.16.2 30-Dec-2006  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.1 11-Apr-2006  yamt sync with head
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.10.1 18-Dec-2006  yamt sync with head.
 1.10.8.1 12-Jan-2007  ad Sync with head.
 1.11.50.1 11-Mar-2010  yamt sync with head
 1.13.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.8.1 17-Oct-2012  riz Pull up following revision(s) (requested by tsutsui in ticket #600):
sys/arch/arm/xscale/ixp425_intr.c: revision 1.24
sys/arch/evbarm/ixdp425/ixdp425_mainbus.c: revision 1.8
sys/arch/evbarm/nslu2/nslu2_mainbus.c: revision 1.3
sys/arch/arm/xscale/ixp425var.h: revision 1.14
Defer attaching interrupt evcnts in the same way as i80321.c by matt@
 1.13.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.13.2.1 30-Oct-2012  yamt sync with head
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 12-Nov-2012  skrll branches: 1.22.52;
C99 types
 1.21 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.20 01-Jul-2011  dyoung branches: 1.20.2; 1.20.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 09-Jun-2011  nonaka - device_t/softc split.
- use aprint_* function.
 1.18 09-Aug-2009  kiyohara branches: 1.18.4; 1.18.10;
Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.17 03-May-2008  martin Move TNF license to standard 2 clause variant
 1.16 21-Feb-2007  thorpej branches: 1.16.44; 1.16.46; 1.16.48;
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.15 17-Dec-2006  peter branches: 1.15.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.14 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.13 14-May-2006  elad branches: 1.13.8; 1.13.10;
integrate kauth.
 1.12 10-Apr-2006  simonb Tab Police.
 1.11 24-Dec-2005  perry branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 26-Aug-2005  drochner s/locdesc_t/int/g
 1.8 04-Jul-2005  bsh branches: 1.8.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.7 03-Jul-2005  bsh + use constants defined in xscalereg.h instead of 0x0001.
+ clear CPU cycle counter in pxaip_measure_cpuclock()
+ style.
 1.6 30-Jun-2005  drochner adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.5 12-Dec-2003  thorpej Add a default case to avoid an uninitialized variable warning.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 05-Jun-2003  scw branches: 1.3.2;
- Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0.c was added on branch nathanw_sa on 2002-11-11 21:56:54 +0000
 1.3.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.2.3 26-Feb-2007  yamt sync with head.
 1.8.2.2 30-Dec-2006  yamt sync with head.
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.8.1 11-Apr-2006  yamt sync with head
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.13.10.1 18-Dec-2006  yamt sync with head.
 1.13.8.1 12-Jan-2007  ad Sync with head.
 1.15.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.16.48.2 19-Aug-2009  yamt sync with head.
 1.16.48.1 16-May-2008  yamt sync with head.
 1.16.46.1 18-May-2008  yamt sync with head.
 1.16.44.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18.4.1 12-Jun-2011  rmind sync with head
 1.20.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.20.2.1 30-Oct-2012  yamt sync with head
 1.22.52.7 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.22.52.6 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.22.52.5 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.22.52.4 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.22.52.3 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.22.52.2 20-Mar-2021  thorpej No need to pass the parent softc down to the indirect submatch routine;
it's available from the parent device_t there.
 1.22.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.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 06-Jun-2012  skrll Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.1 19-Oct-2002  bsh branches: 1.1.2; 1.1.150; 1.1.156;
Support Intel PXA250 and PXA210 application processors.
 1.1.156.1 10-Aug-2012  jdc Pull up revisions:
src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
src/sys/arch/arm/gemini/files.gemini revision 1.12
src/sys/arch/arm/mpcore/files.mpcore revision 1.2
src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
src/sys/arch/arm/omap/files.omap revision 1.6
src/sys/arch/arm/omap/files.omap2 revision 1.9
src/sys/arch/arm/omap/omap_a2x_io.S delete
src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@
 1.1.150.1 30-Oct-2012  yamt sync with head
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_a4x_io.S was added on branch nathanw_sa on 2002-11-11 21:56:55 +0000
 1.6 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.5 01-Jul-2011  dyoung branches: 1.5.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 28-Jul-2006  simonb Remove a few trailing blank lines.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 19-Oct-2002  bsh branches: 1.1.2; 1.1.8;
Support Intel PXA250 and PXA210 application processors.
 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-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_a4x_space.c was added on branch nathanw_sa on 2002-11-11 21:56:56 +0000
 1.2.16.1 30-Dec-2006  yamt sync with head.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.5.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.21 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.20 06-Feb-2021  isaki Fix "locking against myself".
halt_{input,output} will be called with sc_intr_lock held.
 1.19 06-Feb-2021  isaki Calling halt_{input,output} is done by the MI audio layer if necessary.
 1.18 19-Apr-2020  isaki branches: 1.18.2;
Fix round_blocksize not to return 0.
 1.17 08-Jun-2019  isaki branches: 1.17.8;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.16 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.15 16-Mar-2019  isaki branches: 1.15.2;
Use C99 style struct initializer to audio_hw_if.
 1.14 01-Jun-2017  chs branches: 1.14.10;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.13 12-Nov-2012  skrll branches: 1.13.14;
C99 types
 1.12 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.11 24-Nov-2011  mrg branches: 1.11.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
 1.10 23-Nov-2011  jmcneill Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.9 01-Jul-2011  dyoung branches: 1.9.2; 1.9.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.8 09-Jun-2011  nonaka - device_t/softc split.
- use aprint_* function.
 1.7 17-Oct-2007  garbled branches: 1.7.42; 1.7.52;
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.6 21-Aug-2007  kiyohara branches: 1.6.2;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.5 04-Mar-2007  christos branches: 1.5.2; 1.5.10; 1.5.14; 1.5.16; 1.5.18; 1.5.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 22-Feb-2007  thorpej branches: 1.4.2;
TRUE -> true, FALSE -> false
 1.3 24-Dec-2005  perry branches: 1.3.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 13-Apr-2005  scw branches: 1.1.2; 1.1.4; 1.1.10;
Add support for the DMA and AC97 controllers on PXA2x0, and enable them
on the Lubbock evaluation board.

Many thanks to Hiroyuki Bessho for testing this driver with the new
aurateconv interface, as I no longer have access to the hardware.

Contributed by Wasabi Systems, Inc.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 13-Apr-2005  skrll file pxa2x0_ac97.c was added on branch ktrace-lwp on 2005-11-10 13:55:27 +0000
 1.1.4.3 03-Sep-2007  yamt sync with head.
 1.1.4.2 26-Feb-2007  yamt sync with head.
 1.1.4.1 21-Jun-2006  yamt sync with head.
 1.1.2.2 29-Apr-2005  kent sync with -current
 1.1.2.1 13-Apr-2005  kent file pxa2x0_ac97.c was added on branch kent-audio2 on 2005-04-29 11:28:05 +0000
 1.3.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.2.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.5.20.1 01-Jan-2008  chris Sync with HEAD.
 1.5.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.5.16.1 01-Nov-2007  rjs Sync with HEAD.
 1.5.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.5.10.1 03-Oct-2007  garbled Sync with HEAD
 1.5.2.1 09-Oct-2007  ad Sync with head.
 1.6.2.1 06-Nov-2007  matt sync with HEAD
 1.7.52.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.7.42.1 12-Jun-2011  rmind sync with head
 1.9.4.3 22-Nov-2011  jmcneill get rid of unused 'powerstate' callback in audio_hw_if
 1.9.4.2 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.9.4.1 20-Nov-2011  mrg port to audiomp: alloc/free changes, get_locks support, no more IPL_AUDIO,
convert splaudio() -> sc_intr_lock usage, take sc_intr_lock in acu_intr().
 1.9.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.9.2.2 30-Oct-2012  yamt sync with head
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.11.8.2 03-Dec-2017  jdolecek update from HEAD
 1.11.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.14.1 28-Aug-2017  skrll Sync with HEAD
 1.14.10.2 21-Apr-2020  martin Sync with HEAD
 1.14.10.1 10-Jun-2019  christos Sync with HEAD
 1.15.2.4 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.15.2.3 03-May-2019  isaki Remove unnecessary header file.
 1.15.2.2 23-Apr-2019  isaki Adapt to audio2.
- XXX Need an accurate list of supported frequencies.
 1.15.2.1 21-Apr-2019  isaki Use C99 style struct initializer to audio_format.
 1.17.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.18.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.9 31-Oct-2022  andvar fix various typos in comments and one output message.
 1.8 12-Feb-2022  thorpej Add inline functions to manipulate the klists that link up knotes
via kn_selnext:

- klist_init()
- klist_fini()
- klist_insert()
- klist_remove()

These provide some API insulation from the implementation details of these
lists (but not completely; see vn_knote_attach() and vn_knote_detach()).
Currently just a wrapper around SLIST(9).

This will make it significantly easier to switch kn_selnext linkage
to a different kind of list.
 1.7 26-Sep-2021  thorpej Driver "kqfilter" entry points return an error code, so if an invalid
filter is requested, return EINVAL rather than 1.
 1.6 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.5 30-Oct-2020  christos c99 struct initializers
 1.4 12-Nov-2012  skrll C99 types
 1.3 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.2 05-Dec-2009  pooka branches: 1.2.12; 1.2.22;
Convert tsleep(&lbolt) to kpause(). Make ltsleep/mtsleep on lbolt
illegal. I examined all places where lbolt is referenced to make
sure there were pointer aliases of it passed to tsleep, but put a
KASSERT in m/ltsleep() just to be sure.
 1.1 06-Dec-2008  ober branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Initial apm support for Zaurus. Ported from OpenBSD by mjf@.
 1.1.12.3 11-Mar-2010  yamt sync with head
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 06-Dec-2008  yamt file pxa2x0_apm.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:45 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Dec-2008  skrll file pxa2x0_apm.c was added on branch nick-hppapmap on 2009-01-19 13:16:00 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Dec-2008  mjf file pxa2x0_apm.c was added on branch mjf-devfs2 on 2009-01-17 13:27:54 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 06-Dec-2008  haad file pxa2x0_apm.c was added on branch haad-dm on 2008-12-13 01:13:03 +0000
 1.2.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.12.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.12.1 30-Oct-2012  yamt sync with head
 1.3 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.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 06-Dec-2008  ober branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Initial APM support for Zaurus. Ported from OpenBSD by mjf@
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 06-Dec-2008  yamt file pxa2x0_apm.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:45 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Dec-2008  skrll file pxa2x0_apm.h was added on branch nick-hppapmap on 2009-01-19 13:16:00 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Dec-2008  mjf file pxa2x0_apm.h was added on branch mjf-devfs2 on 2009-01-17 13:27:54 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 06-Dec-2008  haad file pxa2x0_apm.h was added on branch haad-dm on 2008-12-13 01:13:03 +0000
 1.2.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.3 18-Aug-2013  matt Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
 1.2 12-Nov-2012  skrll branches: 1.2.2;
C99 types
 1.1 06-Dec-2008  ober branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12; 1.1.24; 1.1.34;
Initial APM support for Zaurus. Ported from OpenBSD by mjf@
 1.1.34.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.34.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.24.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.1.24.1 16-Jan-2013  yamt sync with (a bit old) head
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 06-Dec-2008  yamt file pxa2x0_apm_asm.S was added on branch yamt-nfs-mp on 2009-05-04 08:10:45 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 06-Dec-2008  skrll file pxa2x0_apm_asm.S was added on branch nick-hppapmap on 2009-01-19 13:16:00 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 06-Dec-2008  mjf file pxa2x0_apm_asm.S was added on branch mjf-devfs2 on 2009-01-17 13:27:54 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 06-Dec-2008  haad file pxa2x0_apm_asm.S was added on branch haad-dm on 2008-12-13 01:13:03 +0000
 1.2.2.1 28-Aug-2013  rmind sync with head
 1.14 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.13 01-Jul-2011  dyoung branches: 1.13.52; 1.13.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.12 06-Dec-2009  kiyohara Enable UART clock in pxauart_attach().
 1.11 04-Aug-2009  kiyohara Fix GPIO configurations.
http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html
3. I misstake sinse 2007/08/21.
:

Details:
Remove hwuart_gpioconf. PXA270 not have HWUART.
Add ohci_gpioconf. However all selectable.
Fix pSKTSEL of pcic is selectable.
Fix MMDAT<1-3> of mci is optional.
 1.10 14-Mar-2008  cube branches: 1.10.4;
Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.9 17-Oct-2007  garbled branches: 1.9.12; 1.9.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 21-Aug-2007  kiyohara branches: 1.8.2;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.7 10-Dec-2006  kiyohara branches: 1.7.6; 1.7.14; 1.7.18; 1.7.20; 1.7.22; 1.7.24;
Add definition the HWUART (and NSSP).
 1.6 13-Jul-2006  gdamore branches: 1.6.4; 1.6.6;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

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

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

Approved by core@. Fixes PR port-evbmips/32362.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.8; 1.5.16;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 18-Jun-2003  bsh branches: 1.3.2;
enable BTUART
 1.2 14-Jun-2003  thorpej Introduce a new "type" field in the softc which is used to indicate
the general UART type. Currently, we have "normal", "hayesp" and
"pxa2x0" types. Replace the corresponding hw flags with the new type
values.
 1.1 05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 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.4.16.3 17-Mar-2008  yamt sync with head.
 1.4.16.2 03-Sep-2007  yamt sync with head.
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.16.1 20-Jun-2006  gdamore Add support for pretty much all ARM com(4) variants. There are a few ARM
serial devices that are not com(4)-like enough to be supported under com(4).
 1.5.8.1 11-Aug-2006  yamt sync with head
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.6.6.1 18-Dec-2006  yamt sync with head.
 1.6.4.1 12-Jan-2007  ad Sync with head.
 1.7.24.2 21-Mar-2008  chris Sync with head.
 1.7.24.1 01-Jan-2008  chris Sync with HEAD.
 1.7.22.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.7.20.1 01-Nov-2007  rjs Sync with HEAD.
 1.7.18.1 03-Sep-2007  skrll Sync with HEAD.
 1.7.14.1 03-Oct-2007  garbled Sync with HEAD
 1.7.6.1 09-Oct-2007  ad Sync with head.
 1.8.2.2 23-Mar-2008  matt sync with HEAD
 1.8.2.1 06-Nov-2007  matt sync with HEAD
 1.9.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.9.12.1 24-Mar-2008  keiichi sync with head.
 1.10.4.2 11-Mar-2010  yamt sync with head
 1.10.4.1 19-Aug-2009  yamt sync with head.
 1.13.54.1 10-Jun-2019  christos Sync with HEAD
 1.13.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.7 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.6 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 07-Aug-2003  bsh make this compile again. (arm32_bus_dma_tag._cookie)
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 19-Oct-2002  bsh branches: 1.1.2; 1.1.8;
Support Intel PXA250 and PXA210 application processors.
 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-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_dma.c was added on branch nathanw_sa on 2002-11-11 21:56:56 +0000
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.14 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.13 05-Feb-2015  nonaka branches: 1.13.16; 1.13.18;
Don't write DMAC_DINT register on PXA270, because read-only register.
 1.12 12-Nov-2012  skrll branches: 1.12.14;
C99 types
 1.11 07-Sep-2012  matt branches: 1.11.2;
Forgot to commit this.
 1.10 29-Jan-2012  tsutsui Handle PXA25x specific DMAC constraints. From kiyohara@.
 1.9 23-Nov-2011  jmcneill branches: 1.9.2;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.8 01-Jul-2011  dyoung branches: 1.8.2; 1.8.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 09-Jun-2011  nonaka - device_t/softc split.
- use aprint_* function.
 1.6 16-Mar-2009  nonaka branches: 1.6.4; 1.6.10;
set DALGN register when address is misaligned (PXA27x only).
 1.5 04-Mar-2007  christos branches: 1.5.46; 1.5.54; 1.5.60;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.3 24-Dec-2005  perry branches: 1.3.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 13-Apr-2005  scw branches: 1.1.2; 1.1.4; 1.1.10;
Add support for the DMA and AC97 controllers on PXA2x0, and enable them
on the Lubbock evaluation board.

Many thanks to Hiroyuki Bessho for testing this driver with the new
aurateconv interface, as I no longer have access to the hardware.

Contributed by Wasabi Systems, Inc.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 13-Apr-2005  skrll file pxa2x0_dmac.c was added on branch ktrace-lwp on 2005-11-10 13:55:27 +0000
 1.1.4.3 03-Sep-2007  yamt sync with head.
 1.1.4.2 26-Feb-2007  yamt sync with head.
 1.1.4.1 21-Jun-2006  yamt sync with head.
 1.1.2.2 29-Apr-2005  kent sync with -current
 1.1.2.1 13-Apr-2005  kent file pxa2x0_dmac.c was added on branch kent-audio2 on 2005-04-29 11:28:05 +0000
 1.3.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.5.60.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.54.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.46.1 04-May-2009  yamt sync with head.
 1.6.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.6.4.1 12-Jun-2011  rmind sync with head
 1.8.4.1 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.8.2.3 16-Jan-2013  yamt sync with (a bit old) head
 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.2.2 03-Dec-2017  jdolecek update from HEAD
 1.11.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.14.1 06-Apr-2015  skrll Sync with HEAD
 1.13.18.1 10-Jun-2019  christos Sync with HEAD
 1.13.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4 23-Nov-2011  jmcneill Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.3 21-Feb-2007  thorpej branches: 1.3.82; 1.3.84;
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.2 11-Dec-2005  christos branches: 1.2.26;
merge ktrace-lwp.
 1.1 13-Apr-2005  scw branches: 1.1.2; 1.1.4; 1.1.10;
Add support for the DMA and AC97 controllers on PXA2x0, and enable them
on the Lubbock evaluation board.

Many thanks to Hiroyuki Bessho for testing this driver with the new
aurateconv interface, as I no longer have access to the hardware.

Contributed by Wasabi Systems, Inc.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 13-Apr-2005  skrll file pxa2x0_dmac.h was added on branch ktrace-lwp on 2005-11-10 13:55:27 +0000
 1.1.4.1 26-Feb-2007  yamt sync with head.
 1.1.2.2 29-Apr-2005  kent sync with -current
 1.1.2.1 13-Apr-2005  kent file pxa2x0_dmac.h was added on branch kent-audio2 on 2005-04-29 11:28:05 +0000
 1.2.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.3.84.1 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.3.82.1 17-Apr-2012  yamt sync with head
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.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.19 20-Nov-2020  thorpej branches: 1.19.2;
malloc(9) -> kmem(9)
 1.18 10-Nov-2019  chs branches: 1.18.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.17 16-Jun-2017  pgoyette branches: 1.17.6;
Add gpio support for Xscale

From Stephan Meisenger in PR/52163
 1.16 12-Nov-2012  skrll branches: 1.16.14;
C99 types
 1.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 09-Jun-2011  nonaka - device_t/softc split.
- use aprint_* function.
 1.13 04-Aug-2009  kiyohara branches: 1.13.4; 1.13.10;
Fix GPIO configurations.
http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html
3. I misstake sinse 2007/08/21.
:

Details:
Remove hwuart_gpioconf. PXA270 not have HWUART.
Add ohci_gpioconf. However all selectable.
Fix pSKTSEL of pcic is selectable.
Fix MMDAT<1-3> of mci is optional.
 1.12 17-Dec-2008  cegger kill MALLOC and FREE macros.
 1.11 07-Nov-2008  rafal Remove parameter checks from under DEBUG; bad gpio pin numbers will cause
the kernel to fall over rather quickly anyway with memory faults, so a panic
with a hint as to what's wrong seems much better.
 1.10 24-Apr-2008  nonaka branches: 1.10.2; 1.10.8; 1.10.10;
fix typo.
 1.9 17-Oct-2007  garbled branches: 1.9.16; 1.9.18;
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.8 21-Aug-2007  kiyohara branches: 1.8.2;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.7 17-Dec-2006  peter branches: 1.7.6; 1.7.14; 1.7.18; 1.7.20; 1.7.22; 1.7.24;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.6 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.5 24-Dec-2005  perry branches: 1.5.20; 1.5.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 04-Jul-2005  bsh branches: 1.3.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2003  scw branches: 1.1.2;
- Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.1.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.2.3 03-Sep-2007  yamt sync with head.
 1.3.2.2 30-Dec-2006  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.5.22.1 18-Dec-2006  yamt sync with head.
 1.5.20.1 12-Jan-2007  ad Sync with head.
 1.7.24.1 01-Jan-2008  chris Sync with HEAD.
 1.7.22.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.7.20.1 01-Nov-2007  rjs Sync with HEAD.
 1.7.18.1 03-Sep-2007  skrll Sync with HEAD.
 1.7.14.1 03-Oct-2007  garbled Sync with HEAD
 1.7.6.1 09-Oct-2007  ad Sync with head.
 1.8.2.1 06-Nov-2007  matt sync with HEAD
 1.9.18.1 18-May-2008  yamt sync with head.
 1.9.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.10.2.2 19-Aug-2009  yamt sync with head.
 1.10.2.1 04-May-2009  yamt sync with head.
 1.13.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.4.1 12-Jun-2011  rmind sync with head
 1.15.12.2 03-Dec-2017  jdolecek update from HEAD
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.16.14.1 28-Aug-2017  skrll Sync with HEAD
 1.17.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.18.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.19.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.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 04-Aug-2009  kiyohara Fix GPIO configurations.
http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html
3. I misstake sinse 2007/08/21.
:

Details:
Remove hwuart_gpioconf. PXA270 not have HWUART.
Add ohci_gpioconf. However all selectable.
Fix pSKTSEL of pcic is selectable.
Fix MMDAT<1-3> of mci is optional.
 1.4 24-Jun-2008  chris Change $wasabi$ to $NetBSD$ so that we get version info into the file.
 1.3 21-Aug-2007  kiyohara branches: 1.3.22; 1.3.26; 1.3.28; 1.3.30;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.2 16-Dec-2006  ober branches: 1.2.6; 1.2.14; 1.2.18; 1.2.20; 1.2.22; 1.2.24;
Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.1 05-Jun-2003  scw branches: 1.1.18; 1.1.48; 1.1.50;
- Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.1.50.1 18-Dec-2006  yamt sync with head.
 1.1.48.1 12-Jan-2007  ad Sync with head.
 1.1.18.2 03-Sep-2007  yamt sync with head.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.2.24.1 01-Jan-2008  chris Sync with HEAD.
 1.2.22.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.2.20.1 01-Nov-2007  rjs Sync with HEAD.
 1.2.18.1 03-Sep-2007  skrll Sync with HEAD.
 1.2.14.1 03-Oct-2007  garbled Sync with HEAD
 1.2.6.1 09-Oct-2007  ad Sync with head.
 1.3.30.1 27-Jun-2008  simonb Sync with head.
 1.3.28.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.26.2 19-Aug-2009  yamt sync with head.
 1.3.26.1 04-May-2009  yamt sync with head.
 1.3.22.1 29-Jun-2008  mjf Sync with HEAD.
 1.9 12-Dec-2021  andvar fix typos in word "operation(s)".
 1.8 06-Aug-2011  kiyohara Support slave mode for PXA2x0 I2C.
 1.7 23-Jun-2011  kiyohara Fix bit name ISR_UB. Not _UE.
And add comments for bit names from datasheet of PXA255.
 1.6 22-Jun-2011  kiyohara Add member sc_addr to struct pxa2x0_i2c_softc.
And use sc_addr to bus_space_map() instead of macro-directly.
 1.5 19-Jun-2011  nonaka - Split device_t/softc.
- Added some functions for i2c framework.
 1.4 20-Apr-2009  pgoyette branches: 1.4.10;
One more i2c quick_{read,write} update.
 1.3 17-Oct-2007  garbled branches: 1.3.20; 1.3.28; 1.3.34;
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.2 21-Aug-2007  kiyohara branches: 1.2.2;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12; 1.1.20; 1.1.24; 1.1.26; 1.1.28; 1.1.30;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.30.1 01-Jan-2008  chris Sync with HEAD.
 1.1.28.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.1.26.1 01-Nov-2007  rjs Sync with HEAD.
 1.1.24.1 03-Sep-2007  skrll Sync with HEAD.
 1.1.20.1 03-Oct-2007  garbled Sync with HEAD
 1.1.12.1 09-Oct-2007  ad Sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_i2c.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.3 03-Sep-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_i2c.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_i2c.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.2.1 06-Nov-2007  matt sync with HEAD
 1.3.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.20.1 04-May-2009  yamt sync with head.
 1.4.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5 06-Aug-2011  kiyohara Support slave mode for PXA2x0 I2C.
 1.4 22-Jun-2011  kiyohara Add member sc_addr to struct pxa2x0_i2c_softc.
And use sc_addr to bus_space_map() instead of macro-directly.
 1.3 19-Jun-2011  nonaka - Split device_t/softc.
- Added some functions for i2c framework.
 1.2 20-Apr-2009  pgoyette branches: 1.2.10;
One more i2c quick_{read,write} update.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56; 1.1.64; 1.1.70;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.70.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.64.1 28-Apr-2009  skrll Sync with HEAD.
 1.1.56.1 04-May-2009  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_i2c.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_i2c.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_i2c.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.12 01-Jun-2017  chs branches: 1.12.10; 1.12.12;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.11 15-Jan-2012  nonaka branches: 1.11.6; 1.11.24;
Don't lock sc->sc_intr_lock at halt_output(), halt_input().
sc->sc_intr_lock is already locked by audio_close().
 1.10 23-Nov-2011  jmcneill branches: 1.10.2;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.9 01-Jul-2011  dyoung branches: 1.9.2; 1.9.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.8 13-Mar-2009  nonaka zaudio(4) works now.
 1.7 17-Oct-2007  garbled branches: 1.7.20; 1.7.28; 1.7.34;
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.6 21-Aug-2007  kiyohara branches: 1.6.2;
The initarm() should initialize GPIO. We must not initialize GPIO in
foo_attach() of the each drivers. And, it is necessary to confirm whether
to be initialized in foo_match(). To avoid a dangerous configuring on the
evaluation boards.
 1.5 26-Jun-2007  nonaka branches: 1.5.4; 1.5.6; 1.5.8; 1.5.10;
s/const const/const/
 1.4 05-Mar-2007  nonaka branches: 1.4.2; 1.4.4; 1.4.10;
Use (char *) on pointer arith.
 1.3 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.2 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.8.2 12-Mar-2007  rmind Sync with HEAD.
 1.1.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_i2s.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.4 03-Sep-2007  yamt sync with head.
 1.1.4.3 26-Feb-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_i2s.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_i2s.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.4.10.2 03-Oct-2007  garbled Sync with HEAD
 1.4.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.4.4.1 11-Jul-2007  mjf Sync with head.
 1.4.2.2 09-Oct-2007  ad Sync with head.
 1.4.2.1 15-Jul-2007  ad Sync with head.
 1.5.10.1 01-Jan-2008  chris Sync with HEAD.
 1.5.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.5.6.1 01-Nov-2007  rjs Sync with HEAD.
 1.5.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.6.2.1 06-Nov-2007  matt sync with HEAD
 1.7.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.20.1 04-May-2009  yamt sync with head.
 1.9.4.1 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.9.2.1 17-Apr-2012  yamt sync with head
 1.10.2.1 18-Feb-2012  mrg merge to -current.
 1.11.24.1 28-Aug-2017  skrll Sync with HEAD
 1.11.6.1 03-Dec-2017  jdolecek update from HEAD
 1.12.12.1 24-Apr-2019  isaki Adapt zaudio family to audio2.
- wm8731 and wm8750 can share zaudio_formats[].
- Drop INDEPENDENT property. These share sample rate in play and rec.
- pxa2x0_i2s_setspeed() no longer needs to writeback sample rate.
 1.12.10.1 10-Jun-2019  christos Sync with HEAD
 1.6 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.5 12-Nov-2012  skrll branches: 1.5.38; 1.5.40;
C99 types
 1.4 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.3 23-Nov-2011  jmcneill branches: 1.3.8;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.2 01-Jul-2011  dyoung branches: 1.2.2; 1.2.4;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_i2s.h was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_i2s.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_i2s.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.4.1 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.2.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 17-Apr-2012  yamt sync with head
 1.3.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.40.1 24-Apr-2019  isaki Adapt zaudio family to audio2.
- wm8731 and wm8750 can share zaudio_formats[].
- Drop INDEPENDENT property. These share sample rate in play and rec.
- pxa2x0_i2s_setspeed() no longer needs to writeback sample rate.
 1.5.38.1 10-Jun-2019  christos Sync with HEAD
 1.26 13-Jul-2023  riastradh arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.

Sidesteps namespace collision with `#define bits ...' in net/zlib.c.
 1.25 31-Oct-2022  andvar branches: 1.25.2;
fix various typos in comments and one output message.
 1.24 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.23 04-Jan-2021  skrll Trailing whitespace
 1.22 04-Jan-2021  skrll Spell interrupts correctly
 1.21 17-Dec-2013  joerg branches: 1.21.42;
Nuke __raise.
 1.20 29-Jul-2012  matt branches: 1.20.2; 1.20.4;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.19 01-Jul-2011  dyoung branches: 1.19.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.18 06-Jun-2011  matt Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup.
 1.17 13-Jun-2010  tsutsui branches: 1.17.6;
Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.16 05-Sep-2009  bsh branches: 1.16.2; 1.16.4;
correct the initial value of interrupt masks. 0 is to disable.
This fixes stray interrupt from LCD controller when lcd driver is not configured in the kernel.
 1.15 07-Nov-2008  rafal Make stray interrupt handler get the minimum IRQ number based on the current
CPU type vs. hardcoding it for pxa270.
 1.14 27-Apr-2008  matt branches: 1.14.6; 1.14.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.13 11-Dec-2007  ad branches: 1.13.8; 1.13.10; 1.13.12;
And you, be ye fruitful, and multiply; bring forth abundantly in the earth,
and multiply therein. (Genesis 9:6-8)
 1.12 03-Dec-2007  ad branches: 1.12.2; 1.12.4; 1.12.6;
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.11 17-Dec-2006  peter branches: 1.11.6; 1.11.20; 1.11.22; 1.11.24; 1.11.26; 1.11.32;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.10 24-Nov-2006  wiz s/heirarchy/hierarchy/, from Zafer.
 1.9 10-Apr-2006  simonb branches: 1.9.8; 1.9.10;
Tab Police.
 1.8 24-Dec-2005  perry branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; 1.8.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 04-Jul-2005  bsh branches: 1.6.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 16-Jun-2003  thorpej branches: 1.4.2;
Rename IPL_IMP -> IPL_VM.
 1.3 05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_intr.c was added on branch nathanw_sa on 2002-11-11 21:56:57 +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.6.2.4 21-Jan-2008  yamt sync with head
 1.6.2.3 07-Dec-2007  yamt sync with head
 1.6.2.2 30-Dec-2006  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.8.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.8.8.1 11-Apr-2006  yamt sync with head
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.10.2 18-Dec-2006  yamt sync with head.
 1.9.10.1 10-Dec-2006  yamt sync with head.
 1.9.8.1 12-Jan-2007  ad Sync with head.
 1.11.32.2 27-Dec-2007  mjf Sync with HEAD.
 1.11.32.1 08-Dec-2007  mjf Sync with HEAD.
 1.11.26.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.26.2 09-Jan-2008  matt sync with HEAD
 1.11.26.1 06-Nov-2007  matt Nuke use of current_spl_level and use curcup()->ci_cpl instead
 1.11.24.1 01-Jan-2008  chris Sync with HEAD.
 1.11.22.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.11.20.2 26-Dec-2007  rjs Sync with HEAD.
 1.11.20.1 06-Oct-2007  rjs Switch to new interrupt code.
 1.11.6.1 03-Dec-2007  ad Sync with HEAD.
 1.12.6.1 13-Dec-2007  bouyer Sync with HEAD
 1.12.4.1 13-Dec-2007  yamt sync with head.
 1.12.2.1 26-Dec-2007  ad Sync with head.
 1.13.12.4 11-Aug-2010  yamt sync with head.
 1.13.12.3 16-Sep-2009  yamt sync with head
 1.13.12.2 04-May-2009  yamt sync with head.
 1.13.12.1 16-May-2008  yamt sync with head.
 1.13.10.1 18-May-2008  yamt sync with head.
 1.13.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.13.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.14.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.16.4.2 12-Jun-2011  rmind sync with head
 1.16.4.1 03-Jul-2010  rmind sync with head
 1.16.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.17.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.19.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.19.2.1 30-Oct-2012  yamt sync with head
 1.20.4.1 18-May-2014  rmind sync with head
 1.20.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.25.2.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.16 13-Jul-2023  riastradh arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.

Sidesteps namespace collision with `#define bits ...' in net/zlib.c.
 1.15 24-Jan-2018  skrll branches: 1.15.34;
Remove port-acorn26

OK core@
 1.14 04-Feb-2014  matt _setsoftintr is long dead. reap any leftovers from arm.
 1.13 29-Jul-2012  matt branches: 1.13.2; 1.13.4;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.12 19-Nov-2008  matt branches: 1.12.16;
Don't include <machine/atomic.h> anymore.
 1.11 27-Apr-2008  matt branches: 1.11.6; 1.11.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.10 28-Feb-2007  bjh21 branches: 1.10.8; 1.10.22; 1.10.42; 1.10.44; 1.10.46;
KNF
(waiting for a test kernel to compile...)
 1.9 17-Dec-2006  peter branches: 1.9.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.8 24-Dec-2005  perry branches: 1.8.20; 1.8.22;
bare asm -> __asm
 1.7 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 05-Jun-2005  he branches: 1.5.2;
Work around -Wcast-qual by adding another __UNVOLATILE() when using
atomic_set_bit().
 1.4 05-Jul-2003  dogcow gcc 3.2 complained about the missing __volatile and extra tokens after #endif.
 1.3 05-Jun-2003  scw branches: 1.3.2;
- Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_intr.h was added on branch nathanw_sa on 2002-11-11 21:56:58 +0000
 1.3.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.2.3 03-Sep-2007  yamt sync with head.
 1.5.2.2 30-Dec-2006  yamt sync with head.
 1.5.2.1 21-Jun-2006  yamt sync with head.
 1.8.22.1 18-Dec-2006  yamt sync with head.
 1.8.20.1 12-Jan-2007  ad Sync with head.
 1.9.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.46.2 04-May-2009  yamt sync with head.
 1.10.46.1 16-May-2008  yamt sync with head.
 1.10.44.1 18-May-2008  yamt sync with head.
 1.10.42.2 17-Jan-2009  mjf Sync with HEAD.
 1.10.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.22.4 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.22.3 09-Jan-2008  matt sync with HEAD
 1.10.22.2 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.10.22.1 06-Nov-2007  matt Nuke use of current_spl_level and use curcup()->ci_cpl instead
 1.10.8.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.11.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12.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.12.16.1 30-Oct-2012  yamt sync with head
 1.13.4.1 18-May-2014  rmind sync with head
 1.13.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.34.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.
 1.2 03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_irq.S was added on branch nathanw_sa on 2002-11-11 21:56:59 +0000
 1.39 20-Nov-2021  rin Accept anti-aliased fonts; they are supported by rotated screen found on
hpcarm/WZERO3 and PXA270-based zaurus.
 1.38 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.37 10-Nov-2019  chs branches: 1.37.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.36 17-Oct-2015  jmcneill branches: 1.36.18;
remove tlb_flush define and change callers to use cpu_tlb_flushID directly, ok matt@
 1.35 22-Feb-2014  matt branches: 1.35.6;
Deal with non-4KB page sizes
 1.34 28-Jan-2014  martin Remove unused variables
 1.33 11-Jan-2012  macallan branches: 1.33.6; 1.33.10;
adjust wsfont_find()
 1.32 01-Jul-2011  dyoung branches: 1.32.2; 1.32.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.31 14-May-2011  nonaka PXA2X0_LCD_WRITETHROUGH is defflag'd.
 1.30 08-Aug-2010  tsutsui branches: 1.30.2;
Allow pxa2x0_lcd driver mapping screen buffer memory cachable with
write-through map (i.e. map it without BUS_DMA_COHERENT) since
currently all DMA data transfers are memory to device only.

Disabled by default, but enabled by "options PXA2X0_LCD_WRITETHROUGH"
or setting pxa2x0_lcd_writethrough = 1 in a kernel binary.

Tested on WS003SH by me and on WS011SH by jun@, and console output speed
is improved ~three times faster than coherent (uncached) mapping.

XXX: should we have a flag like BUS_DMA_WRITETHROUGH in MI bus_dma(9)?
 1.29 08-Aug-2010  kiyohara Must disable LCD Controller in pxa2x0_lcd_attach_sub(), if already enabled.
We wait to become disable LCD in pxa2x0_lcd_initialize().
 1.28 13-Mar-2010  bsh branches: 1.28.2;
fix LCD drivers for Lubbock and Twintail.
- pass correct attach args to pxa2x0_lcd_attach_sub()
- make this driver compile without wsdisplay again.
 1.27 29-Jan-2009  nonaka branches: 1.27.4;
- device_t/softc split.
- use aprint_* function.
 1.26 17-Oct-2007  garbled branches: 1.26.20; 1.26.28;
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.25 26-Jul-2007  nonaka branches: 1.25.6; 1.25.8;
use WSDISPLAY_TYPE_PXALCD.
 1.24 28-Jun-2007  nonaka branches: 1.24.2; 1.24.4;
cosmetic
 1.23 28-Jun-2007  nonaka use LCCR3_BPP3 instead of magic number.
 1.22 28-Jun-2007  nonaka Mask more interrupts.
 1.21 28-Jun-2007  nonaka Added support ioctl(WSDISPLAYIO_LINEBYTES).
(XFree86 wsfb driver uses it.)
 1.20 28-Jun-2007  nonaka pxa2x0_lcd_mmap():
- Check offset parameter.
 1.19 26-Jun-2007  nonaka Don't setup GP[87:86] to LDD[17:16] at pxa2x0_lcd_initialize().
Because zaurus uses GP[87:86] as SSP2.
 1.18 05-Mar-2007  nonaka branches: 1.18.2; 1.18.4; 1.18.10;
Use (char *) on pointer arith.
 1.17 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 18-Dec-2006  nonaka branches: 1.16.2;
Fix evbarm compile again.
 1.15 17-Dec-2006  peter Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.14 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.13 12-Apr-2006  jmmv branches: 1.13.8; 1.13.10;
Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.12 10-Apr-2006  simonb Tab Police.
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
merge ktrace-lwp.
 1.10 04-Jul-2005  bsh branches: 1.10.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.9 05-Jun-2005  he Remove an unneeded cast and add some consts.
 1.8 03-Oct-2003  bsh avoid compile error with GCC3, and add some comments.
 1.7 23-Jul-2003  bsh $Id$ -> $NetBSD$
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 17-Jun-2003  bsh branches: 1.5.2;
make this compile again:
+ we don't have struct pxa2x0_softc anymore.
+ call pxa2x0_clkman_config() to provide clock to LCDC block.
 1.4 17-Jun-2003  bsh white space nit.
 1.3 05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_lcd.c was added on branch nathanw_sa on 2002-11-11 21:57:00 +0000
 1.5.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.4 17-Jan-2005  skrll Adapt to branch.
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.2.3 03-Sep-2007  yamt sync with head.
 1.10.2.2 30-Dec-2006  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.11.8.2 24-May-2006  yamt sync with head.
 1.11.8.1 11-Apr-2006  yamt sync with head
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.13.10.2 21-Dec-2006  yamt sync with head.
 1.13.10.1 18-Dec-2006  yamt sync with head.
 1.13.8.1 12-Jan-2007  ad Sync with head.
 1.16.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.10.2 03-Oct-2007  garbled Sync with HEAD
 1.18.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.18.4.1 11-Jul-2007  mjf Sync with head.
 1.18.2.2 20-Aug-2007  ad Sync with HEAD.
 1.18.2.1 15-Jul-2007  ad Sync with head.
 1.24.4.1 15-Aug-2007  skrll Sync with HEAD.
 1.24.2.1 07-Aug-2007  matt Sync with HEAD.
 1.25.8.1 06-Nov-2007  matt sync with HEAD
 1.25.6.1 01-Jan-2008  chris Sync with HEAD.
 1.26.28.1 03-Mar-2009  skrll Sync with HEAD.
 1.26.20.2 11-Aug-2010  yamt sync with head.
 1.26.20.1 04-May-2009  yamt sync with head.
 1.27.4.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.27.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.28.2.2 31-May-2011  rmind sync with head
 1.28.2.1 05-Mar-2011  rmind sync with head
 1.30.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.32.6.1 18-Feb-2012  mrg merge to -current.
 1.32.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.32.2.1 17-Apr-2012  yamt sync with head
 1.33.10.1 18-May-2014  rmind sync with head
 1.33.6.2 03-Dec-2017  jdolecek update from HEAD
 1.33.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.35.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.36.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.11 09-Mar-2022  andvar s/Horizontao/Horizontal/ in comment and removing misplaced "pxel" word.
 1.10 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.9 29-Jan-2009  nonaka - device_t/softc split.
- use aprint_* function.
 1.8 04-Mar-2007  christos branches: 1.8.46; 1.8.54;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 18-Dec-2006  nonaka branches: 1.7.2;
Fix evbarm compile again.
 1.6 17-Dec-2006  peter Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.5 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.4 12-Apr-2006  jmmv branches: 1.4.8; 1.4.10;
Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 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 17-Jun-2003  bsh branches: 1.2.2; 1.2.18;
make this compile again:
+ we don't have struct pxa2x0_softc anymore.
+ call pxa2x0_clkman_config() to provide clock to LCDC block.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_lcd.h was added on branch nathanw_sa on 2002-11-11 21:57:01 +0000
 1.2.18.3 03-Sep-2007  yamt sync with head.
 1.2.18.2 30-Dec-2006  yamt sync with head.
 1.2.18.1 21-Jun-2006  yamt sync with head.
 1.2.2.1 17-Jan-2005  skrll Adapt to branch.
 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.10.2 21-Dec-2006  yamt sync with head.
 1.4.10.1 18-Dec-2006  yamt sync with head.
 1.4.8.1 12-Jan-2007  ad Sync with head.
 1.7.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.54.1 03-Mar-2009  skrll Sync with HEAD.
 1.8.46.1 04-May-2009  yamt sync with head.
 1.14 28-Mar-2023  andvar s/interrput/interrupt/ and s/accesss/access/ in comments.
 1.13 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 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 21-Jan-2012  nonaka branches: 1.10.62;
fix my license notice.
 1.9 23-Nov-2011  jmcneill branches: 1.9.2;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

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

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

Welcome to 5.99.57.
 1.8 05-Feb-2011  nonaka branches: 1.8.4; 1.8.6;
do pxamci_intr_done() after pxa2x0_dmac_abort_xfer().
 1.7 07-Oct-2010  kiyohara branches: 1.7.2; 1.7.4;
Support change Open-drain/Push-pull by bus_rod().
 1.6 01-Oct-2010  kiyohara Add capacity SMC_CAPS_MULTI_SEG_DMA. pxamci uses pxadmac for DMA.
 1.5 06-Apr-2010  nonaka Enable DMA transfer.
 1.4 13-Mar-2010  nonaka branches: 1.4.2;
fix compile failure when PXAMCI_DEBUG is defined.
 1.3 05-Dec-2009  nonaka branches: 1.3.2;
sync with OpenBSD.
 1.2 11-May-2009  nonaka branches: 1.2.2;
Don't touch dma data when PMC_CAPS_NO_DMA is set.
 1.1 21-Apr-2009  nonaka branches: 1.1.2; 1.1.4;
Added SD/MMC support from OpenBSD.
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.
 1.1.4.6 09-Oct-2010  yamt sync with head
 1.1.4.5 11-Aug-2010  yamt sync with head.
 1.1.4.4 11-Mar-2010  yamt sync with head
 1.1.4.3 16-May-2009  yamt sync with head
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 21-Apr-2009  yamt file pxa2x0_mci.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:45 +0000
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 21-Apr-2009  skrll file pxa2x0_mci.c was added on branch nick-hppapmap on 2009-04-28 07:33:46 +0000
 1.2.2.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.2.1 11-May-2009  jym file pxa2x0_mci.c was added on branch jym-xensuspend on 2009-05-13 17:16:18 +0000
 1.3.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.3.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.2.2 05-Mar-2011  rmind sync with head
 1.4.2.1 30-May-2010  rmind sync with head
 1.7.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.6.1 20-Nov-2011  jmcneill port zaudio to audiomp api changes for real this time
 1.8.4.1 17-Apr-2012  yamt sync with head
 1.9.2.1 18-Feb-2012  mrg merge to -current.
 1.10.62.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.2 21-Jan-2012  nonaka fix my license notice.
 1.1 21-Apr-2009  nonaka branches: 1.1.2; 1.1.4; 1.1.6; 1.1.18; 1.1.22;
Added SD/MMC support from OpenBSD.
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.
 1.1.22.1 18-Feb-2012  mrg merge to -current.
 1.1.18.1 17-Apr-2012  yamt sync with head
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 21-Apr-2009  jym file pxa2x0_mci.h was added on branch jym-xensuspend on 2009-05-13 17:16:19 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 21-Apr-2009  yamt file pxa2x0_mci.h was added on branch yamt-nfs-mp on 2009-05-04 08:10:45 +0000
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 21-Apr-2009  skrll file pxa2x0_mci.h was added on branch nick-hppapmap on 2009-04-28 07:33:46 +0000
 1.14 31-Mar-2025  riastradh ohci(4): Rework detach logic and justify the ordering.

Handle failed attach when we detach.

This changes the signature of the ohci_detach function, but it is
only ever used by statically linked ohci bus attachments, never by
modules so far, so no kernel revbump.

PR port-amd64/59180: System reboots instead of shutting down
 1.13 07-Aug-2021  thorpej branches: 1.13.12;
Merge thorpej-cfargs2.
 1.12 24-Apr-2021  thorpej branches: 1.12.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.11 09-Apr-2018  jakllsch branches: 1.11.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.10 23-Apr-2016  skrll branches: 1.10.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.9 27-Oct-2012  chs branches: 1.9.12; 1.9.14; 1.9.18;
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 10-Aug-2009  kiyohara Remove unused variable powman_ioh.
It is used in GUMSTIX ohci patch.
 1.6 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.5 29-Jan-2009  nonaka fix compiler failure.
 1.4 29-Jan-2009  nonaka need newline.
> ohci0 at pxaip0 addr 0x40d00000-0x40d0000fohci0: OHCI version 1.0
 1.3 04-Apr-2008  drochner branches: 1.3.4; 1.3.12;
add some missing softc initialisation necessary after the device/softc
split, approved by Chris Gilbert
 1.2 31-Mar-2008  chris Update pxa2x0 ohci support to match recent device_t/softc splitting on
ohci.

Also remove powerhooks (eventually it'll be pmf'd)

This is enough for host usb to work sometimes on a zaurus.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.52;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.52.2 02-Jun-2008  mjf Sync with HEAD.
 1.1.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_ohci.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_ohci.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_ohci.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.12.1 03-Mar-2009  skrll Sync with HEAD.
 1.3.4.2 19-Aug-2009  yamt sync with head.
 1.3.4.1 04-May-2009  yamt sync with head.
 1.8.12.2 03-Dec-2017  jdolecek update from HEAD
 1.8.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.2.1 30-Oct-2012  yamt sync with head
 1.9.18.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.9.14.2 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.9.14.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.9.12.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.10.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.11.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.12.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.13.12.1 02-Aug-2025  perseant Sync with HEAD
 1.15 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.14 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.13 24-Apr-2021  thorpej branches: 1.13.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.12 13-Oct-2013  riz branches: 1.12.44;
Catch up to recent changes in config_pending_{incr,decr}().
 1.11 27-Oct-2012  chs branches: 1.11.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.10 26-Jul-2011  dyoung branches: 1.10.2; 1.10.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.9 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.8 02-Mar-2009  nonaka Add missing config_pending_incr()/config_pending_incr().
 1.7 27-Feb-2009  nonaka Fix for the display of attach not to mix.

Before:
atabus0 at wdc0 channel 0
wd0 at atabus0 drive 0uhub0 at usb0: PXA27x OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
: <SILICON POWER>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 7775 MB, 15798 cyl, 16 head, 63 sec, 512 bytes/sect x 15924384 sectors
wd0: drive supports PIO mode 4

After:
uhub0 at usb0: PXA27x OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
atabus0 at wdc0 channel 0
wdc1 at pcmcia1 function 0: <128MB, >
wdc1: i/o mapped mode
wd0 at atabus0 drive 0: <SILICON POWER>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 7775 MB, 15798 cyl, 16 head, 63 sec, 512 bytes/sect x 15924384 sectors
wd0: drive supports PIO mode 4
 1.6 12-Feb-2009  nonaka Processing that installed the card first was moved from pxapcic_attach_common()
to the head of pxapcic_event_thread().
As a result, the problem that built-in CF card is not detected is solved.
This problem occurred because of the fix of kern/40531.
 1.5 29-Jan-2009  nonaka branches: 1.5.2;
- device_t/softc split.
- use aprint_* function.
 1.4 17-Oct-2007  garbled branches: 1.4.20; 1.4.28; 1.4.30;
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.3 09-Jul-2007  ad branches: 1.3.10; 1.3.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.2 04-Mar-2007  christos branches: 1.2.2; 1.2.4; 1.2.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_pcic.c was added on branch newlock2 on 2007-01-12 01:00:42 +0000
 1.1.4.3 03-Sep-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_pcic.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_pcic.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.10.1 03-Oct-2007  garbled Sync with HEAD
 1.2.4.1 11-Jul-2007  mjf Sync with head.
 1.2.2.1 15-Jul-2007  ad Sync with head.
 1.3.12.1 06-Nov-2007  matt sync with HEAD
 1.3.10.1 01-Jan-2008  chris Sync with HEAD.
 1.4.30.1 19-Feb-2009  snj Pull up following revision(s) (requested by nonaka in ticket #457):
sys/arch/arm/xscale/pxa2x0_pcic.c: revision 1.6
Processing that installed the card first was moved from pxapcic_attach_common()
to the head of pxapcic_event_thread().
As a result, the problem that built-in CF card is not detected is solved.
This problem occurred because of the fix of kern/40531.
 1.4.28.1 03-Mar-2009  skrll Sync with HEAD.
 1.4.20.1 04-May-2009  yamt sync with head.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.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.10.2.1 30-Oct-2012  yamt sync with head
 1.11.2.1 18-May-2014  rmind sync with head
 1.12.44.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.13.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 29-Jan-2009  nonaka branches: 1.4.14; 1.4.24;
- device_t/softc split.
- use aprint_* function.
 1.3 17-Oct-2007  garbled branches: 1.3.20; 1.3.28;
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.2 10-Jul-2007  nonaka branches: 1.2.10; 1.2.12;
Fix compile failure occured kthread API changes.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12; 1.1.14; 1.1.20;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.20.1 03-Oct-2007  garbled Sync with HEAD
 1.1.14.1 11-Jul-2007  mjf Sync with head.
 1.1.12.1 15-Jul-2007  ad Sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_pcic.h was added on branch newlock2 on 2007-01-12 01:00:43 +0000
 1.1.4.3 03-Sep-2007  yamt sync with head.
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_pcic.h was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_pcic.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.2.12.1 06-Nov-2007  matt sync with HEAD
 1.2.10.1 01-Jan-2008  chris Sync with HEAD.
 1.3.28.1 03-Mar-2009  skrll Sync with HEAD.
 1.3.20.1 04-May-2009  yamt sync with head.
 1.4.24.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.14.1 30-Oct-2012  yamt sync with head
 1.2 18-Dec-2006  nonaka Remove unused files.
 1.1 17-Dec-2006  peter branches: 1.1.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.2.3 21-Dec-2006  yamt sync with head.
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_pcicvar.h was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.9 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.8 24-Feb-2024  andvar Declare dt variable in PXARTC_DEBUG guarded blocks, since declarations were
removed in general one (likely as unused).

Fix dt.dt_year format specifier from %02d to expected %02lld.

Pass ch (todr_chip_handle_t), not sc (pxartc_softc) to rtc_wristwatch_gettime().

Fixes PXARTC_DEBUG enabled build (tested on zaurus).
 1.7 02-Jan-2020  thorpej In the wristwatch case, use todr_gettime_ymdhms / todr_settime_ymdhms.
 1.6 27-Oct-2012  chs branches: 1.6.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 14-May-2011  nonaka - Only when pxa_size isn't set, pxa_size is set.
- Split device_t/softc.
 1.3 12-Dec-2009  tsutsui branches: 1.3.4; 1.3.6;
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
 1.2 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.1 25-Feb-2007  nonaka branches: 1.1.2; 1.1.6; 1.1.52;
Add PXA2x0 RTC driver.
 1.1.52.2 11-Mar-2010  yamt sync with head
 1.1.52.1 19-Aug-2009  yamt sync with head.
 1.1.6.2 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.6.1 25-Feb-2007  yamt file pxa2x0_rtc.c was added on branch yamt-idlelwp on 2007-02-27 16:49:41 +0000
 1.1.2.2 26-Feb-2007  yamt sync with head.
 1.1.2.1 25-Feb-2007  yamt file pxa2x0_rtc.c was added on branch yamt-lazymbuf on 2007-02-26 09:06:07 +0000
 1.3.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.4.1 31-May-2011  rmind sync with head
 1.5.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 30-Oct-2012  yamt sync with head
 1.6.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.14 21-Apr-2023  skrll Trailing whitespace
 1.13 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.12 24-Feb-2014  msaitoh branches: 1.12.28;
Remove unused variable. Fixes compile error.
 1.11 22-Feb-2014  matt Don't manipulate the pte to get uncached memory, use PMAP_NOCACHE instead.
Convert footbring to kenter_pa/kremove
 1.10 01-Jul-2011  dyoung branches: 1.10.2; 1.10.12; 1.10.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9 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.8 24-Nov-2005  yamt branches: 1.8.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.7 01-Apr-2005  yamt branches: 1.7.2; 1.7.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.6 17-Mar-2005  bsh Switch kernels for Lubbock and TwinTail to use pmap_devmap to map
I/O registers that are used in early start-up stage. Also stop using
special bootstrap-time-only bus_space_map function in {lubbock,g42xxeb}_machdep.c.

This makes initarm() for them a bit simpler, and gives us smaller diffs
to other evbarm platforms.
 1.5 07-Jun-2004  nathanw branches: 1.5.4; 1.5.6;
pxa2x0_bs_unmap(): KVA allocated in pxa2x0_bs_map() needs to be freed.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 06-Jun-2003  scw branches: 1.3.2;
Add entries for byte-wide {read,write,set} region.
 1.2 24-Mar-2003  bsh + fix a crash when write-back cache is used, by calling PTE_SYNC()
after tweaking page table entry.

+ 4th argument of bus_space_map() is not only for BUS_SPACE_MAP_CACHEABLE.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0_space.c was added on branch nathanw_sa on 2002-11-11 21:57:02 +0000
 1.3.2.5 11-Dec-2005  christos Sync with head.
 1.3.2.4 01-Apr-2005  skrll Sync with HEAD.
 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.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.6.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.5.4.1 29-Apr-2005  kent sync with -current
 1.7.8.1 29-Nov-2005  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.8.80.1 11-Mar-2010  yamt sync with head
 1.10.16.1 18-May-2014  rmind sync with head
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.28.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.4 09-Jun-2011  nonaka - device_t/softc split.
- use aprint_* function.
 1.3 09-Aug-2009  kiyohara branches: 1.3.4; 1.3.10;
Remove GPIO configuration for board dependently.
 1.2 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.1 17-Dec-2006  peter branches: 1.1.2; 1.1.4; 1.1.6; 1.1.56;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.1.56.1 19-Aug-2009  yamt sync with head.
 1.1.6.2 12-Jan-2007  ad Sync with head.
 1.1.6.1 17-Dec-2006  ad file pxa2x0_udc.c was added on branch newlock2 on 2007-01-12 01:00:43 +0000
 1.1.4.2 30-Dec-2006  yamt sync with head.
 1.1.4.1 17-Dec-2006  yamt file pxa2x0_udc.c was added on branch yamt-lazymbuf on 2006-12-30 20:45:38 +0000
 1.1.2.2 18-Dec-2006  yamt sync with head.
 1.1.2.1 17-Dec-2006  yamt file pxa2x0_udc.c was added on branch yamt-splraiseipl on 2006-12-18 11:42:04 +0000
 1.3.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.4.1 12-Jun-2011  rmind sync with head
 1.4 25-Feb-2007  nonaka Add PXA2x0 RTC driver.
 1.3 17-Dec-2006  peter branches: 1.3.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.2 11-Dec-2005  christos branches: 1.2.20; 1.2.22;
merge ktrace-lwp.
 1.1 04-Jul-2005  bsh branches: 1.1.2; 1.1.8;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.1.8.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.1 04-Jul-2005  skrll file pxa2x0cpu.h was added on branch ktrace-lwp on 2005-11-10 13:55:27 +0000
 1.1.2.2 26-Feb-2007  yamt sync with head.
 1.1.2.1 30-Dec-2006  yamt sync with head.
 1.2.22.1 18-Dec-2006  yamt sync with head.
 1.2.20.1 12-Jan-2007  ad Sync with head.
 1.3.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.28 09-Dec-2024  andvar s/autio/audio/ in comment.
 1.27 10-Feb-2024  andvar branches: 1.27.2;
fix various typos in comments and log messages.
 1.26 26-Dec-2021  andvar fix various typos, mainly in comments.
 1.25 05-Dec-2021  msaitoh s/stauts/status/
 1.24 10-Nov-2021  msaitoh s/Asychronous/Asynchronous/ in comment.
 1.23 23-Jun-2011  kiyohara Fix bit name ISR_UB. Not _UE.
And add comments for bit names from datasheet of PXA255.
 1.22 18-Jun-2011  nonaka Added some I2C register definition.
 1.21 15-May-2010  kiyohara branches: 1.21.6;
Add definitions for Power Manager Registers.
Add some fields for USBHC_UHCRHDB.
 1.20 11-May-2010  nonaka Add SSP SSSR register definitions.
 1.19 11-May-2010  nonaka Added some CKEN_* definition for pxa270.
 1.18 16-Mar-2009  nonaka branches: 1.18.2; 1.18.4;
Added DMA Alignment register definition.
 1.17 17-Oct-2007  garbled branches: 1.17.20; 1.17.28; 1.17.34;
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.16 28-Jun-2007  nonaka branches: 1.16.10; 1.16.12;
Added more LCD Controller register definition.
 1.15 26-Jun-2007  nonaka fix typo.
 1.14 25-Feb-2007  nonaka branches: 1.14.4; 1.14.6; 1.14.12;
Add PXA2x0 RTC driver.
 1.13 17-Dec-2006  peter branches: 1.13.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.12 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.11 10-Dec-2006  kiyohara Add definition the HWUART (and NSSP).
 1.10 25-Nov-2006  christos spell precede; from Zafer
 1.9 10-Apr-2006  simonb branches: 1.9.8; 1.9.10;
Fix a couple of typos in some comments.
 1.8 08-Mar-2006  lukem branches: 1.8.2;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10;
merge ktrace-lwp.
 1.6 04-Jul-2005  bsh branches: 1.6.2;
add register definitions for PXA270, including those for USB host controller.

rename some constants from PXA2X0_* to PXA2[57]0_* since they have different values for PXA270.
 1.5 24-Sep-2004  nathanw PXA255 has 85 GPIO pins, not 81.
(The first revision of the manual listed the wrong number, although it had
all 85 in the table).
 1.4 11-Jun-2003  scw branches: 1.4.2;
- Correct a couple of comments.
- Set AC97_MODR to the right value.
- Add AC97_FEFIE.
 1.3 05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2 18-Mar-2003  bsh add interrupt numbers for built-in peripherals.
add register definitions for DMA, AC97, and USB.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0reg.h was added on branch nathanw_sa on 2002-11-11 21:57:02 +0000
 1.4.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.1 19-Oct-2004  skrll Sync with HEAD
 1.6.2.4 03-Sep-2007  yamt sync with head.
 1.6.2.3 26-Feb-2007  yamt sync with head.
 1.6.2.2 30-Dec-2006  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.7.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.7.8.2 11-Apr-2006  yamt sync with head
 1.7.8.1 13-Mar-2006  yamt sync with head.
 1.7.6.1 22-Apr-2006  simonb Sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.2 18-Dec-2006  yamt sync with head.
 1.9.10.1 10-Dec-2006  yamt sync with head.
 1.9.8.1 12-Jan-2007  ad Sync with head.
 1.13.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.14.12.2 03-Oct-2007  garbled Sync with HEAD
 1.14.12.1 26-Jun-2007  garbled Sync with HEAD.
 1.14.6.1 11-Jul-2007  mjf Sync with head.
 1.14.4.1 15-Jul-2007  ad Sync with head.
 1.16.12.1 06-Nov-2007  matt sync with HEAD
 1.16.10.1 01-Jan-2008  chris Sync with HEAD.
 1.17.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.17.20.2 11-Aug-2010  yamt sync with head.
 1.17.20.1 04-May-2009  yamt sync with head.
 1.18.4.1 30-May-2010  rmind sync with head
 1.18.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.27.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 09-Aug-2009  kiyohara Fix matching by improper driver.
see http://mail-index.netbsd.org/port-arm/2009/07/08/msg000807.html

And remove some white-spaces.
 1.5 21-Feb-2007  thorpej branches: 1.5.48;
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.4 17-Dec-2006  peter branches: 1.4.2;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.3 16-Dec-2006  ober Zaurus Port from OpenBSD by Nonaka Kimihiro
OK gimpy
 1.2 05-Jun-2003  scw branches: 1.2.18; 1.2.48; 1.2.50;
- Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.1 19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 19-Oct-2002  nathanw file pxa2x0var.h was added on branch nathanw_sa on 2002-11-11 21:57:03 +0000
 1.2.50.1 18-Dec-2006  yamt sync with head.
 1.2.48.1 12-Jan-2007  ad Sync with head.
 1.2.18.2 26-Feb-2007  yamt sync with head.
 1.2.18.1 30-Dec-2006  yamt sync with head.
 1.4.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.5.48.1 19-Aug-2009  yamt sync with head.
 1.14 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.13 16-Apr-2009  rmind branches: 1.13.62; 1.13.64;
- Manage pid_table with kmem(9).
- Remove M_PROC and unused M_SESSION.
 1.12 17-Oct-2007  garbled branches: 1.12.20; 1.12.28; 1.12.34;
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.11 09-Oct-2007  ad splstatclock -> splhigh
 1.10 17-May-2006  mrg branches: 1.10.18; 1.10.26; 1.10.34; 1.10.36; 1.10.38; 1.10.40; 1.10.42;
make xscale_pmnc_write() return void, rather than returning an
uninitialised value that is not used by any caller.
 1.9 24-Dec-2005  perry branches: 1.9.4; 1.9.6; 1.9.8; 1.9.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 28-Oct-2003  chs branches: 1.7.16;
uninitialized variable.
 1.6 17-Jan-2003  thorpej branches: 1.6.2;
Merge the nathanw_sa branch.
 1.5 08-Oct-2002  thorpej Move XScale common prototypes to xscalevar.h. Add xscale_pmc_dispatch()
prototype. Include xscalevar.h has necessary to being prototypes into
scope.
 1.4 09-Aug-2002  thorpej branches: 1.4.2; 1.4.4; 1.4.6;
* PMC_TYPE_I80200 -> PMC_CLASS_I80200 to reflect the terminology
used in pmc(3).
* Some minor namespace cleanup.
 1.3 08-Aug-2002  briggs When configuring a counter, do not assume that it's not been configured in
this process (mask off the register field before setting it).
 1.2 07-Aug-2002  thorpej * XSCALE_PMC_TYPE_I80200 -> PMC_TYPE_I80200
* XSCALE_PMC_TYPE_CCNT -> PMC_TYPE_I80200_CCNT
* XSCALE_PMC_TYPE_PMCx -> PMC_TYPE_I80200_PMCx

Per discussion with Allen Briggs.
 1.1 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.4.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.6.1 09-Aug-2002  jdolecek file xscale_pmc.c was added on branch kqueue on 2002-09-06 08:33:15 +0000
 1.4.4.2 30-Aug-2002  gehenna catch up with -current.
 1.4.4.1 09-Aug-2002  gehenna file xscale_pmc.c was added on branch gehenna-devsw on 2002-08-30 00:19:21 +0000
 1.4.2.4 31-Dec-2002  thorpej Tidy up use of curproc in the LWP universe.
 1.4.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.4.2.1 09-Aug-2002  nathanw file xscale_pmc.c was added on branch nathanw_sa on 2002-08-13 02:18:00 +0000
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.2 27-Oct-2007  yamt sync with head.
 1.7.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.8.1 24-May-2006  yamt sync with head.
 1.9.6.1 01-Jun-2006  kardel Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.42.1 14-Oct-2007  yamt sync with head.
 1.10.40.1 06-Nov-2007  matt sync with HEAD
 1.10.38.1 01-Jan-2008  chris Sync with HEAD.
 1.10.36.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.10.34.1 01-Nov-2007  rjs Sync with HEAD.
 1.10.26.1 16-Oct-2007  garbled Sync with HEAD
 1.10.18.1 19-Oct-2007  ad Sync with head.
 1.12.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.12.20.1 04-May-2009  yamt sync with head.
 1.13.64.1 10-Jun-2019  christos Sync with HEAD
 1.13.62.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1 26-Mar-2002  thorpej branches: 1.1.2; 1.1.4; 1.1.8;
Restructure a few things in order to support other XScale core
I/O processors:
* The i80200 and the i80321 have the same CPU ID, so split the
CPU_XSCALE option into CPU_XSCALE_80200 and CPU_XSCALE_80321
options, and don't let them both be defined at the same time.
XXX May want to revisit this in the future.
* Split some registers common between the i80200 and i80321 into
<arm/xscale/xscalereg.h>.
* Rename a few existing functions.
 1.1.8.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 26-Mar-2002  jdolecek file xscalereg.h was added on branch kqueue on 2002-06-23 17:34:59 +0000
 1.1.4.1 30-Aug-2002  gehenna catch up with -current.
 1.1.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 26-Mar-2002  nathanw file xscalereg.h was added on branch nathanw_sa on 2002-04-01 07:39:17 +0000
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.1 08-Oct-2002  thorpej branches: 1.1.2; 1.1.202; 1.1.204;
Move XScale common prototypes to xscalevar.h. Add xscale_pmc_dispatch()
prototype. Include xscalevar.h has necessary to being prototypes into
scope.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.1 08-Oct-2002  nathanw file xscalevar.h was added on branch nathanw_sa on 2002-10-18 02:35:45 +0000

RSS XML Feed