summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-11-11Merge patch series "Fix IOVA allocation in Apple dart iommu after global LMB ↵Tom Rini
mem map changes" Janne Grunau <j@jannau.net> says: The changes in "Make LMB memory map global and persistent" [1] break mapping DMA memory in the USB xHCI driver when using the apple_dart iommu present on Apple silicon systems. The IOVA space used by the u-boot driver (low 4GB) and physical memory do not overlap. The physical memory on this systems starts depending on the SoC either at 0x10_0000_0000 or 0x100_0000_0000. It make no sense to manage these distinct regions in a single LMB map. In addition every device has its own iommu and IO address space so sharing a single memory map between all iommu instances is not necessary. To fix this issue restore the used subset (add, alloc and free) of the previous pointer based LMB interface with "io_" as prefix. To ensure that low level lmb functions do not use the global LMB variable reorder lib/lmb.c so that the variable is not visible. Tested with patches from my "Fix device removal order for Apple dart iommu" series [2] to fix a separate issue. The cosmetic commit has two checkpatch warnings in existing code which I ignored. [1] https://lore.kernel.org/u-boot/20240826115940.3233167-1-sughosh.ganu@linaro.org/ [2] https://lore.kernel.org/u-boot/20241031-iommu_apple_dart_ordering-v1-0-8a6877946d6b@jannau.net/ Link: https://lore.kernel.org/r/20241111-io_lmb_apple_dart_iommu-v3-0-32c05da51d72@jannau.net Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-11iommu: apple: Manage IOVA separately from global LMB mem mapJanne Grunau
There is no overlap between the IOVA space managed by the iommu (here the 32-bit address space) and physical RAM on Apple silicon systems. The RAM starts at 0x10_0000_0000 or 0x100_0000_0000 so it's not possible to manage the IOVA with the global memory LMB and use 1:1 translation. In addition each device has its own iommu and does not need to share the address space with all other devices. This should not be problem for u-boot's limited use and hardware support. Restore the private per instance LMB IOVA map. Fixes: ed17a33fed2 ("lmb: make LMB memory map persistent and global") Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-11Merge tag 'u-boot-rockchip-20241111' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/23280 - Add board: rk3328: FriendlyElec NanoPi R2S Plus rk3568: Qnap TS433 rk3588: Cool Pi CM5 GenBook - Move rk3399_force_power_on_reset to TPL for puma board;
2024-11-11pinctrl: rockchip: allow to build for TPLQuentin Schulz
A later commit will make use of the pinctrl driver in TPL so let's add the ability to build the Rockchip pinctrl driver in TPL. Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-11-10mtd: spi-nor: Fix integer overflow in stacked memories supportMarek Vasut
The 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") adds new SPI bus flags, but also introduces a completely new set of SPI bus flags in another location. The existing flags field is type u8, while the new separate flags are BIT(8) and higher. Use of those new flags triggers integer overflow. Drop the newly introduced flags which were never used anywhere in the code. Move the one remaining flag which was used in the correct place and change it from BIT(8) to BIT(6) so it fits the u8 flags. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Addresses-Coverity-ID: 510804 Extra high-order bits Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2024-11-06driver: sifive ccache: enable TRUNKCLOCKGATE and REGIONCLOCKGATENick Hu
Enable the clock gating bit of ccache when the platform has the ccache0. Signed-off-by: Nick Hu <nick.hu@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-11-04bios_emulator: fix first argument of pci_{read,write}_config_* function callsYuri Zaporozhets
When compiling for riscv64, a bunch of warning is produced for the file drivers/bios_emulator/besys.c. This patch fixes a portion of those warnings, caused by incorrect first argument to pci_{read,write}_config_* functions. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-04drivers/video/vesa: use MTRRs only on x86Yuri Zaporozhets
MTRR functionality is available only on x86, so this driver cannot be compiled on other architectures. Fix this with preprocessor directives. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-04bios_emulator: define the comment symbol for RISC-V assembler tooYuri Zaporozhets
The bios_emulator driver cannot be compiled for RISC-V because the x86emu.h header file doesn't define the comment symbol ("#") for the assembler. With this patch, use the same symbol as for e.g. x86. Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
2024-11-03dm: core: Add a function to see if a device existsSimon Glass
All the uclass functions for finding a device end up creating a uclass if it doesn't exist. Add a function which instead returns NULL in this case. This is useful when in the 'unbind' path, since we don't want to undo any unbinding which has already happened. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-03clk: renesas: Fix missing unbind on driver look up failureMarek Vasut
In case lists_driver_lookup_name("rst_gen3") fails, the clk_gen3 driver has to be unbound before erroring out. Reorder the function such that both clk_gen3 and rst_gen3 drivers are looked up first, if either look up fails then the function errors out right away. Second, the clk_gen3 is bound, if binding fails, the function still errors out right away because there is nothing to undo after either lists_driver_lookup_name() call. Finally, rst_gen3 is bound and if this binding fails, then that is the only place where clk_gen3 has to be unbound before erroring out. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-11-01scsi: fix disk capacity too small by one sectorJulius Lehmann
SCSI READ CAPACITY reports the address of the last block and the block size. The total number of blocks is thus last block address plus one. This also fixes the corresponding test case.
2024-10-31mtd: spi-nor: Guard SPI_STACKED_PARALLEL with DM_SPI checkTom Rini
While we want to compile the SPI_STACKED_PARALLEL code everywhere we can, it must first be guarded with an #if for DM_SPI as not all cases where we have this code built, such as in SPL, will have the relevant DM_SPI option enabled. Fixes: 43423cdc5dc1 ("mtd: spi-nor: Always build SPI_STACKED_PARALLEL code") Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-10-31Merge patch series "mtd: spi-nor: Remove recently added nor->addr_width == 3 ↵Tom Rini
test" Tom Rini <trini@konsulko.com> says: In the patch series "spi-nor: Add parallel and stacked memories support" a number of issues have since been raised about problems that now exist on a large number of previously working platforms. Marek Vasut has gone and identified a number of issues and this series is the starting point of attempting to address them and fix the problems with previously existing platforms. Link: https://patchwork.ozlabs.org/project/uboot/list/?series=429932&state=* Link: https://lore.kernel.org/r/20241026201741.171073-1-marek.vasut+renesas@mailbox.org
2024-10-31mtd: spi-nor: Always build SPI_STACKED_PARALLEL codeMarek Vasut
Prevent the code gated by SPI_STACKED_PARALLEL from bitrot by using if (CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)) around it. That way, it is always at least compiled. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLELMarek Vasut
The SPI_ADVANCE description does not explain what the switch does. It does not have anything to do with any advanced functionality, it only gates off support for stacked and parallel SPI NORs. Rename the Kconfig symbol, update description, and move it right next to Xilinx hardware as it seems to be specific to this hardware. Make sure the symbol is also protected by if DM_SPI in Kconfig. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Rewrite rem_bank_len calculationMarek Vasut
Rewrite the code to make it clear exactly where the SNOR_F_HAS_PARALLEL flag leads to *2 and /2 operation compared to regular code path. No functional change. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Fix multiple coding style issuesMarek Vasut
The offset variable is set, but never used afterward. Fix indent. Fix predecrement without justification. Remove use of parenthesis where unnecessary. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Remove recently added SST special caseMarek Vasut
Remove undocumented SST special case. This was added in commit 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") without any explanation in the commit message. Remove it. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Remove recently added write_disable() callMarek Vasut
Remove undocumented write_disable() call. This was added in commit 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") without any explanation in the commit message. Remove it. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Remove recently added set_4byte() callMarek Vasut
Remove undocumented set_4byte() call. This was added in commit 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") without any explanation in the commit message. Remove it. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Remove recently added spi_nor_wait_till_ready() callMarek Vasut
Remove undocumented spi_nor_wait_till_ready() call. This was added in commit 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") without any explanation in the commit message. Remove it. Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-31mtd: spi-nor: Remove recently added nor->addr_width == 3 testMarek Vasut
Remove undocumented nor->addr_width == 3 test. This was added in commit 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") without any explanation in the commit message. Remove it. This also has a bad side-effect which breaks READ operation of every SPI NOR which does not use addr_width == 3, e.g. s25fs512s does not work at all. This is because if addr_width != 3, rem_bank_len is always 0, and if rem_bank_len is 0, then read_len is 0 and if read_len is 0, then the spi_nor_read() returns -EIO. Basic reproducer is as follows: " => sf probe ; sf read 0x50000000 0 0x10000 SF: Detected s25fs512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB device 0 offset 0x0, size 0x10000 SF: 65536 bytes @ 0x0 Read: ERROR -5 " Fixes: 5d40b3d384dc ("mtd: spi-nor: Add parallel and stacked memories support") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-29Merge tag 'u-boot-imx-master-20241029' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23092 - Implement i.MX93 erratum fix on the dwc_eth_qos driver to fix RMII. - Add support for Emcraft Systems NavQ+. - Fix the size of IVT + CSF blob tacked on to u-boot.itb.
2024-10-29Merge patch series "memory: ti-aemif: Add DM support"Tom Rini
Bastien Curutchet <bastien.curutchet@bootlin.com> says: Hi all, This patch series aims to add DM support for the AEMIF controller that can be found in the DaVinci SoCs. This controller has already a driver used by the Keystone SoCs so I add my work to it. As we can now easily import Linux device-trees, I try to stick the most I can to the Linux bindings of the AEMIF controller. To do so I add an 'intermediate' driver called 'ti-aemif-cs'. It's in charge of configuring timings for a given chip select of the AEMIF controller. Link: https://lore.kernel.org/r/20241021151330.1860929-1-bastien.curutchet@bootlin.com
2024-10-29memory: ti-aemif-cs: Compute timing configuration from DT parsingBastien Curutchet
The Linux bindings of the AEMIF offer properties that specify the transaction timings for each chips select. Add parsing of these properties to calculate the chip select's configuration from them and the rate of the AEMIF's reference clock. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Add DM supportBastien Curutchet
The AEMIF's bindings in the Linux tree have a node for the AEMIF controller and then a node for each AEMIF's chip select. This CS node doesn't have a compatible property but describes the timing parameters used by a given chip select. The U-Boot DM framework expects every node to have a 'compatible' property. If no 'compatible' is present in a node, its children won't be parsed by u-boot. Add DM support to the ti-aemif driver. Add a new ti-aemif-cs driver to comply with the Linux bindings and the U-Boot's DM philosophy. This driver handles the timing parameters of an AEMIF's chip select so move aemif_cs_configure() from ti-aemif.c to ti-aemif-cs.c. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Wrap the CS configuration into a functionBastien Curutchet
Wrap the CS configuration into a aemif_configure_cs() to ease its migration to another driver when adding DM support. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Add ARCH_DAVINCI to architectures that uses TI_AEMIFBastien Curutchet
TI_AEMIF configuration doesn't depend on ARCH_DAVINCI while the AEMIF controller is present in the DaVinci SoCs. Add ARCH_DAVINCI to the potential users of the TI_AEMIF driver Add <asm/io.h> to driver's includes to fix build issue on ARCH_DAVINCI Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29memory: ti-aemif: Make AEMIF driver architecture agnosticBastien Curutchet
AEMIF controller is present on other SoCs than the Keystone ones. Remove Keystone specificities from the driver to be able to use it from other architectures. Adapt the ks2_evm/board.c to fit the new driver. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29memory: ti-aemif: Correct macro to ensure avoiding precedence issuesBastien Curutchet
Fix following CHECK pointed out by checkpatch: CHECK: Macro argument 'cs' may be better as '(cs)' to avoid precedence issues #62: FILE: drivers/memory/ti-aemif.c:15: +#define AEMIF_CONFIG(cs) (0x10 + (cs * 4)) Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29Merge patch series "Support Aspeed SGPIO controller"Tom Rini
Billy Tsai <billy_tsai@aspeedtech.com> says: AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one with 80 pins, AST2500/AST2400 SoC has 1 SGPIO master interface that supports up to 80 pins. Link: https://lore.kernel.org/r/20241016085955.314236-1-billy_tsai@aspeedtech.com
2024-10-29net: dwc_eth_qos: Remove obsolete imx8 includesErik Schumacher
They were added with commit 0e9d23945ce0 ("net: eqos: implement callbaks to get interface and set txclk rate") but were not removed with commit 5fc783b5d9c9 ("net: dwc_eth_qos: move i.MX code out") when i.MX specific code was moved to a separate file. Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29net: dwc_eth_qos_imx: Add platform specific reset for i.MX93Erik Schumacher
The EQOS on i.MX93 fails to finish the reset procedure in RMII mode. This is described in errata ERR051683. This patch implements the provided workaround which sets the PS and FES bits after the SWR is set by using the eqos_fix_soc_reset function. Adapted from linux-kernel commit b536f32b5b03 ("net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs") Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29net: dwc_eth_qos: Add support for platform specific resetErik Schumacher
This patch adds support for optional platform specific reset logic in the dwc_eth_qos driver. This new function 'eqos_fix_soc_reset' is called after the EQOS_DMA_MODE_SWR is set and before the driver waits for this bit to clear. Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29ARM: dts: ast2600: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable them for AST2600 EVB. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29ARM: dts: ast2500: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable it for AST2500 EVB. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29gpio: Add Aspeed SGPIO driverBilly Tsai
The Aspeed SGPIO driver supports the SGPIO controllers found in the AST2400, AST2500 and AST2600 BMC SoCs. The implementation is a cut-down copy of the upstream Linux kernel driver, adapted for u-boot. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29dm: core: downgrade some dm_warn messages to log_debug()Quentin Schulz
People complained that enabling (SPL_)DM_WARN was now totally unusable due to the amount of messages printed on the console. Let's downgrade the log level of some messages that are clearly not on the error path. Note that there's one pr_debug in there, because it is followed by pr_cont so it made sense to reuse the same family of functions. Reported-by: Alexander Dahl <ada@thorsis.com> Fixes: 6afdb1585112 ("dm: core: migrate debug() messages to use dm_warn") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-29Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
2024-10-29clk: microchip: mpfs: support new syscon based devicetree configurationConor Dooley
Why get a devicetree description wrong once when you can get it wrong twice? The original mistake, which the driver supports was failing to describe the main PLL that the "cfg" and "periph" clocks parented by. The second mistake was describing the "cfg" and "periph" clocks a reg region within the clock controller, rather as two registers within a syscon region that also contains pinctrl, interrupt muxing controls and other functions. Make up for lost time and describe these regions as they should have been originally, preserving support for the existing two configurations for the sake of existing systems with firmware-provided devicetrees. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-28mmc: renesas-sdhi: Add compatible string for rzg2l-sdhiPaul Barker
After the recent dts/upstream subtree merge, the sdhi compatible string used in the device tree for RZ/G2L family SoCs is "renesas,rzg2l-sdhi" not "renesas,rcar-gen3-sdhi". This broke the ability to access the eMMC and SD card devices on RZ/G2L boards. Fix this by adding the new compatible string to the sdhi driver. Fixes: 136b7b6d2e98 ("Subtree merge tag 'v6.11-dts' of dts repo [1] into dts/upstream") Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2024-10-28gpio: dw: Add ngpios DT-property supportMaksim Kiselev
Starting with Linux commit 7569486d79ae ("gpio: dwapb: Add ngpios DT-property support") the "snps,nr-gpios" property was marked as deprecated. And since all newly added dw-apb-gpio nodes are described using generic "ngpios" property, it's time to add support for it. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-27Merge patch series "Implement ACPI on aarch64"Tom Rini
Patrick Rudolph <patrick.rudolph@9elements.com> says: Based on the existing work done by Simon Glass this series adds support for booting aarch64 devices using ACPI only. As first target QEMU SBSA support is added, which relies on ACPI only to boot an OS. As secondary target the Raspberry Pi4 was used, which is broadly available and allows easy testing of the proposed solution. The series is split into ACPI cleanups and code movements, adding Arm specific ACPI tables and finally SoC and mainboard related changes to boot a Linux on the QEMU SBSA and RPi4. Currently only the mandatory ACPI tables are supported, allowing to boot into Linux without errors. The QEMU SBSA support is feature complete and provides the same functionality as the EDK2 implementation. The changes were tested on real hardware as well on QEMU v9.0: qemu-system-aarch64 -machine sbsa-ref -nographic -cpu cortex-a57 \ -pflash secure-world.rom \ -pflash unsecure-world.rom qemu-system-aarch64 -machine raspi4b -kernel u-boot.bin -cpu cortex-a72 \ -smp 4 -m 2G -drive file=raspbian.img,format=raw,index=0 \ -dtb bcm2711-rpi-4-b.dtb -nographic Tested against FWTS V24.03.00. Known issues: - The QEMU rpi4 support is currently limited as it doesn't emulate PCI, USB or ethernet devices! - The SMP bringup doesn't work on RPi4, but works in QEMU (Possibly cache related). - PCI on RPI4 isn't working on real hardware since the pcie_brcmstb Linux kernel module doesn't support ACPI yet. Link: https://lore.kernel.org/r/20241023132116.970117-1-patrick.rudolph@9elements.com
2024-10-27arm: mach-bcm283x: Add ARMV8_MULTIENTRY supportPatrick Rudolph
When ACPI is enabled over FDT the APs cannot be brought out of reset by the OS using the "FDT spin-table" mechanism, as no FDT is provided to the OS. The APs must be released out of reset in u-boot and then brought up in an ACPI compliant fashion. When ARMV8_MULTIENTRY is specified, the APs are released from reset and will enter U-Boot after it has been relocated as well. By default ARMV8_MULTIENTRY is not selected, keeping existing behaviour. TEST: All APs enter U-Boot when run on qemu-system-aarch64 and on real hardware. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Matthias Brugger <mbrugger@suse.com> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2024-10-27arm: mach-bcm283x: Bring in some header files from tianocoreSimon Glass
These header files presumably duplicate things already in the U-Boot devicetree. For now, bring them in to get the ASL code and ACPI table code to compile. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Matthias Brugger <mbrugger@suse.com> Cc: Matthias Brugger <mbrugger@suse.com> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2024-10-27drivers/arm: Implement acpi_fill_madtPatrick Rudolph
Fill the MADT table in the GIC driver and armv8 CPU driver to drop SoC specific code. While the GIC only needs devicetree data, the CPU driver needs additional information stored in the cpu_plat struct. While on it update the only board making use of the existing drivers and writing ACPI MADT in mainboard code. TEST: Booted on QEMU sbsa-ref using GICV3 driver model generated MADT. Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org>
2024-10-27drivers: misc: irq-uclass: Update irq_get_by_indexPatrick Rudolph
Support reading the "interrupts" property from the devicetree in case the "interrupts-extended" property isn't found. As the "interrupts" property is commonly used, this allows to parse all existing FDT and makes irq_get_by_index() more useful. The "interrupts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Moritz Fischer <moritzf@google.com>
2024-10-27drivers/cpu: Add generic armv8 cpu driverPatrick Rudolph
Add a generic driver that binds to armv8 CPU nodes. The generic driver allows - to enumerate CPUs present in a system, even when no other driver binds it - generates ACPI SSDT code for each CPU - Fill the ACPI MADT table (implemented in a follow up patch) The newly introduced code could also be reused on other CPU drivers that are compatible with armv8. TEST: Booted on QEMU sbsa and verify the driver binds to CPU nodes. Confirmed with FWTS that all ACPI processor devices are present. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
2024-10-27drivers: ata: Rename ahci_mvebuPatrick Rudolph
Rename 'ahci_mvebu' to 'ahci_generic' and select it by default. The AHCI driver contains no SoC specific code and only expects the base address to be passed, thus rename it to ahci_generic and add the DT compatible string "generic-ahci". Update existing defconfigs to use the new Kconfig name as well. TEST: Booted on QEMU sbsa using the generic-ahci node. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Tony Dinh <mibodhi@gmail.com>