Commit 85802bbe authored by Andrew Murray's avatar Andrew Murray Committed by Bjorn Helgaas

PCI: mvebu: Remove unnecessary use of 'conf_lock' spinlock

Serialization of configuration accesses is provided by 'pci_lock' in
drivers/pci/access.c thus making the driver's 'conf_lock' superfluous.
Signed-off-by: default avatarAndrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
parent ccfdd7ae
...@@ -113,7 +113,6 @@ struct mvebu_pcie { ...@@ -113,7 +113,6 @@ struct mvebu_pcie {
struct mvebu_pcie_port { struct mvebu_pcie_port {
char *name; char *name;
void __iomem *base; void __iomem *base;
spinlock_t conf_lock;
u32 port; u32 port;
u32 lane; u32 lane;
int devfn; int devfn;
...@@ -638,7 +637,6 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, ...@@ -638,7 +637,6 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
{ {
struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
struct mvebu_pcie_port *port; struct mvebu_pcie_port *port;
unsigned long flags;
int ret; int ret;
port = mvebu_pcie_find_port(pcie, bus, devfn); port = mvebu_pcie_find_port(pcie, bus, devfn);
...@@ -664,10 +662,8 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, ...@@ -664,10 +662,8 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
return PCIBIOS_DEVICE_NOT_FOUND; return PCIBIOS_DEVICE_NOT_FOUND;
/* Access the real PCIe interface */ /* Access the real PCIe interface */
spin_lock_irqsave(&port->conf_lock, flags);
ret = mvebu_pcie_hw_wr_conf(port, bus, devfn, ret = mvebu_pcie_hw_wr_conf(port, bus, devfn,
where, size, val); where, size, val);
spin_unlock_irqrestore(&port->conf_lock, flags);
return ret; return ret;
} }
...@@ -678,7 +674,6 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, ...@@ -678,7 +674,6 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
{ {
struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
struct mvebu_pcie_port *port; struct mvebu_pcie_port *port;
unsigned long flags;
int ret; int ret;
port = mvebu_pcie_find_port(pcie, bus, devfn); port = mvebu_pcie_find_port(pcie, bus, devfn);
...@@ -710,10 +705,8 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, ...@@ -710,10 +705,8 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
} }
/* Access the real PCIe interface */ /* Access the real PCIe interface */
spin_lock_irqsave(&port->conf_lock, flags);
ret = mvebu_pcie_hw_rd_conf(port, bus, devfn, ret = mvebu_pcie_hw_rd_conf(port, bus, devfn,
where, size, val); where, size, val);
spin_unlock_irqrestore(&port->conf_lock, flags);
return ret; return ret;
} }
...@@ -1060,7 +1053,6 @@ static int mvebu_pcie_probe(struct platform_device *pdev) ...@@ -1060,7 +1053,6 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
mvebu_pcie_set_local_dev_nr(port, 1); mvebu_pcie_set_local_dev_nr(port, 1);
port->dn = child; port->dn = child;
spin_lock_init(&port->conf_lock);
mvebu_sw_pci_bridge_init(port); mvebu_sw_pci_bridge_init(port);
i++; i++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment