summaryrefslogtreecommitdiff
path: root/sys/arch/arm/broadcom
AgeCommit message (Collapse)Author
2023-04-30codec translates to 16bit slinear_le, not the internal format.mlelstv
2023-04-21Trailing whitespaceskrll
2023-04-07Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm.skrll
2022-11-19bcm2835_intr.c: fix !MULTIPROCESSORyamt
Tested on Raspberry PI 3 model A+.
2022-10-15Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappingsjmcneill
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
2022-09-17Eliminate use of IFF_OACTIVE.thorpej
2022-06-25pic: Update ci_cpl in pic_set_priority callback.jmcneill
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.
2022-05-07Remove unnecessary gotos and label. Same code before and after.skrll
2022-04-22Remove stale commentskrll
2022-03-24s/interupt/interrupt/ in comments.andvar
also add missing RCS ID in bcm53xx_reg.h and fix one more typo in there.
2022-03-19rnd(9): Omit needless locks in various HWRNG drivers.riastradh
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.)
2022-03-19rnd(9): Adjust IPL of locks used by rndsource callbacks.riastradh
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.
2022-03-03arm: Use device_set_private for various drivers.riastradh
2022-02-06sdhc: Retire SDHC_FLAG_USE_ADMA2 flag.jmcneill
ADMA2 support in sdhc is mature now, so no need for it to be opt-in.
2022-01-17Pass the controller devhandle along to the GPIO layer.thorpej
2021-10-31Rework Arm (32bit and 64bit) AP startup so that cpu_hatch doesn't sleep.skrll
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
2021-09-19fix various typos in comments, messages and documentation.andvar
2021-09-12Fix build for uniprocessor.nat
2021-09-01Install IPI handler with non-NULL context.jmcneill
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!
2021-09-01PR port-arm/56264rin
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).
2021-08-21fix mainly same typos as in my previous commit but outside sys/dev/dm.andvar
2021-08-08Adjust register base and sizejmcneill
2021-08-08broadcom: ACPI: Add support for mini UART in ACPI mode.jmcneill
2021-08-08disable DMA for now...jmcneill
2021-08-08bcm2838: Add ACPI support for the EMMC2 SDHCI controller.jmcneill
2021-08-07Merge thorpej-cfargs2.thorpej
2021-07-24Fix all remaining typos, mainly in comments but also in few definitions and ↵andvar
log messages, reported by me in PR kern/54889. Also fixed some additional typos in comments, found on review of same files or typos.
2021-06-16if_attach and if_initialize cannot fail, don't test return valueriastradh
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.
2021-05-12Pass along our device handle to the PCI bus instance we attach.thorpej
2021-05-03bcm2838_pcie: match brcm,bcm2711-pcietnn
2021-04-24Merge thorpej-cfargs branch:thorpej
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?).
2021-03-10Add PCIe driver to build.mlelstv
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__
2021-03-08Add comments for 2711 local peripheralsmlelstv
2021-03-08Move interrupt register definitions to driver.mlelstv
2021-03-08Undocumented register to multiplex emmc2 pins to legacy sdhcmlelstv
2021-03-08RPI4 PCIe driver, based on pcihost_fdt.cmlelstv
2021-02-04Call acpi_device_register() / fdtbus_device_register() as approrpriate.thorpej
2021-01-29fdtbus_intr_establish -> fdtbus_intr_establish_xnameskrll
2021-01-27vcaudio: Do not report recording mode in hardware formatnia
2021-01-27Rename of_match_compat_data() to of_compatible_match(). Similarly,thorpej
rename of_search_compatible() to of_compatible_lookup(). Standardize on of_compatible_match() for driver matching, and adapt all call sites.
2021-01-26Add a device_t parameter to acpi_enter_i2c_devs. If non-NULL, all childjmcneill
acpi_devnodes will be claimed by that device so we don't later try to attach a duplicate device to that node at acpinodebus.
2021-01-25Since we're using designated initialisers for compat data, we shouldthorpej
use a completely empty initializer for the sentinel.
2021-01-23vcaudio: don't advertise CAPTURE when all functions return EINVALnia
2021-01-19Use device_compatible_entry / of_search_compatible() rather thanthorpej
matching against multiple sets of compatibility strings.
2021-01-18Remove "struct of_compat_data" and replace its usage withthorpej
"struct device_compatible_entry"; they are ABI-compatible. Fix several "loses const qualifier" bugs encountered during this conversion.
2021-01-15Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establishjmcneill
2020-12-23Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,thorpej
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.
2020-12-23Add missing call to fdtbus_register_i2c_controller(). This doesn'tthorpej
affect basic child attachment, but would have broken other references to the i2c controller in DT overlays.
2020-12-16interupt -> interruptchristos
2020-12-01bcm2835-fb seems byte-swapped to CPU when running in big-endian mode.rin