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
armada38x
armadaxp
a37x0_gpio.c
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
ic.c
mpic.c
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
mv_common.c
mv_cp110_clock.c
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
mv_pci.c
mv_spi.c
mv_thermal.c
mvebu_gpio.c mvebu_gpio: Fix settings of gpio pin direction. 2021-03-07 11:41:30 +01:00
mvebu_pinctrl.c
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
rtc.c
std-pj4b.mv
timer.c