HomeFreeBSD

arm/mv: Don't rely on firmware MSI mapping in ICU

Description

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

Details

Provenance
kdAuthored on Feb 17 2021, 3:28 PM
mwCommitted on Jul 20 2021, 9:24 PM
Reviewer
mmel
Differential Revision
D28803: arm/mv: Don't rely on firmware MSI mapping in ICU
Parents
rG32271c4d383e: pf: clean up syncookie callout on vnet shutdown
Branches
Unknown
Tags
Unknown