From 00cd46a93a96b1ef31db19e915a045df4f917918 Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 4 Mar 2013 11:48:08 +0000 Subject: ar71xx: use backported PCI patches Signed-off-by: Gabor Juhos git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35877 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...S-pci-ar724x-convert-to-a-platform-driver.patch | 94 ---------------------- 1 file changed, 94 deletions(-) delete mode 100644 target/linux/ar71xx/patches-3.8/143-MIPS-pci-ar724x-convert-to-a-platform-driver.patch (limited to 'target/linux/ar71xx/patches-3.8/143-MIPS-pci-ar724x-convert-to-a-platform-driver.patch') diff --git a/target/linux/ar71xx/patches-3.8/143-MIPS-pci-ar724x-convert-to-a-platform-driver.patch b/target/linux/ar71xx/patches-3.8/143-MIPS-pci-ar724x-convert-to-a-platform-driver.patch deleted file mode 100644 index 43d4b4761..000000000 --- a/target/linux/ar71xx/patches-3.8/143-MIPS-pci-ar724x-convert-to-a-platform-driver.patch +++ /dev/null @@ -1,94 +0,0 @@ -From f2d2d928c3900b67a5f95e53b86de5b61a3ab12c Mon Sep 17 00:00:00 2001 -From: Gabor Juhos -Date: Mon, 11 Jun 2012 13:19:44 +0200 -Subject: [PATCH 04/34] MIPS: pci-ar724x: convert to a platform driver - -Signed-off-by: Gabor Juhos ---- - arch/mips/pci/pci-ar724x.c | 57 ++++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 55 insertions(+), 2 deletions(-) - ---- a/arch/mips/pci/pci-ar724x.c -+++ b/arch/mips/pci/pci-ar724x.c -@@ -11,6 +11,8 @@ - - #include - #include -+#include -+#include - #include - #include - #include -@@ -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); -- cgit v1.2.3