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
a37x0_iicreg.h
a37x0_spi.c
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
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
mv_cp110_icu_bus.c
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
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
timer.c arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00