1 From 7dc3ccb5dc972b06c41b309653d132beaaedeb37 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Mon, 25 Jun 2012 09:52:23 +0200
4 Subject: [PATCH 15/34] MIPS: pci-ar71xx: remove static PCI controller resources
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
8 arch/mips/pci/pci-ar71xx.c | 30 ++++++++++++++----------------
9 1 files changed, 14 insertions(+), 16 deletions(-)
11 --- a/arch/mips/pci/pci-ar71xx.c
12 +++ b/arch/mips/pci/pci-ar71xx.c
13 @@ -54,6 +54,8 @@ struct ar71xx_pci_controller {
16 struct pci_controller pci_ctrl;
17 + struct resource io_res;
18 + struct resource mem_res;
21 /* Byte lane enable bits */
22 @@ -235,20 +237,6 @@ static struct pci_ops ar71xx_pci_ops = {
23 .write = ar71xx_pci_write_config,
26 -static struct resource ar71xx_pci_io_resource = {
27 - .name = "PCI IO space",
30 - .flags = IORESOURCE_IO,
33 -static struct resource ar71xx_pci_mem_resource = {
34 - .name = "PCI memory space",
35 - .start = AR71XX_PCI_MEM_BASE,
36 - .end = AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE - 1,
37 - .flags = IORESOURCE_MEM
40 static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
42 void __iomem *base = ath79_reset_base;
43 @@ -370,6 +358,16 @@ static int __devinit ar71xx_pci_probe(st
47 + apc->io_res.name = "PCI IO space";
48 + apc->io_res.start = 0;
49 + apc->io_res.end = 0;
50 + apc->io_res.flags = IORESOURCE_IO;
52 + apc->mem_res.name = "PCI memory space";
53 + apc->mem_res.start = AR71XX_PCI_MEM_BASE;
54 + apc->mem_res.end = AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE - 1;
55 + apc->mem_res.flags = IORESOURCE_MEM;
59 /* setup COMMAND register */
60 @@ -383,8 +381,8 @@ static int __devinit ar71xx_pci_probe(st
61 ar71xx_pci_irq_init(apc);
63 apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
64 - apc->pci_ctrl.mem_resource = &ar71xx_pci_mem_resource;
65 - apc->pci_ctrl.io_resource = &ar71xx_pci_io_resource;
66 + apc->pci_ctrl.mem_resource = &apc->mem_res;
67 + apc->pci_ctrl.io_resource = &apc->io_res;
69 register_pci_controller(&apc->pci_ctrl);