summaryrefslogtreecommitdiff
path: root/drivers/soc/ti
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2020-10-25 12:10:04 -0700
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>2020-11-01 19:38:00 -0800
commitf5087f68e7a55fe7f8f257283ae8aecf1b8c3a76 (patch)
treedb381b7d1a54655c6369d9c65e353f0f6246fba8 /drivers/soc/ti
parent519c5c0c558b529f835c9bb30f9a1eb2034d585c (diff)
soc: ti: ti_sci_inta_msi: Add support for second range in resource ranges
Allocate MSI entries for both first and second range if they are valid Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'drivers/soc/ti')
-rw-r--r--drivers/soc/ti/ti_sci_inta_msi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
index 0eb9462f609e..a1d9c027022a 100644
--- a/drivers/soc/ti/ti_sci_inta_msi.c
+++ b/drivers/soc/ti/ti_sci_inta_msi.c
@@ -89,6 +89,18 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev,
list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
count++;
}
+ for (i = 0; i < res->desc[set].num_sec; i++) {
+ msi_desc = alloc_msi_entry(dev, 1, NULL);
+ if (!msi_desc) {
+ ti_sci_inta_msi_free_descs(dev);
+ return -ENOMEM;
+ }
+
+ msi_desc->inta.dev_index = res->desc[set].start_sec + i;
+ INIT_LIST_HEAD(&msi_desc->list);
+ list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
+ count++;
+ }
}
return count;