Skip to content

Commit f1680d9

Browse files
nxpfrankliKAGA-KOKO
authored andcommitted
irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask
Some platform devices create child devices dynamically and require the parent device's msi-map to map device IDs to actual sideband information. A typical use case is using ITS as a PCIe Endpoint Controller(EPC)'s doorbell function, where PCI hosts send TLP memory writes to the EP controller. The EP controller converts these writes to AXI transactions and appends platform-specific sideband information. EPC's DTS will provide such information by msi-map and msi-mask. A simplified dts as pcie-ep@10000000 { ... msi-map = <0 &its 0xc 8>; ^^^ 0xc is implement defined sideband information, which append to AXI write transaction. ^ 0 is function index. msi-mask = <0x7> } Check msi-map if msi-parent missed to keep compatility with existing systems. Signed-off-by: Frank Li <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent a6aed6b commit f1680d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/irqchip/irq-gic-v3-its-msi-parent.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ static int of_pmsi_get_dev_id(struct irq_domain *domain, struct device *dev,
118118
index++;
119119
} while (!ret);
120120

121+
if (ret) {
122+
struct device_node *np = NULL;
123+
124+
ret = of_map_id(dev->of_node, dev->id, "msi-map", "msi-map-mask", &np, dev_id);
125+
if (np)
126+
of_node_put(np);
127+
}
128+
121129
return ret;
122130
}
123131

0 commit comments

Comments
 (0)