diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-14 14:05:12 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-14 14:05:12 +0000 |
commit | 8d5d96e8338d436d6e46925932b687fa875a072a (patch) | |
tree | 2f29408c0b63117563142f9aa9fb8e7c9fd88cf4 /target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch | |
parent | d1238718c23a818b1be2fca068974d8fb916a599 (diff) | |
download | upstream-8d5d96e8338d436d6e46925932b687fa875a072a.tar.gz upstream-8d5d96e8338d436d6e46925932b687fa875a072a.tar.bz2 upstream-8d5d96e8338d436d6e46925932b687fa875a072a.zip |
ar71xx: remove linux 3.8
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37290
Diffstat (limited to 'target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch b/target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch deleted file mode 100644 index e7b7b158b7..0000000000 --- a/target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 42541838d9fdbad8573141d69cf8e38831a6cbb6 Mon Sep 17 00:00:00 2001 -From: Gabor Juhos <juhosg@openwrt.org> -Date: Sat, 2 Feb 2013 11:40:42 +0000 -Subject: [PATCH] MIPS: pci-ar724x: convert into a platform driver - -commit 58d2e9bcd682d76bcb9575dc56c85f1d82a81bfa upstream. - -The patch converts the pci-ar724x driver into a -platform driver. This makes it possible to register -the PCI controller as a plain platform device. - -Signed-off-by: Gabor Juhos <juhosg@openwrt.org> -Patchwork: http://patchwork.linux-mips.org/patch/4905/ -Signed-off-by: John Crispin <blogic@openwrt.org> ---- - arch/mips/pci/pci-ar724x.c | 57 ++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 55 insertions(+), 2 deletions(-) - ---- a/arch/mips/pci/pci-ar724x.c -+++ b/arch/mips/pci/pci-ar724x.c -@@ -11,6 +11,8 @@ - - #include <linux/irq.h> - #include <linux/pci.h> -+#include <linux/module.h> -+#include <linux/platform_device.h> - #include <asm/mach-ath79/ath79.h> - #include <asm/mach-ath79/ar71xx_regs.h> - #include <asm/mach-ath79/pci.h> -@@ -262,7 +264,7 @@ static struct irq_chip ar724x_pci_irq_ch - .irq_mask_ack = ar724x_pci_irq_mask, - }; - --static void __init ar724x_pci_irq_init(int irq) -+static void ar724x_pci_irq_init(int irq) - { - void __iomem *base; - int i; -@@ -282,7 +284,7 @@ static void __init ar724x_pci_irq_init(i - irq_set_chained_handler(irq, ar724x_pci_irq_handler); - } - --int __init ar724x_pcibios_init(int irq) -+int ar724x_pcibios_init(int irq) - { - int ret; - -@@ -312,3 +314,54 @@ err_unmap_devcfg: - err: - return ret; - } -+ -+static int ar724x_pci_probe(struct platform_device *pdev) -+{ -+ struct resource *res; -+ int irq; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl_base"); -+ if (!res) -+ return -EINVAL; -+ -+ ar724x_pci_ctrl_base = devm_request_and_ioremap(&pdev->dev, res); -+ if (ar724x_pci_ctrl_base == NULL) -+ return -EBUSY; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base"); -+ if (!res) -+ return -EINVAL; -+ -+ ar724x_pci_devcfg_base = devm_request_and_ioremap(&pdev->dev, res); -+ if (!ar724x_pci_devcfg_base) -+ return -EBUSY; -+ -+ irq = platform_get_irq(pdev, 0); -+ if (irq < 0) -+ return -EINVAL; -+ -+ ar724x_pci_link_up = ar724x_pci_check_link(); -+ if (!ar724x_pci_link_up) -+ dev_warn(&pdev->dev, "PCIe link is down\n"); -+ -+ ar724x_pci_irq_init(irq); -+ -+ register_pci_controller(&ar724x_pci_controller); -+ -+ return 0; -+} -+ -+static struct platform_driver ar724x_pci_driver = { -+ .probe = ar724x_pci_probe, -+ .driver = { -+ .name = "ar724x-pci", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init ar724x_pci_init(void) -+{ -+ return platform_driver_register(&ar724x_pci_driver); -+} -+ -+postcore_initcall(ar724x_pci_init); |