]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: Switch to irq_domain_create_linear()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 19 Mar 2025 09:29:22 +0000 (10:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 May 2025 19:06:10 +0000 (21:06 +0200)
irq_domain_add_linear() is going away as being obsolete now. Switch to
the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct
device_node. Therefore, of_fwnode_handle() is added around the
parameter.

Note some of the users can likely use dev->fwnode directly instead of
indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not
guaranteed to be set for all, so this has to be investigated on case to
case basis (by people who can actually test with the HW).

[ tglx: Fix up subject prefix and convert the new instance in
   dwc/pcie-amd-mdb.c ]

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-30-jirislaby@kernel.org
21 files changed:
drivers/pci/controller/dwc/pci-dra7xx.c
drivers/pci/controller/dwc/pci-keystone.c
drivers/pci/controller/dwc/pcie-amd-mdb.c
drivers/pci/controller/dwc/pcie-dw-rockchip.c
drivers/pci/controller/dwc/pcie-uniphier.c
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
drivers/pci/controller/pci-aardvark.c
drivers/pci/controller/pci-ftpci100.c
drivers/pci/controller/pci-mvebu.c
drivers/pci/controller/pcie-altera-msi.c
drivers/pci/controller/pcie-altera.c
drivers/pci/controller/pcie-brcmstb.c
drivers/pci/controller/pcie-iproc-msi.c
drivers/pci/controller/pcie-mediatek-gen3.c
drivers/pci/controller/pcie-mediatek.c
drivers/pci/controller/pcie-rockchip-host.c
drivers/pci/controller/pcie-xilinx-cpm.c
drivers/pci/controller/pcie-xilinx-dma-pl.c
drivers/pci/controller/pcie-xilinx-nwl.c
drivers/pci/controller/pcie-xilinx.c
drivers/pci/controller/plda/pcie-plda-host.c

index 33d6bf460ffe5bb724a061558dd93ec7bdadc336..3219704aba0eda6cf0131d7b16c0bfdb2c99f756 100644 (file)
@@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_rp *pp)
 
        irq_set_chained_handler_and_data(pp->irq, dra7xx_pcie_msi_irq_handler,
                                         pp);
-       dra7xx->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                  &intx_domain_ops, pp);
+       dra7xx->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node),
+                                                     PCI_NUM_INTX, &intx_domain_ops, pp);
        of_node_put(pcie_intc_node);
        if (!dra7xx->irq_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
index 76a37368ae4f922a042fbf465ea716e0329fd292..1385d9db7b325784a697ad58798f9cbc95cf6b37 100644 (file)
@@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie *ks_pcie)
                                                 ks_pcie);
        }
 
-       intx_irq_domain = irq_domain_add_linear(intc_np, PCI_NUM_INTX,
+       intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(intc_np), PCI_NUM_INTX,
                                        &ks_pcie_intx_irq_domain_ops, NULL);
        if (!intx_irq_domain) {
                dev_err(dev, "Failed to add irq domain for INTX irqs\n");
index 4eb2a4e8189d2a7cc4e43d96e58b230ec964d522..9f7251a16d32122ee617777ce2eafad93672d95c 100644 (file)
@@ -290,8 +290,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,
                return -ENODEV;
        }
 
-       pcie->mdb_domain = irq_domain_add_linear(pcie_intc_node, 32,
-                                                &event_domain_ops, pcie);
+       pcie->mdb_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32,
+                                                   &event_domain_ops, pcie);
        if (!pcie->mdb_domain) {
                err = -ENOMEM;
                dev_err(dev, "Failed to add MDB domain\n");
@@ -300,8 +300,8 @@ static int amd_mdb_pcie_init_irq_domains(struct amd_mdb_pcie *pcie,
 
        irq_domain_update_bus_token(pcie->mdb_domain, DOMAIN_BUS_NEXUS);
 
-       pcie->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                 &amd_intx_domain_ops, pcie);
+       pcie->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node),
+                                                    PCI_NUM_INTX, &amd_intx_domain_ops, pcie);
        if (!pcie->intx_domain) {
                err = -ENOMEM;
                dev_err(dev, "Failed to add INTx domain\n");
index c624b7ebd118c06a15da32ecf6966177232c7e4a..678d510a261dc227b49f88d1093afb66382ccfae 100644 (file)
@@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)
                return -EINVAL;
        }
 
-       rockchip->irq_domain = irq_domain_add_linear(intc, PCI_NUM_INTX,
-                                                   &intx_domain_ops, rockchip);
+       rockchip->irq_domain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX,
+                                                       &intx_domain_ops, rockchip);
        of_node_put(intc);
        if (!rockchip->irq_domain) {
                dev_err(dev, "failed to get a INTx IRQ domain\n");
index 5757ca3803c99c6f44e94ecb54b87f64663f75f9..43b28f826edde731e3d5b3efd928a13d6d8820c0 100644 (file)
@@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp)
                goto out_put_node;
        }
 
-       pcie->intx_irq_domain = irq_domain_add_linear(np_intc, PCI_NUM_INTX,
+       pcie->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(np_intc), PCI_NUM_INTX,
                                                &uniphier_intx_domain_ops, pp);
        if (!pcie->intx_irq_domain) {
                dev_err(pci->dev, "Failed to get INTx domain\n");
index 6628eed9d26e0defa31ce6da863ffe06bffbb244..a600f46ee3c3591ff59f3fa6df0498fe33312fd5 100644 (file)
@@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)
        struct mobiveil_msi *msi = &pcie->rp.msi;
 
        mutex_init(&msi->lock);
-       msi->dev_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
-                                               &msi_domain_ops, pcie);
+       msi->dev_domain = irq_domain_create_linear(NULL, msi->num_of_vectors,
+                                                  &msi_domain_ops, pcie);
        if (!msi->dev_domain) {
                dev_err(dev, "failed to create IRQ domain\n");
                return -ENOMEM;
@@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie)
 static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie)
 {
        struct device *dev = &pcie->pdev->dev;
-       struct device_node *node = dev->of_node;
        struct mobiveil_root_port *rp = &pcie->rp;
 
        /* setup INTx */
-       rp->intx_domain = irq_domain_add_linear(node, PCI_NUM_INTX,
-                                               &intx_domain_ops, pcie);
+       rp->intx_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), PCI_NUM_INTX,
+                                                  &intx_domain_ops, pcie);
 
        if (!rp->intx_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
index a29796cce420a209ca64f0a6b628e34acb224ca5..7bac64533b1432e4b2ea073eb4094c87e7ccd9bf 100644 (file)
@@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
        raw_spin_lock_init(&pcie->msi_irq_lock);
        mutex_init(&pcie->msi_used_lock);
 
-       pcie->msi_inner_domain =
-               irq_domain_add_linear(NULL, MSI_IRQ_NUM,
-                                     &advk_msi_domain_ops, pcie);
+       pcie->msi_inner_domain = irq_domain_create_linear(NULL, MSI_IRQ_NUM,
+                                                         &advk_msi_domain_ops, pcie);
        if (!pcie->msi_inner_domain)
                return -ENOMEM;
 
@@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie)
        irq_chip->irq_mask = advk_pcie_irq_mask;
        irq_chip->irq_unmask = advk_pcie_irq_unmask;
 
-       pcie->irq_domain =
-               irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                     &advk_pcie_irq_domain_ops, pcie);
+       pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                   &advk_pcie_irq_domain_ops, pcie);
        if (!pcie->irq_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
                ret = -ENOMEM;
@@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_domain_ops = {
 
 static int advk_pcie_init_rp_irq_domain(struct advk_pcie *pcie)
 {
-       pcie->rp_irq_domain = irq_domain_add_linear(NULL, 1,
-                                                   &advk_pcie_rp_irq_domain_ops,
-                                                   pcie);
+       pcie->rp_irq_domain = irq_domain_create_linear(NULL, 1, &advk_pcie_rp_irq_domain_ops, pcie);
        if (!pcie->rp_irq_domain) {
                dev_err(&pcie->pdev->dev, "Failed to add Root Port IRQ domain\n");
                return -ENOMEM;
index ffdeed25e96197c1024c72706fd1dabdd94bd246..28e43831c0f1a0feee69952614da340b5768674c 100644 (file)
@@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)
                return irq ?: -EINVAL;
        }
 
-       p->irqdomain = irq_domain_add_linear(intc, PCI_NUM_INTX,
-                                            &faraday_pci_irqdomain_ops, p);
+       p->irqdomain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX,
+                                               &faraday_pci_irqdomain_ops, p);
        of_node_put(intc);
        if (!p->irqdomain) {
                dev_err(p->dev, "failed to create Gemini PCI IRQ domain\n");
index b0e3bce10aa44fd00670bb97dfffe7787f9a5b89..60da24ba0a19d0bc345bda4d2759c26a53561f92 100644 (file)
@@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pcie_port *port)
                return -ENODEV;
        }
 
-       port->intx_irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                     &mvebu_pcie_intx_irq_domain_ops,
-                                                     port);
+       port->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node),
+                                                        PCI_NUM_INTX,
+                                                        &mvebu_pcie_intx_irq_domain_ops, port);
        of_node_put(pcie_intc_node);
        if (!port->intx_irq_domain) {
                dev_err(dev, "Failed to get INTx IRQ domain for %s\n", port->name);
index 5fb3a2e0017e100fc05c5ea4898fc5a41635a444..a43f21eb8fbb92049e1476aea6c6dcb4ee1a4c46 100644 (file)
@@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *msi)
 {
        struct fwnode_handle *fwnode = of_fwnode_handle(msi->pdev->dev.of_node);
 
-       msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
+       msi->inner_domain = irq_domain_create_linear(NULL, msi->num_of_vectors,
                                             &msi_domain_ops, msi);
        if (!msi->inner_domain) {
                dev_err(&msi->pdev->dev, "failed to create IRQ domain\n");
index 70409e71a18f406dc764fc31103feb32c8a8207c..0fc77176a52ed76fcbe8d1567f670c872da14d8a 100644 (file)
@@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)
        struct device_node *node = dev->of_node;
 
        /* Setup INTx */
-       pcie->irq_domain = irq_domain_add_linear(node, PCI_NUM_INTX,
+       pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), PCI_NUM_INTX,
                                        &intx_domain_ops, pcie);
        if (!pcie->irq_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
index 924a81e073c00f709656ecdac822a7dbd658abc9..92887b394eb4debb03d8068e9367c1e2cf7d4f45 100644 (file)
@@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi)
        struct fwnode_handle *fwnode = of_fwnode_handle(msi->np);
        struct device *dev = msi->dev;
 
-       msi->inner_domain = irq_domain_add_linear(NULL, msi->nr, &msi_domain_ops, msi);
+       msi->inner_domain = irq_domain_create_linear(NULL, msi->nr, &msi_domain_ops, msi);
        if (!msi->inner_domain) {
                dev_err(dev, "failed to create IRQ domain\n");
                return -ENOMEM;
index 804b3a5787c5a8796259bab38f139064f0732f31..d2cb4c4f821af9981d2edb6e852cb8bdf21a5a84 100644 (file)
@@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi)
 static int iproc_msi_alloc_domains(struct device_node *node,
                                   struct iproc_msi *msi)
 {
-       msi->inner_domain = irq_domain_add_linear(NULL, msi->nr_msi_vecs,
-                                                 &msi_domain_ops, msi);
+       msi->inner_domain = irq_domain_create_linear(NULL, msi->nr_msi_vecs,
+                                                    &msi_domain_ops, msi);
        if (!msi->inner_domain)
                return -ENOMEM;
 
index 9d52504acae460dbe82b2aa155411a0531e69b7d..b55f5973414c1d4c267a749a8cbe435fc4c97b51 100644 (file)
@@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)
                return -ENODEV;
        }
 
-       pcie->intx_domain = irq_domain_add_linear(intc_node, PCI_NUM_INTX,
-                                                 &intx_domain_ops, pcie);
+       pcie->intx_domain = irq_domain_create_linear(of_fwnode_handle(intc_node), PCI_NUM_INTX,
+                                                    &intx_domain_ops, pcie);
        if (!pcie->intx_domain) {
                dev_err(dev, "failed to create INTx IRQ domain\n");
                ret = -ENODEV;
@@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)
        /* Setup MSI */
        mutex_init(&pcie->lock);
 
-       pcie->msi_bottom_domain = irq_domain_add_linear(node, PCIE_MSI_IRQS_NUM,
-                                 &mtk_msi_bottom_domain_ops, pcie);
+       pcie->msi_bottom_domain = irq_domain_create_linear(of_fwnode_handle(node),
+                                                          PCIE_MSI_IRQS_NUM,
+                                                          &mtk_msi_bottom_domain_ops, pcie);
        if (!pcie->msi_bottom_domain) {
                dev_err(dev, "failed to create MSI bottom domain\n");
                ret = -ENODEV;
index efcc4a7c17be8ad7315a8d87711cc248e1c13b83..e1934aa06c8d579aa8d5a36e9ef4f41614891eae 100644 (file)
@@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,
                return -ENODEV;
        }
 
-       port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                &intx_domain_ops, port);
+       port->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                   &intx_domain_ops, port);
        of_node_put(pcie_intc_node);
        if (!port->irq_domain) {
                dev_err(dev, "failed to get INTx IRQ domain\n");
index 6a46be17aa91b1d0b8ee95cb67b95d2dd03f37d8..b9e7a8710cf047743fd69e2728b4f50196b0d31f 100644 (file)
@@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)
                return -EINVAL;
        }
 
-       rockchip->irq_domain = irq_domain_add_linear(intc, PCI_NUM_INTX,
-                                                   &intx_domain_ops, rockchip);
+       rockchip->irq_domain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX,
+                                                       &intx_domain_ops, rockchip);
        of_node_put(intc);
        if (!rockchip->irq_domain) {
                dev_err(dev, "failed to get a INTx IRQ domain\n");
index 13ca493d22bd068115e9c8720c0f9eb040e92b95..d38f27e2076190191b92c61d6dfa8d07ca05cb28 100644 (file)
@@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie *port)
                return -EINVAL;
        }
 
-       port->cpm_domain = irq_domain_add_linear(pcie_intc_node, 32,
-                                                &event_domain_ops,
-                                                port);
+       port->cpm_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32,
+                                                   &event_domain_ops, port);
        if (!port->cpm_domain)
                goto out;
 
        irq_domain_update_bus_token(port->cpm_domain, DOMAIN_BUS_NEXUS);
 
-       port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                 &intx_domain_ops,
-                                                 port);
+       port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                    &intx_domain_ops, port);
        if (!port->intx_domain)
                goto out;
 
index 71cf13ae51c70a0ba29f16686937716d27369366..dc9690a535e160d1851d192801fd2e5a4bf68752 100644 (file)
@@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struct pl_dma_pcie *port)
        int size = BITS_TO_LONGS(XILINX_NUM_MSI_IRQS) * sizeof(long);
        struct fwnode_handle *fwnode = of_fwnode_handle(port->dev->of_node);
 
-       msi->dev_domain = irq_domain_add_linear(NULL, XILINX_NUM_MSI_IRQS,
-                                               &dev_msi_domain_ops, port);
+       msi->dev_domain = irq_domain_create_linear(NULL, XILINX_NUM_MSI_IRQS,
+                                                  &dev_msi_domain_ops, port);
        if (!msi->dev_domain)
                goto out;
 
@@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port)
                return -EINVAL;
        }
 
-       port->pldma_domain = irq_domain_add_linear(pcie_intc_node, 32,
-                                                  &event_domain_ops, port);
+       port->pldma_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32,
+                                                     &event_domain_ops, port);
        if (!port->pldma_domain)
                return -ENOMEM;
 
        irq_domain_update_bus_token(port->pldma_domain, DOMAIN_BUS_NEXUS);
 
-       port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                 &intx_domain_ops, port);
+       port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                    &intx_domain_ops, port);
        if (!port->intx_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
                return -ENOMEM;
index 9cf8a96f7bc4e3a2a20d59e300bf7233ca0bfddc..c8b05477b7198567d3ad5c51c2ce80032bba7cdd 100644 (file)
@@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie *pcie)
        struct fwnode_handle *fwnode = of_fwnode_handle(dev->of_node);
        struct nwl_msi *msi = &pcie->msi;
 
-       msi->dev_domain = irq_domain_add_linear(NULL, INT_PCI_MSI_NR,
-                                               &dev_msi_domain_ops, pcie);
+       msi->dev_domain = irq_domain_create_linear(NULL, INT_PCI_MSI_NR, &dev_msi_domain_ops, pcie);
        if (!msi->dev_domain) {
                dev_err(dev, "failed to create dev IRQ domain\n");
                return -ENOMEM;
@@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)
                return -EINVAL;
        }
 
-       pcie->intx_irq_domain = irq_domain_add_linear(intc_node,
-                                                     PCI_NUM_INTX,
-                                                     &intx_domain_ops,
-                                                     pcie);
+       pcie->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(intc_node), PCI_NUM_INTX,
+                                                        &intx_domain_ops, pcie);
        of_node_put(intc_node);
        if (!pcie->intx_irq_domain) {
                dev_err(dev, "failed to create IRQ domain\n");
index 0b534f73a942084f97f227bf583199f59ce31805..e36aa874bae9237bf0cb4ca0d1bee7fe851ddfb1 100644 (file)
@@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie *pcie)
                return -ENODEV;
        }
 
-       pcie->leg_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                &intx_domain_ops,
-                                                pcie);
+       pcie->leg_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                   &intx_domain_ops, pcie);
        of_node_put(pcie_intc_node);
        if (!pcie->leg_domain) {
                dev_err(dev, "Failed to get a INTx IRQ domain\n");
index 4c7a9fa311e3fbe2fa076a15a0d518dfbacf8c6e..3abedf723215c8dad0675e0b0d3cf64a13567e7b 100644 (file)
@@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_rp *port)
 
        mutex_init(&port->msi.lock);
 
-       msi->dev_domain = irq_domain_add_linear(NULL, msi->num_vectors,
-                                               &msi_domain_ops, port);
+       msi->dev_domain = irq_domain_create_linear(NULL, msi->num_vectors, &msi_domain_ops, port);
        if (!msi->dev_domain) {
                dev_err(dev, "failed to create IRQ domain\n");
                return -ENOMEM;
@@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)
                return -EINVAL;
        }
 
-       port->event_domain = irq_domain_add_linear(pcie_intc_node,
-                                                  port->num_events,
-                                                  &plda_event_domain_ops,
-                                                  port);
+       port->event_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node),
+                                                     port->num_events, &plda_event_domain_ops,
+                                                     port);
        if (!port->event_domain) {
                dev_err(dev, "failed to get event domain\n");
                of_node_put(pcie_intc_node);
@@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)
 
        irq_domain_update_bus_token(port->event_domain, DOMAIN_BUS_NEXUS);
 
-       port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
-                                                 &intx_domain_ops, port);
+       port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX,
+                                                    &intx_domain_ops, port);
        if (!port->intx_domain) {
                dev_err(dev, "failed to get an INTx IRQ domain\n");
                of_node_put(pcie_intc_node);