summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorChuanjia Liu <chuanjia.liu@mediatek.com>2021-08-23 11:27:57 +0800
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2021-08-26 13:48:49 +0100
commit436960bb0045854119a61efab20578f55b311a87 (patch)
treefd099fa0083823c787ee53de14583f451568ad0c /drivers/pci/controller
parent87e8657ba99cac87b84c7f8ead91b44d88345504 (diff)
downloadlinux-stable-436960bb0045854119a61efab20578f55b311a87.tar.gz
linux-stable-436960bb0045854119a61efab20578f55b311a87.tar.bz2
linux-stable-436960bb0045854119a61efab20578f55b311a87.zip
PCI: mediatek: Add new method to get irq number
Use platform_get_irq_byname() to get the irq number if the "interrupt-names" property is defined. Link: https://lore.kernel.org/r/20210823032800.1660-4-chuanjia.liu@mediatek.com Signed-off-by: Chuanjia Liu <chuanjia.liu@mediatek.com> [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/pcie-mediatek.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 4296d9e04240..19e35ac62d43 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -654,7 +654,11 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port,
return err;
}
- port->irq = platform_get_irq(pdev, port->slot);
+ if (of_find_property(dev->of_node, "interrupt-names", NULL))
+ port->irq = platform_get_irq_byname(pdev, "pcie_irq");
+ else
+ port->irq = platform_get_irq(pdev, port->slot);
+
if (port->irq < 0)
return port->irq;