Home | History | Annotate | only in /src/sys/arch/arm/broadcom
History log of /src/sys/arch/arm/broadcom
RevisionDateAuthorComments
 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

RSS XML Feed