aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/xilinx
Commit message (Collapse)AuthorAgeFilesLines
* gpio: remove gpiobus_attach_busAhmad Khalifa2025-08-131-1/+2
| | | | | | | | | | | | Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-116-6/+6
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* Use bus_generic_detach instead of device_delete_children in detachJohn Baldwin2025-01-021-1/+4
| | | | | | | While here, check for errors from bus_generic_detach and move it to the start of detach if necessary. Differential Revision: https://reviews.freebsd.org/D47969
* Check for errors from bus_generic_detach in various driversJohn Baldwin2025-01-024-8/+17
| | | | | | | | In some cases, move the call to bus_generic_detach earlier so that any detach failures from child devices do not leave the parent device partially detached. Differential Revision: https://reviews.freebsd.org/D47966
* bus_generic_detach: Delete children after detaching themJohn Baldwin2025-01-022-8/+0
| | | | | | | | | | | | | | | | | This provides better semantics as a standalone DEVMETHOD for device_attach as bus drivers should remove child devices they created as part of detach cleanup. The implementation calls bus_detach_children() first to permit child devices an opportunity to veto the detach operation. If that succeeds, device_delete_children() is used to delete the child devices. This requires fixing various drivers that were deleting devices explicitly (via a device_t pointer cached in the softc) after calling bus_generic_detach to stop doing that and just rely on bus_generic_detach to remove child devices. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47959
* Use bus_delayed_attach_children instead of its inline implementationJohn Baldwin2024-10-212-2/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47186
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-253-3/+3
| | | | Sponsored by: Netflix
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-279-9/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1610-19/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1610-20/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* arm64: xilinx: gpio: Add support for ZynqMP SoCEmmanuel Vadot2023-08-101-39/+101
| | | | | | | | | Add support for the gpio controller found in the ZynqMP SoC. The registers are the same as the Zynq 7000, just the number of banks/pins per banks differs. Sponsored by: Beckhoff Automation GmbH & Co. KG MFC after: 2 weeks
* arm: xilinx: gpio: Make the driver more genericEmmanuel Vadot2023-08-101-27/+93
| | | | | | | | | | All other Zynq SoCs have the same GPIO controller, the only difference is the number of banks/pins so make this driver more generic to add other SoCs more easily. No functional changes intended. Sponsored by: Beckhoff Automation GmbH & Co. KG MFC after: 2 weeks
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1210-10/+10
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* xilinx: Fix a typo in a source code commentGordon Bergling2022-11-011-1/+1
| | | | | | - s/interrut/interrupt/ MFC after: 3 days
* arm xilinx: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-096-14/+6
|
* Remove unused spibus_devclass and ofw_spibus_devclass.John Baldwin2022-05-092-2/+2
|
* arm: clean up empty lines in .c and .h filesMateusz Guzik2020-09-017-32/+6
| | | | Notes: svn path=/head/; revision=365068
* Bring in support for single core Zynq devices. Turns out that realJohn-Mark Gurney2020-05-212-123/+173
| | | | | | | | | | | | | | | hardware, the registers appear like there's two cores, but the second core does not work, so base the number of cores upon the chip id. Tested on a XC7Z007S. also, previous commit was suppose to be D14429. Submitted by: Thomas Skibo Differential Revision: https://reviews.freebsd.org/D14429 Notes: svn path=/head/; revision=361326
* minor cleanup of white space, and function name in panic...John-Mark Gurney2020-05-211-4/+4
| | | | | | | | | | | This is a partial commit of the review. Submitted by: Thomas Skibo Differential Revision: https://reviews.freebsd.org/D23319 Reviewed by: andrew Notes: svn path=/head/; revision=361325
* Add the Cadence GEM ethernet driver to NOTES so that it gets built withIan Lepore2020-04-021-1/+0
| | | | | | | | LINT kernels. Move the config for it from files.<arch> files into the main config (conf/files), because it works on multiple platforms now. Notes: svn path=/head/; revision=359574
* arm: zynq: An SPI driver for Zynq platformsEmmanuel Vadot2020-02-282-0/+607
| | | | | | | | Submitted by: Thomas Skibo Differential Revision: https://reviews.freebsd.org/D23319 Notes: svn path=/head/; revision=358426
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-262-12/+15
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* zilinx/zy7_qspi: Add a qspi driver for Zynq platforms.Emmanuel Vadot2020-01-192-0/+764
| | | | | | | | | | | | This is a qspi driver for the Xilinx Zynq-7000 chip. It could be useful for anyone wanting to boot a system from flash memory instead of SD cards. Submitted by: Thomas Skibo (thomasskibo@yahoo.com) Differential Revision: https://reviews.freebsd.org/D14698 Notes: svn path=/head/; revision=356895
* Regularize my copyright noticeWarner Losh2019-12-041-4/+3
| | | | | | | | | | | | o Remove All Rights Reserved from my notices o imp@FreeBSD.org everywhere o regularize punctiation, eliminate date ranges o Make sure that it's clear that I don't claim All Rights reserved by listing All Rights Reserved on same line as other copyright holders (but not me). Other such holders are also listed last where it's clear. Notes: svn path=/head/; revision=355394
* Remove more needless <sys/tty.h> includesKyle Evans2019-12-011-1/+0
| | | | | | | | | As part of my journey to make it easy to determine what's relying on tty bits, remove a couple more. Some of these just outright didn't need it, while others did rely on <sys/tty.h> pollution for mutex headers. Notes: svn path=/head/; revision=355271
* arm: Add kern_clocksource.c directly in files.armEmmanuel Vadot2019-04-161-2/+0
| | | | | | | | | | This files is needed and included in all our config so move it to a common location. MFC after: 2 weeks Notes: svn path=/head/; revision=346295
* Remove IPI_IRQ_START and IPI_IRQ_END from the arm kernel config files.Andrew Turner2018-07-281-3/+0
| | | | | | | These are unneeded with INTRNG. Notes: svn path=/head/; revision=336804
* Enable UART support for Xilinx Ultrascale+ SoCsMarcin Wojtas2018-07-131-0/+2
| | | | | | | | | | | Xilinx Ultrascale+ are based on Cortex-A53 and use existing UART driver (uart_dev_cdnc). Enable it in arm64 GENERIC config. Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf Notes: svn path=/head/; revision=336259
* arm: Fix duplicate ehci DRIVER_MODULEEmmanuel Vadot2018-04-271-2/+2
| | | | | | | | | Name each ehci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ehci from kernel; already loaded from kernel Notes: svn path=/head/; revision=333074
* Fix accidental USB port resets by GPIO on Zynq/Zedboard boardsOleksandr Tymoshenko2018-04-031-21/+0
| | | | | | | | | | | | | | | | | | | | The Zynq/Zedboard GPIO driver attempts to tri-state all GPIO pins on boot up but the order in which I reset the hardware can cause the pins to be briefly held low before being tri-stated. This is a problem on boards that use GPIO pins to reset devices. In particular, the Zybo and ZC-706 boards use a GPIO pin as a USB PHY reset. If U-boot enables the USB port before booting the kernel, the GPIO driver attach causes a glitch on the USB PHY reset and the USB port loses power. My fix is to have the GPIO driver leave the pins in whatever configuration U-boot placed them. PR: 225713 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com> MFC after: 1 week Notes: svn path=/head/; revision=331906
* o Move sdhci_fdt to the generic files list.Ruslan Bukin2018-01-251-1/+0
| | | | | | | | | o Include Qualcomm EHCI and UART drivers to the build. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=328404
* Make kernel option KERNVIRTADDR optional, remove it from std.<platform>Ian Lepore2017-12-301-3/+0
| | | | | | | | | | | | | | | | | | | files that can use the default value. It used to be required that the low-order bits of KERNVIRTADDR matched the low-order bits of the physical load address for all arm platforms. That hasn't been a requirement for armv6 platforms since FreeBSD 10. There is no longer any relationship between load addr and KERNVIRTADDR except that both must be aligned to a 2 MiB boundary. This change makes the default KERNVIRTADDR value 0xc0000000, and removes the options from all the platforms that can use the default value. The default is now defined in vmparam.h, and that file is now included in a few new places that reference KERNVIRTADDR, since it may not come in via the forced-include of opt_global.h on the compile command line. Notes: svn path=/head/; revision=327367
* Revert r327250 as it broke the build for some armv6 kernel and all armv4/5Emmanuel Vadot2017-12-281-0/+2
| | | | | | | Reported by: ian Notes: svn path=/head/; revision=327280
* arm: Add kern/kern_clocksource.c to files.armEmmanuel Vadot2017-12-271-2/+0
| | | | | | | Instead of adding it to every files.vendor, add it to the common arch file. Notes: svn path=/head/; revision=327250
* sys/arm: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-279-0/+18
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326258
* Tag all armv7 kernels as such in their machine config line.Warner Losh2017-10-051-1/+1
| | | | | | | | | | | | | | Transition all boards that support arm cortex CPUs to armv7. This leaves two armv6 kernels in the tree. RPI-B, which uses the BCM2835 which has a ARM1176 core, and VERSATILEPB, which is a qemu board setup around the time RPI-B went in. Copy std.armv6 to std.armv7, even though that duplicates a lot of stuff. More work needs to be done to sort out the duplication. Differential Revision: https://reviews.freebsd.org/D12027 Notes: svn path=/head/; revision=324341
* Add external PLATFORM access on arm, and use it in the pl310 driver.Andrew Turner2017-07-113-13/+11
| | | | | | | | | | | | | | | | | | This allows multiple instances of SoCs that use the pl310 driver to be built within the same kernel: * Add access to the platform_t object from outside platform.c * Use this with the pl310 driver There is a new platform_pl310 interface to replace the existing code. SoCs need to implement the init method, and if they have special requirements to write to the two registers we care about will also need to implement the write_ctrl and write_debug methods. Differential Revision: https://reviews.freebsd.org/D11546 Notes: svn path=/head/; revision=320894
* Start to move the arm *_mp.h to be names *_machdep.h. These will be usedAndrew Turner2017-07-103-5/+5
| | | | | | | | by the reworked pl310 driver interface in https://reviews.freebsd.org/D11546 Notes: svn path=/head/; revision=320873
* Add a delay count to the last few places. This will help make MULTIDELAYAndrew Turner2017-07-041-1/+1
| | | | | | | a requirement on armv6 with PLATFORM. Notes: svn path=/head/; revision=320648
* Port the Xilinx code to use PLATFORM and PLATFORM_SMP. This will help moveAndrew Turner2017-06-033-29/+64
| | | | | | | it to be part of the armv6 GENERIC kernel. Notes: svn path=/head/; revision=319552
* Remake support for SMP kernel on UP cpu:Michal Meloun2017-02-021-1/+1
| | | | | | | | | | | | | | | | | - Use new option SMP_ON_UP instead of (mis)using specific CPU type. By this, any SMP kernel can be compiled with SMP_ON_UP support. - Enable runtime detection of CPU multiprocessor extensions only if SMP_ON_UP option is used. In other cases (pure SMP or UP), statically compile only required variant. - Don't leak multiprocessor instructions to UP kernel. - Correctly handle data cache write back to point of unification. DCCMVAU is supported on all armv7 cpus. - For SMP_ON_UP kernels, detect proper TTB flags on runtime. Differential Revision: https://reviews.freebsd.org/D9133 Notes: svn path=/head/; revision=313090
* [zynq] Fix panic on USB PHY initialization failureOleksandr Tymoshenko2017-01-171-6/+3
| | | | | | | | | | | | The Zedboard has a hardware bug where initialization of the USB PHY occasionally fails on boot-up. Fix regression in -CURRENT when kernel panics on such occasion. 11-RELEASE branch works fine PR: 215862 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com> Notes: svn path=/head/; revision=312316
* Add the missing void to function signatures in much of the arm code.Andrew Turner2016-12-132-4/+4
| | | | | | | Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=310021
* Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to readAndrew Turner2016-11-141-3/+2
| | | | | | | | | integer data from the device tree. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308640
* Stop including fdt_common.h from the arm code when it's unneeded.Andrew Turner2016-11-144-5/+0
| | | | | | | Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308638
* Remove more unneeded users of the fdt_pic_decode_t table.Andrew Turner2016-11-111-23/+0
| | | | | | | Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308525
* Fix device delete child function.Hans Petter Selasky2016-10-171-7/+4
| | | | | | | | | | | | | | | | | | | | | | | When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070 MFC after: 2 weeks Notes: svn path=/head/; revision=307518
* ARM: SEV/WFE instructions are implemented starting from ARMv6K,Michal Meloun2016-10-061-1/+2
| | | | | | | | | use it directly. MFC after: 1 week Notes: svn path=/head/; revision=306756
* Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP,Andrew Turner2016-10-041-1/+1
| | | | | | | | | | | | | | for later Cortex-A CPUs that support the Multiprocessor Extensions. This will be needed to support both in a single GENERIC kernel while still being able to only build for a single SoC. Reviewed by: mmel Relnotes: yes Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8138 Notes: svn path=/head/; revision=306672