summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pcie-iproc.h
diff options
context:
space:
mode:
authorOza Pawandeep <oza.oza@broadcom.com>2017-08-29 00:43:35 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-09-05 20:27:03 +0300
commitb91c26c6a539e26261cbe280b9f48311663ce655 (patch)
treee27ec47aabff5110f85dd1e894c66c6a5ea964d1 /drivers/pci/host/pcie-iproc.h
parent39b7a4ff930143f17d05cd769ba2099f9249e898 (diff)
downloadlinux-b91c26c6a539e26261cbe280b9f48311663ce655.tar.xz
PCI: iproc: Add 500ms delay during device shutdown
During soft reset (e.g., "reboot" from Linux) on some iProc-based SOCs, the LCPLL clock and PERST both go off simultaneously. This seems in accordance with the PCIe Card Electromechanical spec, r2.0, sec 2.2.3, which says the clock goes inactive after PERST# goes active, but doesn't specify how long the clock should be valid after PERST#. However, we have observed that with the iProc Stingray, some Intel NVMe endpoints, e.g., the P3700 400GB series, are not detected correctly upon the next boot sequence unless the clock remains valid for some time after PERST# is asserted. Delay 500ms after asserting PERST# before performing a reboot. The 500ms is experimentally determined. Signed-off-by: Oza Pawandeep <oza.oza@broadcom.com> [bhelgaas: changelog, add spec reference, fold in iproc_pcie_shutdown() export from Arnd Bergmann <arnd@arndb.de>] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc.h')
-rw-r--r--drivers/pci/host/pcie-iproc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h
index 0bbe2ea44f3e..a6b55cec9a66 100644
--- a/drivers/pci/host/pcie-iproc.h
+++ b/drivers/pci/host/pcie-iproc.h
@@ -110,6 +110,7 @@ struct iproc_pcie {
int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res);
int iproc_pcie_remove(struct iproc_pcie *pcie);
+int iproc_pcie_shutdown(struct iproc_pcie *pcie);
#ifdef CONFIG_PCIE_IPROC_MSI
int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node);