[PATCH 06/16] pci: dwc: Drop support for config space in 'ranges'
Sascha Hauer
s.hauer at pengutronix.de
Tue Mar 26 03:07:36 PDT 2024
Following Linux commit 2f5ab5afe018 ("PCI: dwc: Drop support for config
space in 'ranges'") let's do the same for barebox.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/pci/pcie-designware-host.c | 16 ++--------------
drivers/pci/pcie-designware.h | 1 -
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/pci/pcie-designware-host.c b/drivers/pci/pcie-designware-host.c
index bebdb5cbc7..644971d4a8 100644
--- a/drivers/pci/pcie-designware-host.c
+++ b/drivers/pci/pcie-designware-host.c
@@ -100,6 +100,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
pp->cfg1_mod_base = pp->cfg0_mod_base + pp->cfg0_size;
} else {
dev_err(dev, "Missing *config* reg space\n");
+ return -ENODEV;
}
if (of_pci_range_parser_init(&parser, np)) {
@@ -134,23 +135,10 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
pp->mem_mod_base = of_read_number(parser.range -
parser.np + na, ns);
}
- if (restype == 0) {
- of_pci_range_to_resource(&range, np, &pp->cfg);
- pp->cfg0_size = resource_size(&pp->cfg) >> 1;
- pp->cfg1_size = resource_size(&pp->cfg) >> 1;
- pp->cfg0_base = pp->cfg.start;
- pp->cfg1_base = pp->cfg.start + pp->cfg0_size;
-
- /* Find the untranslated configuration space address */
- pp->cfg0_mod_base = of_read_number(parser.range -
- parser.np + na, ns);
- pp->cfg1_mod_base = pp->cfg0_mod_base +
- pp->cfg0_size;
- }
}
if (!pci->dbi_base)
- pci->dbi_base = IOMEM(pp->cfg.start);
+ pci->dbi_base = IOMEM(cfg_res->start);
if (!pp->va_cfg0_base)
pp->va_cfg0_base = IOMEM((unsigned long)pp->cfg0_base);
diff --git a/drivers/pci/pcie-designware.h b/drivers/pci/pcie-designware.h
index 0de7b8a868..9840dde266 100644
--- a/drivers/pci/pcie-designware.h
+++ b/drivers/pci/pcie-designware.h
@@ -161,7 +161,6 @@ struct pcie_port {
u64 mem_mod_base;
phys_addr_t mem_bus_addr;
u32 mem_size;
- struct resource cfg;
struct resource io;
struct resource mem;
struct resource busn;
--
2.39.2
More information about the barebox
mailing list