bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver
authorDiana Craciun <diana.craciun@oss.nxp.com>
Fri, 19 Jun 2020 08:20:12 +0000 (09:20 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 28 Jul 2020 14:51:32 +0000 (15:51 +0100)
commit998fb7badf0362a2057694878098642ef363d899
treefab3424f96c4a7102053629d17b30ed0d45b2de2
parent2bcdd8f2c07f1aa1bfd34fa0dab8e06949e34846
bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver

The DPRC driver is not taking into account the msi-map property
and assumes that the icid is the same as the stream ID. Although
this assumption is correct, generalize the code to include a
translation between icid and streamID.

Furthermore do not just copy the MSI domain from parent (for child
containers), but use the information provided by the msi-map property.

If the msi-map property is missing from the device tree retain the old
behaviour for backward compatibility ie the child DPRC objects
inherit the MSI domain from the parent.

Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200619082013.13661-12-lorenzo.pieralisi@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
drivers/bus/fsl-mc/dprc-driver.c
drivers/bus/fsl-mc/fsl-mc-bus.c
drivers/bus/fsl-mc/fsl-mc-msi.c
drivers/bus/fsl-mc/fsl-mc-private.h
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c