aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c')
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
index 4c0d3723b8..4c032cf3d9 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6328.c
@@ -23,6 +23,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/types.h>
+#include <linux/version.h>
#include <linux/vmalloc.h>
#include "../pci.h"
@@ -151,7 +152,7 @@ static int bcm6328_pcie_can_access(struct pci_bus *bus, int devfn)
if (PCI_SLOT(devfn) == 0)
return __raw_readl(priv->base + PCIE_DLSTATUS_REG)
& DLSTATUS_PHYLINKUP;
- /* else, fall through */
+ fallthrough;
default:
return false;
}
@@ -209,7 +210,9 @@ static struct pci_controller bcm6328_pcie_controller = {
.pci_ops = &bcm6328_pcie_ops,
.io_resource = &bcm6328_pcie_io_resource,
.mem_resource = &bcm6328_pcie_mem_resource,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
.busn_resource = &bcm6328_pcie_busn_resource,
+#endif
};
static void bcm6328_pcie_reset(struct bcm6328_pcie *priv)
@@ -294,6 +297,9 @@ static int bcm6328_pcie_probe(struct platform_device *pdev)
struct resource *res;
unsigned int i;
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ LIST_HEAD(resources);
+#endif
pm_runtime_enable(dev);
pm_runtime_no_callbacks(dev);
@@ -380,6 +386,9 @@ static int bcm6328_pcie_probe(struct platform_device *pdev)
return -EINVAL;
of_pci_parse_bus_range(np, &bcm6328_pcie_busn_resource);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ pci_add_resource(&resources, &bcm6328_pcie_busn_resource);
+#endif
bcm6328_pcie_reset(priv);
bcm6328_pcie_setup(priv);