aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c')
-rw-r--r--target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c b/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
index c1d3bde5df..085cc30eba 100644
--- a/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
+++ b/target/linux/bmips/files/drivers/pci/controller/pci-bcm6348.c
@@ -21,6 +21,7 @@
#include <linux/pci.h>
#include <linux/reset.h>
#include <linux/types.h>
+#include <linux/version.h>
#include <linux/vmalloc.h>
#include "../pci.h"
@@ -346,7 +347,9 @@ static struct pci_controller bcm6348_pci_controller = {
.pci_ops = &bcm6348_pci_ops,
.io_resource = &bcm6348_pci_io_resource,
.mem_resource = &bcm6348_pci_mem_resource,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
.busn_resource = &bcm6348_pci_busn_resource,
+#endif
};
#ifdef CONFIG_CARDBUS
@@ -729,6 +732,9 @@ static int bcm6348_pci_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
struct bcm6348_pci *priv = &bcm6348_pci;
struct resource *res;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ LIST_HEAD(resources);
+#endif
of_pci_check_probe_only();
@@ -771,6 +777,9 @@ static int bcm6348_pci_probe(struct platform_device *pdev)
return -EINVAL;
of_pci_parse_bus_range(np, &bcm6348_pci_busn_resource);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
+ pci_add_resource(&resources, &bcm6348_pci_busn_resource);
+#endif
/*
* Configuration accesses are done through IO space, remap 4