aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci/pci-rt3883.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/pci/pci-rt3883.c')
-rw-r--r--arch/mips/pci/pci-rt3883.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
index 72919aeef42b..0bcc0b1cfddc 100644
--- a/arch/mips/pci/pci-rt3883.c
+++ b/arch/mips/pci/pci-rt3883.c
@@ -61,7 +61,6 @@
61 61
62struct rt3883_pci_controller { 62struct rt3883_pci_controller {
63 void __iomem *base; 63 void __iomem *base;
64 spinlock_t lock;
65 64
66 struct device_node *intc_of_node; 65 struct device_node *intc_of_node;
67 struct irq_domain *irq_domain; 66 struct irq_domain *irq_domain;
@@ -111,10 +110,8 @@ static u32 rt3883_pci_read_cfg32(struct rt3883_pci_controller *rpc,
111 110
112 address = rt3883_pci_get_cfgaddr(bus, slot, func, reg); 111 address = rt3883_pci_get_cfgaddr(bus, slot, func, reg);
113 112
114 spin_lock_irqsave(&rpc->lock, flags);
115 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); 113 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
116 ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); 114 ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
117 spin_unlock_irqrestore(&rpc->lock, flags);
118 115
119 return ret; 116 return ret;
120} 117}
@@ -128,10 +125,8 @@ static void rt3883_pci_write_cfg32(struct rt3883_pci_controller *rpc,
128 125
129 address = rt3883_pci_get_cfgaddr(bus, slot, func, reg); 126 address = rt3883_pci_get_cfgaddr(bus, slot, func, reg);
130 127
131 spin_lock_irqsave(&rpc->lock, flags);
132 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); 128 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
133 rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA); 129 rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA);
134 spin_unlock_irqrestore(&rpc->lock, flags);
135} 130}
136 131
137static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc) 132static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
@@ -252,10 +247,8 @@ static int rt3883_pci_config_read(struct pci_bus *bus, unsigned int devfn,
252 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), 247 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn),
253 PCI_FUNC(devfn), where); 248 PCI_FUNC(devfn), where);
254 249
255 spin_lock_irqsave(&rpc->lock, flags);
256 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); 250 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
257 data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); 251 data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
258 spin_unlock_irqrestore(&rpc->lock, flags);
259 252
260 switch (size) { 253 switch (size) {
261 case 1: 254 case 1:
@@ -288,7 +281,6 @@ static int rt3883_pci_config_write(struct pci_bus *bus, unsigned int devfn,
288 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), 281 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn),
289 PCI_FUNC(devfn), where); 282 PCI_FUNC(devfn), where);
290 283
291 spin_lock_irqsave(&rpc->lock, flags);
292 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); 284 rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR);
293 data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); 285 data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA);
294 286
@@ -307,7 +299,6 @@ static int rt3883_pci_config_write(struct pci_bus *bus, unsigned int devfn,
307 } 299 }
308 300
309 rt3883_pci_w32(rpc, data, RT3883_PCI_REG_CFGDATA); 301 rt3883_pci_w32(rpc, data, RT3883_PCI_REG_CFGDATA);
310 spin_unlock_irqrestore(&rpc->lock, flags);
311 302
312 return PCIBIOS_SUCCESSFUL; 303 return PCIBIOS_SUCCESSFUL;
313} 304}