aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrea della Porta <andrea.porta@suse.com>2025-12-18 20:09:07 +0100
committerFlorian Fainelli <florian.fainelli@broadcom.com>2025-12-19 12:42:23 -0800
commitce26f588c8310e0fdd1bc7524a86fdf0ef6b1c85 (patch)
treec5b47500de425891427044c06264aa0340c4be33 /drivers
parentc6d0cdf7e572c64bd72699d10b28bfddaf758a0f (diff)
misc: rp1: drop overlay support
The RP1 driver can load an overlay at runtime to describe the inner peripherals. This has led to a lot of confusion regarding the naming of nodes, their topology and the reclaiming of related node resources. Since the overlay is currently not fully functional, drop its support in the driver in favor of the fully described static DT. This also means that this driver does not depend on CONFIG_PCI_DYNAMIC_OF_NODES and no longer requires PCI quirks to dynamically create the intermediate PCI nodes. Signed-off-by: Andrea della Porta <andrea.porta@suse.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/4b0aa7160877cf128b9bc713776bcac73c46eb24.1766077285.git.andrea.porta@suse.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/rp1/Kconfig6
-rw-r--r--drivers/misc/rp1/Makefile3
-rw-r--r--drivers/misc/rp1/rp1-pci.dtso25
-rw-r--r--drivers/misc/rp1/rp1_pci.c37
-rw-r--r--drivers/pci/quirks.c1
5 files changed, 6 insertions, 66 deletions
diff --git a/drivers/misc/rp1/Kconfig b/drivers/misc/rp1/Kconfig
index 5232e70d3079..2c13b3968b01 100644
--- a/drivers/misc/rp1/Kconfig
+++ b/drivers/misc/rp1/Kconfig
@@ -5,8 +5,7 @@
config MISC_RP1
tristate "RaspberryPi RP1 misc device"
- depends on OF_IRQ && OF_OVERLAY && PCI_MSI && PCI_QUIRKS
- select PCI_DYNAMIC_OF_NODES
+ depends on OF_IRQ && PCI_MSI
help
Support the RP1 peripheral chip found on Raspberry Pi 5 board.
@@ -15,6 +14,3 @@ config MISC_RP1
The driver is responsible for enabling the DT node once the PCIe
endpoint has been configured, and handling interrupts.
-
- This driver uses an overlay to load other drivers to support for
- RP1 internal sub-devices.
diff --git a/drivers/misc/rp1/Makefile b/drivers/misc/rp1/Makefile
index 508b4cb05627..ab32b433d7ed 100644
--- a/drivers/misc/rp1/Makefile
+++ b/drivers/misc/rp1/Makefile
@@ -1,3 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_MISC_RP1) += rp1-pci.o
-rp1-pci-objs := rp1_pci.o rp1-pci.dtbo.o
+obj-$(CONFIG_MISC_RP1) += rp1_pci.o
diff --git a/drivers/misc/rp1/rp1-pci.dtso b/drivers/misc/rp1/rp1-pci.dtso
deleted file mode 100644
index eea826b36e02..000000000000
--- a/drivers/misc/rp1/rp1-pci.dtso
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-
-/*
- * The dts overlay is included from the dts directory so
- * it can be possible to check it with CHECK_DTBS while
- * also compile it from the driver source directory.
- */
-
-/dts-v1/;
-/plugin/;
-
-/ {
- fragment@0 {
- target-path="";
- __overlay__ {
- compatible = "pci1de4,1";
- #address-cells = <3>;
- #size-cells = <2>;
- interrupt-controller;
- #interrupt-cells = <2>;
-
- #include "arm64/broadcom/rp1-common.dtsi"
- };
- };
-};
diff --git a/drivers/misc/rp1/rp1_pci.c b/drivers/misc/rp1/rp1_pci.c
index a342bcc6164b..d210da84c30a 100644
--- a/drivers/misc/rp1/rp1_pci.c
+++ b/drivers/misc/rp1/rp1_pci.c
@@ -34,16 +34,11 @@
/* Interrupts */
#define RP1_INT_END 61
-/* Embedded dtbo symbols created by cmd_wrap_S_dtb in scripts/Makefile.lib */
-extern char __dtbo_rp1_pci_begin[];
-extern char __dtbo_rp1_pci_end[];
-
struct rp1_dev {
struct pci_dev *pdev;
struct irq_domain *domain;
struct irq_data *pcie_irqds[64];
void __iomem *bar1;
- int ovcs_id; /* overlay changeset id */
bool level_triggered_irq[RP1_INT_END];
};
@@ -184,24 +179,13 @@ static void rp1_unregister_interrupts(struct pci_dev *pdev)
static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
- u32 dtbo_size = __dtbo_rp1_pci_end - __dtbo_rp1_pci_begin;
- void *dtbo_start = __dtbo_rp1_pci_begin;
struct device *dev = &pdev->dev;
struct device_node *rp1_node;
- bool skip_ovl = true;
struct rp1_dev *rp1;
int err = 0;
int i;
- /*
- * Either use rp1_nexus node if already present in DT, or
- * set a flag to load it from overlay at runtime
- */
- rp1_node = of_find_node_by_name(NULL, "rp1_nexus");
- if (!rp1_node) {
- rp1_node = dev_of_node(dev);
- skip_ovl = false;
- }
+ rp1_node = dev_of_node(dev);
if (!rp1_node) {
dev_err(dev, "Missing of_node for device\n");
@@ -276,42 +260,29 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
rp1_chained_handle_irq, rp1);
}
- if (!skip_ovl) {
- err = of_overlay_fdt_apply(dtbo_start, dtbo_size, &rp1->ovcs_id,
- rp1_node);
- if (err)
- goto err_unregister_interrupts;
- }
-
err = of_platform_default_populate(rp1_node, NULL, dev);
if (err) {
dev_err_probe(&pdev->dev, err, "Error populating devicetree\n");
- goto err_unload_overlay;
+ goto err_unregister_interrupts;
}
- if (skip_ovl)
- of_node_put(rp1_node);
+ of_node_put(rp1_node);
return 0;
-err_unload_overlay:
- of_overlay_remove(&rp1->ovcs_id);
err_unregister_interrupts:
rp1_unregister_interrupts(pdev);
err_put_node:
- if (skip_ovl)
- of_node_put(rp1_node);
+ of_node_put(rp1_node);
return err;
}
static void rp1_remove(struct pci_dev *pdev)
{
- struct rp1_dev *rp1 = pci_get_drvdata(pdev);
struct device *dev = &pdev->dev;
of_platform_depopulate(dev);
- of_overlay_remove(&rp1->ovcs_id);
rp1_unregister_interrupts(pdev);
}
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b9c252aa6fe0..280cd50d693b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6308,7 +6308,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5020, of_pci_make_dev_node);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5021, of_pci_make_dev_node);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REDHAT, 0x0005, of_pci_make_dev_node);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, 0x9660, of_pci_make_dev_node);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_RPI, PCI_DEVICE_ID_RPI_RP1_C0, of_pci_make_dev_node);
/*
* Devices known to require a longer delay before first config space access