Changeset 35877


Ignore:
Timestamp:
2013-03-04T12:48:08+01:00 (5 years ago)
Author:
juhosg
Message:

ar71xx: use backported PCI patches

Signed-off-by: Gabor Juhos <juhosg@…>

Location:
trunk/target/linux/ar71xx/patches-3.8
Files:
2 added
1 deleted
2 edited
12 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/patches-3.8/010-MIPS-pci-ar724x-convert-into-a-platform-driver.patch

    r35876 r35877  
    1 From f2d2d928c3900b67a5f95e53b86de5b61a3ab12c Mon Sep 17 00:00:00 2001 
     1From 42541838d9fdbad8573141d69cf8e38831a6cbb6 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 11 Jun 2012 13:19:44 +0200 
    4 Subject: [PATCH 04/34] MIPS: pci-ar724x: convert to a platform driver 
     3Date: Sat, 2 Feb 2013 11:40:42 +0000 
     4Subject: [PATCH] MIPS: pci-ar724x: convert into a platform driver 
     5 
     6commit 58d2e9bcd682d76bcb9575dc56c85f1d82a81bfa upstream. 
     7 
     8The patch converts the pci-ar724x driver into a 
     9platform driver. This makes it possible to register 
     10the PCI controller as a plain platform device. 
    511 
    612Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     13Patchwork: http://patchwork.linux-mips.org/patch/4905/ 
     14Signed-off-by: John Crispin <blogic@openwrt.org> 
    715--- 
    8  arch/mips/pci/pci-ar724x.c |   57 ++++++++++++++++++++++++++++++++++++++++++- 
    9  1 files changed, 55 insertions(+), 2 deletions(-) 
     16 arch/mips/pci/pci-ar724x.c |   57 ++++++++++++++++++++++++++++++++++++++++++-- 
     17 1 file changed, 55 insertions(+), 2 deletions(-) 
    1018 
    1119--- a/arch/mips/pci/pci-ar724x.c 
  • trunk/target/linux/ar71xx/patches-3.8/011-MIPS-pci-ar71xx-convert-into-a-platform-driver.patch

    r35876 r35877  
    1 From d1a22e73f991145a4abd7d0c37bcf318703c89ed Mon Sep 17 00:00:00 2001 
     1From 060c9a226a25e044167e877d9830ec53f836da9e Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 11 Jun 2012 13:24:55 +0200 
    4 Subject: [PATCH 05/34] MIPS: pci-ar71xx: convert to a platform driver 
     3Date: Sat, 2 Feb 2013 11:40:43 +0000 
     4Subject: [PATCH] MIPS: pci-ar71xx: convert into a platform driver 
     5 
     6commit fb167e891d5cc6386840dd092af2d461b38eb802 upstream. 
     7 
     8The patch converts the pci-ar71xx driver into a 
     9platform driver. This makes it possible to register 
     10the PCI controller as a plain platform device. 
    511 
    612Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     13Patchwork: http://patchwork.linux-mips.org/patch/4906/ 
     14Signed-off-by: John Crispin <blogic@openwrt.org> 
    715--- 
    816 arch/mips/pci/pci-ar71xx.c |   60 +++++++++++++++++++++++++++++++++++++++++--- 
    9  1 files changed, 56 insertions(+), 4 deletions(-) 
     17 1 file changed, 56 insertions(+), 4 deletions(-) 
    1018 
    1119--- a/arch/mips/pci/pci-ar71xx.c 
  • trunk/target/linux/ar71xx/patches-3.8/012-MIPS-ath79-move-global-PCI-defines-into-a-common-hea.patch

    r35876 r35877  
    1 From c3a8b5fa196cedc4b940c1e5ec482dd875aa3180 Mon Sep 17 00:00:00 2001 
     1From 1dece618b107f5db28c8f63d4d32424dd18324d1 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 11 Jun 2012 13:38:06 +0200 
    4 Subject: [PATCH 06/34] MIPS: ath79: move global PCI defines into a common header 
     3Date: Mon, 4 Feb 2013 11:56:53 +0100 
     4Subject: [PATCH] MIPS: ath79: move global PCI defines into a common header 
     5 
     6commit ad4ce92e919f7ad5561a2060deb58899de58b40c upstream. 
    57 
    68The constants will be used by a subsequent patch. 
    79 
    810Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     11Patchwork: http://patchwork.linux-mips.org/patch/4907/ 
     12Signed-off-by: John Crispin <blogic@openwrt.org> 
    913--- 
    1014 arch/mips/include/asm/mach-ath79/ar71xx_regs.h |   24 ++++++++++++++++++++++++ 
  • trunk/target/linux/ar71xx/patches-3.8/013-MIPS-ath79-register-platform-devices-for-the-PCI-con.patch

    r35876 r35877  
    1 From 2fdf8dcff3ffaa806e9f9d7f1c1bd876222cff4d Mon Sep 17 00:00:00 2001 
     1From 87cdbe4315e4c72c2bc8568d1258e1207e1c772b Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 11 Jun 2012 13:39:32 +0200 
    4 Subject: [PATCH 07/34] MIPS: ath79: register platform devices for the PCI controllers 
     3Date: Sat, 2 Feb 2013 11:44:24 +0000 
     4Subject: [PATCH] MIPS: ath79: register platform devices for the PCI 
     5 controllers 
     6 
     7commit 9fc1ca5b73a82daedffa2d1d5daa48dd2093c39a upstream. 
     8 
     9The pci-ar71xx and pci-ar724x drivers were converted 
     10into platform drivers. Register the corresponding 
     11platform devices for the PCI controllers instead 
     12of using the ar7{1x,24}x_pcibios_init functions. 
    513 
    614Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     15Patchwork: http://patchwork.linux-mips.org/patch/4908/ 
     16Signed-off-by: John Crispin <blogic@openwrt.org> 
    717--- 
    8  arch/mips/ath79/pci.c |   87 +++++++++++++++++++++++++++++++++++++++++++----- 
    9  1 files changed, 78 insertions(+), 9 deletions(-) 
     18 arch/mips/ath79/pci.c |   87 ++++++++++++++++++++++++++++++++++++++++++++----- 
     19 1 file changed, 78 insertions(+), 9 deletions(-) 
    1020 
    1121--- a/arch/mips/ath79/pci.c 
  • trunk/target/linux/ar71xx/patches-3.8/014-MIPS-ath79-remove-unused-ar7-1x-24-x_pcibios_init-fu.patch

    r35876 r35877  
    1 From 07224e2fa5f889162ee0560c6ab1eb8cd16a8dd2 Mon Sep 17 00:00:00 2001 
     1From db36c9d6a6be232bdee245407fc8ccde53ea69c6 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 11 Jun 2012 14:59:39 +0200 
    4 Subject: [PATCH 08/34] MIPS: ath79: remove unused ar7{1x,24}x_pcibios_init functions 
     3Date: Mon, 4 Feb 2013 11:58:49 +0100 
     4Subject: [PATCH] MIPS: ath79: remove unused ar7{1x,24}x_pcibios_init 
     5 functions 
     6 
     7commit 6e783865b4e60f2ecf7708f8ea24db5c5ea07ced upstream. 
    58 
    69The functions are unused now, so remove them. 
    710 
    811Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     12Patchwork: http://patchwork.linux-mips.org/patch/4909/ 
     13Signed-off-by: John Crispin <blogic@openwrt.org> 
    914--- 
    1015 arch/mips/ath79/pci.c                  |    1 - 
     
    1217 arch/mips/pci/pci-ar71xx.c             |   26 -------------------------- 
    1318 arch/mips/pci/pci-ar724x.c             |   32 -------------------------------- 
    14  4 files changed, 0 insertions(+), 87 deletions(-) 
     19 4 files changed, 87 deletions(-) 
    1520 delete mode 100644 arch/mips/include/asm/mach-ath79/pci.h 
    1621 
  • trunk/target/linux/ar71xx/patches-3.8/015-MIPS-avoid-possible-resource-conflict-in-register_pc.patch

    r35876 r35877  
    1 From a018b28d3953a32008de839d997a992a724ae314 Mon Sep 17 00:00:00 2001 
     1From 4da85831c8eaf2de2cadae6723e8231068c313b7 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Sun, 24 Jun 2012 17:40:45 +0200 
    4 Subject: [PATCH 09/34] MIPS: avoid possible resource conflict in register_pci_controller 
     3Date: Sat, 2 Feb 2013 13:18:54 +0000 
     4Subject: [PATCH] MIPS: avoid possible resource conflict in 
     5 register_pci_controller 
     6 
     7commit 222831787704c9ad9215f6b56f975b233968607c upstream. 
     8 
     9The IO and memory resources of a PCI controller 
     10might already have a parent resource set when 
     11they are passed to 'register_pci_controller'. 
     12 
     13If the parent resource is set, the request_resource 
     14call will fail due to resource conflict and the 
     15current code will not be able to register the 
     16PCI controller. 
     17 
     18Use the parent resource if it is available in the 
     19request_resource call to avoid the isssue. 
    520 
    621Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     22Patchwork: http://patchwork.linux-mips.org/patch/4910/ 
     23Signed-off-by: John Crispin <blogic@openwrt.org> 
    724--- 
    825 arch/mips/pci/pci.c |   15 +++++++++++++-- 
    9  1 files changed, 13 insertions(+), 2 deletions(-) 
     26 1 file changed, 13 insertions(+), 2 deletions(-) 
    1027 
    1128--- a/arch/mips/pci/pci.c 
  • trunk/target/linux/ar71xx/patches-3.8/016-MIPS-ath79-allow-to-specify-bus-number-in-PCI-IRQ-ma.patch

    r35876 r35877  
    1 From 12c68e4fccadc22a0470177141a57892a76e4a2b Mon Sep 17 00:00:00 2001 
     1From 53ba4919664636487155c810fb49781169780e0c Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Sun, 24 Jun 2012 15:33:16 +0200 
    4 Subject: [PATCH 25/34] MIPS: ath79: allow to specify bus number in PCI IRQ maps 
     3Date: Sun, 3 Feb 2013 09:58:37 +0000 
     4Subject: [PATCH] MIPS: ath79: allow to specify bus number in PCI IRQ maps 
     5 
     6commit 617fed41e98417f3ea3e9974be251e125c8796f2 upstream. 
     7 
     8This is needed for multiple PCI bus support. 
    59 
    610Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     11Patchwork: http://patchwork.linux-mips.org/patch/4913/ 
     12Signed-off-by: John Crispin <blogic@openwrt.org> 
    713--- 
    814 arch/mips/ath79/pci.c |    4 +++- 
    915 arch/mips/ath79/pci.h |    1 + 
    10  2 files changed, 4 insertions(+), 1 deletions(-) 
     16 2 files changed, 4 insertions(+), 1 deletion(-) 
    1117 
    1218--- a/arch/mips/ath79/pci.c 
  • trunk/target/linux/ar71xx/patches-3.8/017-MIPS-pci-ar724x-use-dynamically-allocated-PCI-contro.patch

    r35876 r35877  
    1 From 242aedf3246dc5085271aca56134ac455bfb64b5 Mon Sep 17 00:00:00 2001 
     1From 21b3cafae425cf2e317a22292a9a5773ff0e2e5e Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Sun, 24 Jun 2012 11:51:34 +0200 
    4 Subject: [PATCH 10/34] MIPS: pci-ar724x: use dynamically allocated PCI controller structure 
     3Date: Sun, 3 Feb 2013 09:58:38 +0000 
     4Subject: [PATCH] MIPS: pci-ar724x: use dynamically allocated PCI controller 
     5 structure 
     6 
     7commit 908339ef25b1d5e80f1c6fab22b9958174708b4a upstream. 
     8 
     9The current code uses static variables to store the 
     10PCI controller specific data. This works if the system 
     11contains one PCI controller only, however it becomes 
     12impractical when multiple PCI controllers are present. 
     13 
     14Move the variables into a dynamically allocated controller 
     15specific structure, and use that instead of the static 
     16variables. 
    517 
    618Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     19Patchwork: http://patchwork.linux-mips.org/patch/4912/ 
     20Signed-off-by: John Crispin <blogic@openwrt.org> 
    721--- 
    822 arch/mips/pci/pci-ar724x.c |  129 ++++++++++++++++++++++++++++---------------- 
    9  1 files changed, 82 insertions(+), 47 deletions(-) 
     23 1 file changed, 82 insertions(+), 47 deletions(-) 
    1024 
    1125--- a/arch/mips/pci/pci-ar724x.c 
  • trunk/target/linux/ar71xx/patches-3.8/018-MIPS-pci-ar724x-remove-static-PCI-IO-MEM-resources.patch

    r35876 r35877  
    1 From f1c3a7dadf7b77809cda7f77df4b1ba3b24fbfa3 Mon Sep 17 00:00:00 2001 
     1From d80b05d19c2772ded40403d578d8e90d38c85257 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Wed, 27 Jun 2012 10:12:50 +0200 
    4 Subject: [PATCH 11/34] MIPS: pci-ar724x: remove static PCI resources 
     3Date: Sun, 3 Feb 2013 09:59:45 +0000 
     4Subject: [PATCH] MIPS: pci-ar724x: remove static PCI IO/MEM resources 
    55 
    6 Get those from the platform device instead. 
     6commit 34b134aebda89888b6985b7a3139e9cbdf209236 upstream. 
     7 
     8Static resources become impractical when multiple 
     9PCI controllers are present. Move the resources 
     10into the platform device registration code and 
     11change the probe routine to get those from there 
     12platform device's resources. 
    713 
    814Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     15Patchwork: http://patchwork.linux-mips.org/patch/4914/ 
     16Signed-off-by: John Crispin <blogic@openwrt.org> 
    917--- 
    1018 arch/mips/ath79/pci.c      |   21 ++++++++++++++++++++- 
     
    1422--- a/arch/mips/ath79/pci.c 
    1523+++ b/arch/mips/ath79/pci.c 
    16 @@ -137,10 +137,13 @@ static struct platform_device * 
     24@@ -139,10 +139,13 @@ static struct platform_device * 
    1725 ath79_register_pci_ar724x(int id, 
    1826                          unsigned long cfg_base, 
     
    2937        memset(res, 0, sizeof(res)); 
    3038  
    31 @@ -158,6 +161,16 @@ ath79_register_pci_ar724x(int id, 
     39@@ -160,6 +163,16 @@ ath79_register_pci_ar724x(int id, 
    3240        res[2].start = irq; 
    3341        res[2].end = irq; 
     
    4654                                               res, ARRAY_SIZE(res)); 
    4755        return pdev; 
    48 @@ -173,6 +186,9 @@ int __init ath79_register_pci(void) 
     56@@ -175,6 +188,9 @@ int __init ath79_register_pci(void) 
    4957                pdev = ath79_register_pci_ar724x(-1, 
    5058                                                 AR724X_PCI_CFG_BASE, 
     
    5664        } else if (soc_is_ar9342() || 
    5765                   soc_is_ar9344()) { 
    58 @@ -185,6 +201,9 @@ int __init ath79_register_pci(void) 
     66@@ -187,6 +203,9 @@ int __init ath79_register_pci(void) 
    5967                pdev = ath79_register_pci_ar724x(-1, 
    6068                                                 AR724X_PCI_CFG_BASE, 
  • trunk/target/linux/ar71xx/patches-3.8/019-MIPS-pci-ar724x-use-per-controller-IRQ-base.patch

    r35876 r35877  
    1 From d258929cd4c8c495f619f0e66d9d1c23f3f9246f Mon Sep 17 00:00:00 2001 
     1From d85015ff3ab6df0e776c2aefc51f2da023c1edcf Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Tue, 26 Jun 2012 11:59:45 +0200 
    4 Subject: [PATCH 12/34] MIPS: pci-ar724x: use per-controller IRQ base 
     3Date: Sun, 3 Feb 2013 10:00:16 +0000 
     4Subject: [PATCH] MIPS: pci-ar724x: use per-controller IRQ base 
     5 
     6commit 8b66d461187ff61c5755001af7296e6edde48423 upstream. 
     7 
     8Change to the code to use per-controller IRQ base. 
     9This is needed for multiple PCI controller support. 
    510 
    611Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     12Patchwork: http://patchwork.linux-mips.org/patch/4915/ 
     13Signed-off-by: John Crispin <blogic@openwrt.org> 
    714--- 
    815 arch/mips/pci/pci-ar724x.c |   31 +++++++++++++++++++++---------- 
    9  1 files changed, 21 insertions(+), 10 deletions(-) 
     16 1 file changed, 21 insertions(+), 10 deletions(-) 
    1017 
    1118--- a/arch/mips/pci/pci-ar724x.c 
     
    7077-static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc) 
    7178+static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc, 
    72 +                                         int id) 
     79+                               int id) 
    7380 { 
    7481        void __iomem *base; 
  • trunk/target/linux/ar71xx/patches-3.8/020-MIPS-pci-ar724x-setup-command-register-of-the-PCI-co.patch

    r35876 r35877  
    1 From 93824983ceb36d4ce1f4a644031ec6fb5f332f1d Mon Sep 17 00:00:00 2001 
     1From 5e079d9b7ac5dda3be9f215f8440333597f57b26 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Tue, 26 Jun 2012 15:14:47 +0200 
    4 Subject: [PATCH 13/34] MIPS: pci-ar724x: setup command register of the PCI controller 
     3Date: Sun, 3 Feb 2013 14:52:47 +0000 
     4Subject: [PATCH] MIPS: pci-ar724x: setup command register of the PCI 
     5 controller 
     6 
     7commit 12401fc28d40aa5bf8bda6991a96b6d7a3dae3ac upstream. 
     8 
     9The command register of the PCI controller is 
     10not initialized correctly by the bootloader on 
     11some boards and this leads to non working PCI 
     12bus. 
     13 
     14Add code to initialize the command register 
     15from the Linux code to avoid this. 
    516 
    617Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     18Patchwork: http://patchwork.linux-mips.org/patch/4916/ 
     19Signed-off-by: John Crispin <blogic@openwrt.org> 
    720--- 
    821 arch/mips/ath79/pci.c                          |   10 +++- 
    922 arch/mips/include/asm/mach-ath79/ar71xx_regs.h |    2 + 
    1023 arch/mips/pci/pci-ar724x.c                     |   63 ++++++++++++++++++++++++ 
    11  3 files changed, 74 insertions(+), 1 deletions(-) 
     24 3 files changed, 74 insertions(+), 1 deletion(-) 
    1225 
    1326--- a/arch/mips/ath79/pci.c 
    1427+++ b/arch/mips/ath79/pci.c 
    15 @@ -137,13 +137,14 @@ static struct platform_device * 
     28@@ -139,13 +139,14 @@ static struct platform_device * 
    1629 ath79_register_pci_ar724x(int id, 
    1730                          unsigned long cfg_base, 
     
    2942        memset(res, 0, sizeof(res)); 
    3043  
    31 @@ -171,6 +172,11 @@ ath79_register_pci_ar724x(int id, 
     44@@ -173,6 +174,11 @@ ath79_register_pci_ar724x(int id, 
    3245        res[4].start = io_base; 
    3346        res[4].end = io_base; 
     
    4154                                               res, ARRAY_SIZE(res)); 
    4255        return pdev; 
    43 @@ -186,6 +192,7 @@ int __init ath79_register_pci(void) 
     56@@ -188,6 +194,7 @@ int __init ath79_register_pci(void) 
    4457                pdev = ath79_register_pci_ar724x(-1, 
    4558                                                 AR724X_PCI_CFG_BASE, 
     
    4962                                                 AR724X_PCI_MEM_SIZE, 
    5063                                                 0, 
    51 @@ -201,6 +208,7 @@ int __init ath79_register_pci(void) 
     64@@ -203,6 +210,7 @@ int __init ath79_register_pci(void) 
    5265                pdev = ath79_register_pci_ar724x(-1, 
    5366                                                 AR724X_PCI_CFG_BASE, 
  • trunk/target/linux/ar71xx/patches-3.8/021-MIPS-pci-ar71xx-use-dynamically-allocated-PCI-contro.patch

    r35876 r35877  
    1 From 6c3ef689e4364dca74eaaecd72384be09e5a6bc8 Mon Sep 17 00:00:00 2001 
     1From 0f0f7d810226c734141a20de85289dbb0dda8f96 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    3 Date: Mon, 25 Jun 2012 09:19:08 +0200 
    4 Subject: [PATCH 14/34] MIPS: pci-ar71xx: use dynamically allocated PCI controller structure 
     3Date: Thu, 7 Feb 2013 19:28:14 +0000 
     4Subject: [PATCH] MIPS: pci-ar71xx: use dynamically allocated PCI controller 
     5 structure 
     6 
     7commit f18118a868f1f7e7bdfea176a204fcc44fae2985 upstream. 
    58 
    69Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 
     10Patchwork: http://patchwork.linux-mips.org/patch/4926/ 
     11Signed-off-by: John Crispin <blogic@openwrt.org> 
    712--- 
    8  arch/mips/pci/pci-ar71xx.c |   84 +++++++++++++++++++++++++++---------------- 
    9  1 files changed, 53 insertions(+), 31 deletions(-) 
     13 arch/mips/pci/pci-ar71xx.c |   84 ++++++++++++++++++++++++++++---------------- 
     14 1 file changed, 53 insertions(+), 31 deletions(-) 
    1015 
    1116--- a/arch/mips/pci/pci-ar71xx.c 
    1217+++ b/arch/mips/pci/pci-ar71xx.c 
    13 @@ -20,6 +20,7 @@ 
    14  #include <linux/interrupt.h> 
    15  #include <linux/module.h> 
    16  #include <linux/platform_device.h> 
    17 +#include <linux/slab.h> 
    18   
    19  #include <asm/mach-ath79/ar71xx_regs.h> 
    20  #include <asm/mach-ath79/ath79.h> 
    21 @@ -48,8 +49,12 @@ 
     18@@ -48,8 +48,12 @@ 
    2219  
    2320 #define AR71XX_PCI_IRQ_COUNT           5 
     
    3431 /* Byte lane enable bits */ 
    3532 static const u8 ar71xx_pci_ble_table[4][4] = { 
    36 @@ -92,9 +97,18 @@ static inline u32 ar71xx_pci_bus_addr(st 
     33@@ -92,9 +96,18 @@ static inline u32 ar71xx_pci_bus_addr(st 
    3734        return ret; 
    3835 } 
     
    5552        u32 ahb_err; 
    5653  
    57 @@ -129,9 +143,10 @@ static int ar71xx_pci_check_error(int qu 
     54@@ -129,9 +142,10 @@ static int ar71xx_pci_check_error(int qu 
    5855        return !!(ahb_err | pci_err); 
    5956 } 
     
    6865  
    6966        value = value << (8 * (where & 3)); 
    70 @@ -147,7 +162,8 @@ static inline int ar71xx_pci_set_cfgaddr 
     67@@ -147,7 +161,8 @@ static inline int ar71xx_pci_set_cfgaddr 
    7168                                         unsigned int devfn, 
    7269                                         int where, int size, u32 cmd) 
     
    7875  
    7976        addr = ar71xx_pci_bus_addr(bus, devfn, where); 
    80 @@ -156,13 +172,14 @@ static inline int ar71xx_pci_set_cfgaddr 
     77@@ -156,13 +171,14 @@ static inline int ar71xx_pci_set_cfgaddr 
    8178        __raw_writel(cmd | ar71xx_pci_get_ble(where, size, 0), 
    8279                     base + AR71XX_PCI_REG_CFG_CBE); 
     
    9592        u32 data; 
    9693        int err; 
    97 @@ -171,7 +188,7 @@ static int ar71xx_pci_read_config(struct 
     94@@ -171,7 +187,7 @@ static int ar71xx_pci_read_config(struct 
    9895        ret = PCIBIOS_SUCCESSFUL; 
    9996        data = ~0; 
     
    104101        err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size, 
    105102                                     AR71XX_PCI_CFG_CMD_READ); 
    106 @@ -180,7 +197,7 @@ static int ar71xx_pci_read_config(struct 
     103@@ -180,7 +196,7 @@ static int ar71xx_pci_read_config(struct 
    107104        else 
    108105                data = __raw_readl(base + AR71XX_PCI_REG_CFG_RDDATA); 
     
    113110        *value = (data >> (8 * (where & 3))) & ar71xx_pci_read_mask[size & 7]; 
    114111  
    115 @@ -190,7 +207,8 @@ static int ar71xx_pci_read_config(struct 
     112@@ -190,7 +206,8 @@ static int ar71xx_pci_read_config(struct 
    116113 static int ar71xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, 
    117114                                   int where, int size, u32 value) 
     
    123120        int err; 
    124121        int ret; 
    125 @@ -198,7 +216,7 @@ static int ar71xx_pci_write_config(struc 
     122@@ -198,7 +215,7 @@ static int ar71xx_pci_write_config(struc 
    126123        value = value << (8 * (where & 3)); 
    127124        ret = PCIBIOS_SUCCESSFUL; 
     
    132129        err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size, 
    133130                                     AR71XX_PCI_CFG_CMD_WRITE); 
    134 @@ -207,7 +225,7 @@ static int ar71xx_pci_write_config(struc 
     131@@ -207,7 +224,7 @@ static int ar71xx_pci_write_config(struc 
    135132        else 
    136133                __raw_writel(value, base + AR71XX_PCI_REG_CFG_WRDATA); 
     
    141138        return ret; 
    142139 } 
    143 @@ -231,12 +249,6 @@ static struct resource ar71xx_pci_mem_re 
     140@@ -231,12 +248,6 @@ static struct resource ar71xx_pci_mem_re 
    144141        .flags          = IORESOURCE_MEM 
    145142 }; 
     
    154151 { 
    155152        void __iomem *base = ath79_reset_base; 
    156 @@ -294,7 +306,7 @@ static struct irq_chip ar71xx_pci_irq_ch 
     153@@ -294,7 +305,7 @@ static struct irq_chip ar71xx_pci_irq_ch 
    157154        .irq_mask_ack   = ar71xx_pci_irq_mask, 
    158155 }; 
     
    163160        void __iomem *base = ath79_reset_base; 
    164161        int i; 
    165 @@ -309,7 +321,7 @@ static void ar71xx_pci_irq_init(int irq) 
     162@@ -309,7 +320,7 @@ static void ar71xx_pci_irq_init(int irq) 
    166163                irq_set_chip_and_handler(i, &ar71xx_pci_irq_chip, 
    167164                                         handle_level_irq); 
     
    172169  
    173170 static void ar71xx_pci_reset(void) 
    174 @@ -336,20 +348,26 @@ static void ar71xx_pci_reset(void) 
     171@@ -336,20 +347,27 @@ static void ar71xx_pci_reset(void) 
    175172  
    176173 static int ar71xx_pci_probe(struct platform_device *pdev) 
     
    181178        u32 t; 
    182179  
    183 +       apc = kzalloc(sizeof(struct ar71xx_pci_controller), GFP_KERNEL); 
     180+       apc = devm_kzalloc(&pdev->dev, sizeof(struct ar71xx_pci_controller), 
     181+                          GFP_KERNEL); 
    184182+       if (!apc) 
    185183+               return -ENOMEM; 
  • trunk/target/linux/ar71xx/patches-3.8/170-MIPS-ath79-add-PCI-controller-registration-code-for-.patch

    r35728 r35877  
    5555                        pr_crit("pci %s: invalid irq map\n", 
    5656                                pci_name((struct pci_dev *) dev)); 
    57 @@ -215,6 +233,24 @@ int __init ath79_register_pci(void) 
     57@@ -225,6 +243,24 @@ int __init ath79_register_pci(void) 
    5858                                                 AR724X_PCI_MEM_SIZE, 
    5959                                                 0, 
  • trunk/target/linux/ar71xx/patches-3.8/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch

    r35728 r35877  
    5959        { 
    6060                .slot   = 17, 
    61 @@ -202,12 +206,50 @@ ath79_register_pci_ar724x(int id, 
     61@@ -212,12 +216,50 @@ ath79_register_pci_ar724x(int id, 
    6262        return pdev; 
    6363 } 
Note: See TracChangeset for help on using the changeset viewer.