aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-09 12:13:25 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-09 12:13:25 +0000
commitd09e8adc85ecec168bc0e1eb926e7c160c9b906e (patch)
treedb27cf9bfa42aaabc0f5f73a4b6dcd8f4c490765 /target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch
parentf4502d48f72913102ec18f3434c2ad9136fd43c5 (diff)
downloadupstream-d09e8adc85ecec168bc0e1eb926e7c160c9b906e.tar.gz
upstream-d09e8adc85ecec168bc0e1eb926e7c160c9b906e.tar.bz2
upstream-d09e8adc85ecec168bc0e1eb926e7c160c9b906e.zip
lantiq: add 3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44348 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch')
-rw-r--r--target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch
new file mode 100644
index 0000000000..04de41b0fc
--- /dev/null
+++ b/target/linux/lantiq/patches-3.18/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -0,0 +1,51 @@
+--- a/arch/mips/pci/ifxmips_pcie.c
++++ b/arch/mips/pci/ifxmips_pcie.c
+@@ -18,6 +18,8 @@
+ #include <linux/pci_regs.h>
+ #include <linux/module.h>
+
++#include <linux/of_platform.h>
++
+ #include "ifxmips_pcie.h"
+ #include "ifxmips_pcie_reg.h"
+
+@@ -1048,7 +1050,7 @@ pcie_rc_initialize(int pcie_port)
+ extern int (*ltq_pci_plat_arch_init)(struct pci_dev *dev);
+ extern int (*ltq_pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
+
+-static int __init ifx_pcie_bios_init(void)
++static int __init ifx_pcie_bios_probe(struct platform_device *pdev)
+ {
+ void __iomem *io_map_base;
+ int pcie_port;
+@@ -1090,6 +1092,30 @@ static int __init ifx_pcie_bios_init(voi
+
+ return 0;
+ }
++
++static const struct of_device_id ifxmips_pcie_match[] = {
++ { .compatible = "lantiq,pcie-xrx200" },
++ {},
++};
++MODULE_DEVICE_TABLE(of, ifxmips_pcie_match);
++
++static struct platform_driver ltq_pci_driver = {
++ .probe = ifx_pcie_bios_probe,
++ .driver = {
++ .name = "pcie-xrx200",
++ .owner = THIS_MODULE,
++ .of_match_table = ifxmips_pcie_match,
++ },
++};
++
++int __init ifx_pcie_bios_init(void)
++{
++ int ret = platform_driver_register(&ltq_pci_driver);
++ if (ret)
++ pr_info("pcie-xrx200: Error registering platform driver!");
++ return ret;
++}
++
+ arch_initcall(ifx_pcie_bios_init);
+
+ MODULE_LICENSE("GPL");