aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-02-02 12:15:31 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-02-08 14:33:57 -0500
commit8ed81ec82a8c57c3a6ad69b4c4d3e4801163c256 (patch)
treec764dfcd5a0d894c3f3a9ecf625156c634aa6d3a
parentd9bf28e2650fe3eeefed7e34841aea07d10c6543 (diff)
PCI: mvebu: Change delay after reset to the PCIe spec mandated 100ms
The current default of 20ms cause some devices, which are slow to initialize, to not show up during the bus scanning. Change this to the PCIe spec mandated 100ms and document this in the DT binding. From PCIe base spec rev 3.0, chapter "6.6.1. Conventional Reset": To allow components to perform internal initialization, system software must wait a specified minimum period following the end of a Conventional Reset of one or more devices before it is permitted to issue Configuration Requests to those devices. With a Downstream Port that does not support Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms before sending a Configuration Request to the device immediately below that Port. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--Documentation/devicetree/bindings/pci/mvebu-pci.txt3
-rw-r--r--drivers/pci/host/pci-mvebu.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
index 08c716b2c6b6..2de6f65ecfb1 100644
--- a/Documentation/devicetree/bindings/pci/mvebu-pci.txt
+++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
@@ -78,7 +78,8 @@ and the following optional properties:
78 multiple lanes. If this property is not found, we assume that the 78 multiple lanes. If this property is not found, we assume that the
79 value is 0. 79 value is 0.
80- reset-gpios: optional gpio to PERST# 80- reset-gpios: optional gpio to PERST#
81- reset-delay-us: delay in us to wait after reset de-assertion 81- reset-delay-us: delay in us to wait after reset de-assertion, if not
82 specified will default to 100ms, as required by the PCIe specification.
82 83
83Example: 84Example:
84 85
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 90e0b6f134ad..cd7d51988738 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -1181,7 +1181,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)
1181 return ret; 1181 return ret;
1182 1182
1183 if (port->reset_gpio) { 1183 if (port->reset_gpio) {
1184 u32 reset_udelay = 20000; 1184 u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000;
1185 1185
1186 of_property_read_u32(port->dn, "reset-delay-us", 1186 of_property_read_u32(port->dn, "reset-delay-us",
1187 &reset_udelay); 1187 &reset_udelay);