Skip to content

Commit bba1251

Browse files
Mani-Sadhasivamkwilczynski
authored andcommitted
PCI: qcom-ep: Modify 'global_irq' and 'perst_irq' IRQ device names
Currently, the IRQ device name for both of these IRQs doesn't have Qcom specific prefix and PCIe domain number. This causes 2 issues: 1. Pollutes the global IRQ namespace since 'global' is a common name. 2. When more than one EP controller instance is present in the SoC, naming conflict will occur. Hence, add 'qcom_pcie_ep_' prefix and PCIe domain number suffix to the IRQ names to uniquely identify the IRQs and also to fix the above mentioned issues. Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]>
1 parent 0328947 commit bba1251

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,27 +711,39 @@ static irqreturn_t qcom_pcie_ep_perst_irq_thread(int irq, void *data)
711711
static int qcom_pcie_ep_enable_irq_resources(struct platform_device *pdev,
712712
struct qcom_pcie_ep *pcie_ep)
713713
{
714+
struct device *dev = pcie_ep->pci.dev;
715+
char *name;
714716
int ret;
715717

718+
name = devm_kasprintf(dev, GFP_KERNEL, "qcom_pcie_ep_global_irq%d",
719+
pcie_ep->pci.ep.epc->domain_nr);
720+
if (!name)
721+
return -ENOMEM;
722+
716723
pcie_ep->global_irq = platform_get_irq_byname(pdev, "global");
717724
if (pcie_ep->global_irq < 0)
718725
return pcie_ep->global_irq;
719726

720727
ret = devm_request_threaded_irq(&pdev->dev, pcie_ep->global_irq, NULL,
721728
qcom_pcie_ep_global_irq_thread,
722729
IRQF_ONESHOT,
723-
"global_irq", pcie_ep);
730+
name, pcie_ep);
724731
if (ret) {
725732
dev_err(&pdev->dev, "Failed to request Global IRQ\n");
726733
return ret;
727734
}
728735

736+
name = devm_kasprintf(dev, GFP_KERNEL, "qcom_pcie_ep_perst_irq%d",
737+
pcie_ep->pci.ep.epc->domain_nr);
738+
if (!name)
739+
return -ENOMEM;
740+
729741
pcie_ep->perst_irq = gpiod_to_irq(pcie_ep->reset);
730742
irq_set_status_flags(pcie_ep->perst_irq, IRQ_NOAUTOEN);
731743
ret = devm_request_threaded_irq(&pdev->dev, pcie_ep->perst_irq, NULL,
732744
qcom_pcie_ep_perst_irq_thread,
733745
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
734-
"perst_irq", pcie_ep);
746+
name, pcie_ep);
735747
if (ret) {
736748
dev_err(&pdev->dev, "Failed to request PERST IRQ\n");
737749
disable_irq(pcie_ep->global_irq);

0 commit comments

Comments
 (0)