freebsd-dev/sys/arm/mv
Kornel Duleba 986bbba9a6 arm/mv: Don't rely on firmware MSI mapping in ICU
On Armada8k boards various peripherals (e.g. USB) have interrupt lines
connected to on of the ICU interrupt controllers.
After an interrupt is detected it triggers MSI to a given address,
with a programmed value. This in turn triggers an SPI interrupt.
Normally MSI vector should be allocated by ICUs parent and set
during interrupt allocation.
Instead of doing that we relied on the ICU being pre-configured in firmware.
This worked with EDK2 and older versions of U-Boot, but in the newer
ones that is no longer the case.
Extend ICU msi-parents - GICP and SEI to support MSI interface
and use it during interrupt allocation.
This allows us to boot on Armada 7k/8k SoCs independent from the
firmware configuration and successfully use modern U-Boot + device tree.

For SATA interrupts we need to apply a WA previously done in firmware.
We have two SATA ports connected to one controller.
Each ports gets its own interrupt, but only one of them is
described in dts, also ahci_generic driver expects only one irq too.
Fix it by mapping both interrupts to the same MSI when one of them
is allocated, which allows us to use both SATA ports.

Reviewed by: mmel, mw
Obtained from: Semihalf
Sponsored by: Marvell
Differential Revision: https://reviews.freebsd.org/D28803
2021-07-20 23:24:42 +02:00
..
armada arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
armada38x arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
armadaxp arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
a37x0_gpio.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
a37x0_iic.c Fix the build, use the correct include path. 2019-12-05 02:01:47 +00:00
a37x0_iicreg.h Add the I2C driver for the Armada 37x0. 2019-12-05 00:56:03 +00:00
a37x0_spi.c Be consistent about checking return value from bus_delayed_attach_children. 2019-12-13 21:39:20 +00:00
files.arm7 Remove old Marvell drivers 2021-01-27 10:02:02 +00:00
gpio.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
ic.c sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
mpic.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
mv_ap806_clock.c marvell: ap806_clock: add missing frequency modes 2021-01-26 14:04:22 +01:00
mv_ap806_gicp.c arm/mv: Don't rely on firmware MSI mapping in ICU 2021-07-20 23:24:42 +02:00
mv_ap806_sei.c arm/mv: Don't rely on firmware MSI mapping in ICU 2021-07-20 23:24:42 +02:00
mv_armv7_machdep.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mv_common.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
mv_cp110_clock.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mv_cp110_clock.h arm64: marvell: Add cp110 clock controller support 2018-12-12 22:04:21 +00:00
mv_cp110_icu_bus.c Update Armada 8k drivers to cover newly imported DT and latest changes 2019-10-20 10:48:27 +00:00
mv_cp110_icu.c arm/mv: Don't rely on firmware MSI mapping in ICU 2021-07-20 23:24:42 +02:00
mv_pci_ctrl.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mv_pci.c Remove the pre-ARMv6 and pre-INTRNG code. 2020-11-29 08:40:12 +00:00
mv_spi.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mv_thermal.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mvebu_gpio.c mvebu_gpio: Fix settings of gpio pin direction. 2021-03-07 11:41:30 +01:00
mvebu_pinctrl.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
mvreg.h make maximum interrupt number tunable on ARM, ARM64, MIPS, and RISC-V 2021-01-18 16:36:39 -08:00
mvvar.h Move fdt_is_type to be a Marvell specific function. It's not used by any 2018-04-08 12:20:06 +00:00
mvwin.h arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
rtc.c
std-pj4b.mv Use PLATFORM for initializing Marvell ArmadaXP and Armada38X 2018-04-04 08:40:49 +00:00
timer.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00