Commit 8ed81ec8 authored by Lucas Stach's avatar Lucas Stach Committed by Bjorn Helgaas

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: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
parent d9bf28e2
...@@ -78,7 +78,8 @@ and the following optional properties: ...@@ -78,7 +78,8 @@ and the following optional properties:
multiple lanes. If this property is not found, we assume that the multiple lanes. If this property is not found, we assume that the
value is 0. value is 0.
- reset-gpios: optional gpio to PERST# - reset-gpios: optional gpio to PERST#
- reset-delay-us: delay in us to wait after reset de-assertion - reset-delay-us: delay in us to wait after reset de-assertion, if not
specified will default to 100ms, as required by the PCIe specification.
Example: Example:
......
...@@ -1181,7 +1181,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port) ...@@ -1181,7 +1181,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)
return ret; return ret;
if (port->reset_gpio) { if (port->reset_gpio) {
u32 reset_udelay = 20000; u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000;
of_property_read_u32(port->dn, "reset-delay-us", of_property_read_u32(port->dn, "reset-delay-us",
&reset_udelay); &reset_udelay);
......
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