aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c')
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
index 1df67b8389..21d8e50063 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pcie-bcm6318.c
@@ -19,6 +19,7 @@
#include <linux/pci.h>
#include <linux/reset.h>
#include <linux/types.h>
+#include <linux/version.h>
#include <linux/vmalloc.h>
#include "../pci.h"
@@ -168,7 +169,7 @@ static int bcm6318_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;
}
@@ -226,7 +227,9 @@ static struct pci_controller bcm6318_pcie_controller = {
.pci_ops = &bcm6318_pcie_ops,
.io_resource = &bcm6318_pcie_io_resource,
.mem_resource = &bcm6318_pcie_mem_resource,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
.busn_resource = &bcm6318_pcie_busn_resource,
+#endif
};
static void bcm6318_pcie_reset(struct bcm6318_pcie *priv)
@@ -305,6 +308,9 @@ static int bcm6318_pcie_probe(struct platform_device *pdev)
struct bcm6318_pcie *priv = &bcm6318_pcie;
struct resource *res;
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ LIST_HEAD(resources);
+#endif
of_pci_check_probe_only();
@@ -370,6 +376,9 @@ static int bcm6318_pcie_probe(struct platform_device *pdev)
return -EINVAL;
of_pci_parse_bus_range(np, &bcm6318_pcie_busn_resource);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ pci_add_resource(&resources, &bcm6318_pcie_busn_resource);
+#endif
bcm6318_pcie_reset(priv);
bcm6318_pcie_setup(priv);