aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/annapurna/alpine
Commit message (Collapse)AuthorAgeFilesLines
* Restore #include <sys/devmap.h>Oskar Holmlund2025-05-291-0/+1
| | | | | | | | | Partial revert https://reviews.freebsd.org/D50017 These files still use devmap_add_entry() and needs sys/devmap.h Reviewed by: andrew Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D50574
* sys: Reduce where we include sys/devmap.hAndrew Turner2025-05-021-1/+0
| | | | | | | | These files don't use it, we can stop including sys/devmap.h. Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D50017
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-277-7/+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-167-13/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* arm: Move contents of cpu-v6.h into cpu.hAndrew Turner2023-07-241-1/+1
| | | | | | | | | | Previously we had an armv4/v5 and armv6/v7 copy of the cpu.h header. As we have removed armv4/v5 support we can now merge the armv6/v7 code into cpu.h Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41137
* ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t.John Baldwin2023-05-041-2/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39926
* Add fdt to name of a fdt specific functionAndrew Turner2022-05-231-1/+1
| | | | | | | Rename pci_host_generic_attach to pci_host_generic_fdt_attach to be consistant with the acpi attachment. Sponsored by: The FreeBSD Foundation
* arm annapurna: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-095-26/+14
|
* Remove versatile supportAndrew Turner2021-04-121-1/+1
| | | | | | | | It was used for testing armv6 under QEMU, however since then we added support for the QEMU virt platform. Reviewed by: imp, manu Differential Revision: https://reviews.freebsd.org/D29707
* Remove the pre-ARMv6 and pre-INTRNG code.Michal Meloun2020-11-292-73/+0
| | | | | | | | ARM has required ARMV6+ and INTRNg for some time now, so remove always false #ifdefs and unconditionally do always true #ifdefs. Notes: svn path=/head/; revision=368141
* arm: clean up empty lines in .c and .h filesMateusz Guzik2020-09-012-2/+0
| | | | Notes: svn path=/head/; revision=365068
* 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
* Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_allocOleksandr Tymoshenko2018-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Change OF_getencprop_alloc semantics to be combination of malloc and OF_getencprop and return size of the property, not number of elements allocated. For the use cases where number of elements is preferred introduce OF_getencprop_alloc_multi helper function that copies semantics of OF_getencprop_alloc prior to this change. This is to make OF_getencprop_alloc and OF_getencprop_alloc_multi function signatures consistent with OF_getencprop_alloc and OF_getencprop_alloc_multi. Functionality-wise this patch is mostly rename of OF_getencprop_alloc to OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfo where 1 was used as a block size. Notes: svn path=/head/; revision=332341
* [ofw] fix errneous checks for OF_finddevice(9) return valueOleksandr Tymoshenko2018-03-201-1/+1
| | | | | | | | | | | | | | | OF_finddevices returns ((phandle_t)-1) in case of failure. Some code in existing drivers checked return value to be equal to 0 or less/equal to 0 which is also wrong because phandle_t is unsigned type. Most of these checks were for negative cases that were never triggered so trhere was no impact on functionality. Reviewed by: nwhitehorn MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D14645 Notes: svn path=/head/; revision=331229
* 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
* 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 PLATFORM and PLATFORM_SMP support to the ALPINE kernel configuration.Andrew Turner2017-07-044-115/+137
| | | | | | | This will help move it to be part of GENERIC. Notes: svn path=/head/; revision=320643
* Start to rename files with common or generic names to be SoC specific. TheAndrew Turner2017-06-042-1/+1
| | | | | | | build system doesn't handle two files with the same name. Notes: svn path=/head/; revision=319569
* Stop making cpu_initclocks weak when using event timers. A weak symbolAndrew Turner2017-06-031-1/+0
| | | | | | | | | | could be overridden in the SoC specific code, but this would break GENERIC as it is likely to be incorrect. Remove the versatile implementation of cpu_initclocks as it's unneeded. Notes: svn path=/head/; revision=319541
* 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
* To allow for an ACPI attachment to the generic PCIe driver split off theAndrew Turner2016-11-211-1/+2
| | | | | | | | | | | | | | | | FDT attachment to a new file. A separate ACPI attachment will then be added to allow arm64 servers with ACPI to use it over FDT. This should also help with merging this with the ofwpci driver, with further work needed to remove restrictions this driver places on resource allocation. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7319 Notes: svn path=/head/; revision=308931
* Move including fdt_pinctrl.h after openfirm.h to get th edefinition ofAndrew Turner2016-11-141-0/+1
| | | | | | | | | phandle_t and remove the need for including fdt_common.h. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308639
* Stop including fdt_common.h from the arm code when it's unneeded.Andrew Turner2016-11-141-2/+0
| | | | | | | Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308638
* Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.Andrew Turner2016-11-111-1/+1
| | | | | | | Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=308531
* Support for Alpine Serializer/Deserializer.Wojciech Macek2016-10-202-0/+286
| | | | | | | | | | | | | | The exported functions will be used by Alpine Ethernet driver. Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Reviewed by: wma Differential Revision: https://reviews.freebsd.org/D7763 Notes: svn path=/head/; revision=307669
* Support for MSI-X on Annapurna AlpineWojciech Macek2016-10-201-0/+394
| | | | | | | | | | | | | | | | | | This patch adds support for MSI-X interrupts on Annapurna Alpine platform. MSI-X on Alpine work similarly to GICv2m, i.e. some range of SPI interrupts is reserved in GIC and individual SPIs can be triggered by MSI-X messages. This SPI range is defined in FDT. Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Reviewed by: nwhitehorn, wma Differential Revision: https://reviews.freebsd.org/D7579 Notes: svn path=/head/; revision=307668
* 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
* Restrict where we need to define fdt_fixup_table to just PowerPC andAndrew Turner2016-09-231-3/+0
| | | | | | | | | Marvell. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=306267
* Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only needAndrew Turner2016-09-231-15/+0
| | | | | | | | | | this on a few earlier arm SoCs. Reviewed by: manu (earlier version) Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=306262
* Add driver for PCIe root complex on Annapurna Alpine platform.Wojciech Macek2016-09-201-0/+158
| | | | | | | | | | | | | | The driver subclasses pci-host-generic and additionally performs configuration of vendor-specific PCIe registers. Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Reviewed by: wma Differential Revision: https://reviews.freebsd.org/D7571 Notes: svn path=/head/; revision=306021
* Remove messy machdep code for Alpine V1 and use proper drivers insteadWojciech Macek2016-09-072-105/+1
| | | | | | | | | | | | | Let drivers for Alpine CCU, NB and Serdes take care of internal SoC configuration. Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Reviewed by: imp,wma Differential Revision: https://reviews.freebsd.org/D7566 Notes: svn path=/head/; revision=305523
* Introduce support for Annapurna Alpine CCU and NB devicesWojciech Macek2016-09-072-0/+260
| | | | | | | | | | | | | | | This commit adds drivers for Alpine Cache Coherency Unit and North Bridge Service whose task is to configure the system fabric and enable cache coherency. Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Reviewed by: wma Differential Revision: https://reviews.freebsd.org/D7565 Notes: svn path=/head/; revision=305522
* Move arm's devmap to some generic place, so it can be usedRuslan Bukin2016-04-261-2/+2
| | | | | | | | | | | | by other architectures. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D6091 Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=298627
* Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machineAndrew Turner2016-04-151-1/+1
| | | | | | | | | | independent code that needs to know about INTRNG such as PCI drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=298068
* Build ofw_cpu.c on all ARM configs using FDT. As we mve towards using theAndrew Turner2016-02-281-1/+0
| | | | | | | | | Linux dts files these are more likely to have cpu nodes we can attach to. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=296155
* Almost all copies of platform_mp_init_secondary just calledAndrew Turner2016-02-261-7/+0
| | | | | | | | | | | | intr_pic_init_secondary. Replace them with a direct call. On BCM2836 and ARMADA XP we need to add this function, but it can be empty. Reviewed by: ian, imp Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5460 Notes: svn path=/head/; revision=296100
* Remove platform_mp_probe as it's almost identical on most ARM SoCs, andAndrew Turner2016-02-261-6/+0
| | | | | | | | | | | | | slightly wrong on the others. We should just check if mp_ncpus is set to more than one CPU as we may wish to run on a single core even when SMP is available. Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5458 Notes: svn path=/head/; revision=296098
* Remove platform_ipi_send, it's an unneeded as all implementations areAndrew Turner2016-02-251-7/+0
| | | | | | | | | identical. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=296066
* Move ARM_L2_PIPT option to std.armv6 for all armv6 platforms.Svatopluk Kraus2016-02-221-2/+0
| | | | | | | | | | Only L2 PIPT cache is supported for __ARM_ARCH >= 6. In fact, this is just a pure proclamation as this option is used only in armv4 specific files now. Notes: svn path=/head/; revision=295885
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* Stop defining fdt_pic_table when building for ARM_INTRNG.Andrew Turner2016-02-111-0/+2
| | | | Notes: svn path=/head/; revision=295509
* Remove all remaining references to old and not more used structSvatopluk Kraus2016-02-021-1/+1
| | | | | | | | pmap_devmap, pmap_devmap_bootstrap() and pmap_devmap[]. It was replaced in r257660. Notes: svn path=/head/; revision=295143
* [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.Adrian Chadd2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ci20 port (by kan@) is going to reuse almost all of the intrng code since the SoC in question looks suspiciously like someone took an ARM SoC design and replaced the ARM core with a MIPS core. * migrate out the code; * rename ARM_ -> INTR_; * rename arm_ -> intr_; * move the interrupt flush routine from intr.c / intrng.c into arm/machdep_intr.c - removing the code duplication and removing the ARM specific bits from here. Thanks to the Star Wars: The Force Awakens premiere line for allowing me a couple hours of quiet time to finish the universe builds. Tested: * make universe TODO: * The structure definitions in subr_intr.c still includes machine/intr.h which requires one duplicates all of the intrng definitions in the platform code (which kan has done, and I think we don't have to.) Instead I should break out the generic things (function declarations, common intr structures, etc) into a separate header. * Kan has requested I make the PIC based IPI stuff optional. Notes: svn path=/head/; revision=292426
* Move more bus_space_* files to be built by files.arm. This leaves theAndrew Turner2015-11-211-3/+0
| | | | | | | | | | definition in a file.* file under sys/arm/arm in the few cases we need it for non-fdt platforms. Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=291133
* Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn'tWarner Losh2015-11-201-2/+0
| | | | | | | | consistently used. It was a carry over from NetBSD that FreeBSD doesn't use. Notes: svn path=/head/; revision=291110