summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-10-27 21:41:58 -0200
committerBjorn Helgaas <bhelgaas@google.com>2015-11-25 11:33:05 -0600
commitbd534e691adada9697b47b6c27acbca611c6fad4 (patch)
tree6b974a44a3748bd0ea1f99024e1264ed8e520ff8 /drivers/pci
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
downloadop-kernel-dev-bd534e691adada9697b47b6c27acbca611c6fad4.zip
op-kernel-dev-bd534e691adada9697b47b6c27acbca611c6fad4.tar.gz
PCI: imx6: Use gpio_set_value_cansleep()
We are in a context where we can sleep, and the PCIe reset gpio may be on an I2C expander. Use the cansleep() variant when setting the GPIO value. Based on a patch from Russell King for pci-mvebu.c. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-imx6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 22e8224..3c3b37f 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -288,9 +288,9 @@ static int imx6_pcie_deassert_core_reset(struct pcie_port *pp)
/* Some boards don't have PCIe reset GPIO. */
if (gpio_is_valid(imx6_pcie->reset_gpio)) {
- gpio_set_value(imx6_pcie->reset_gpio, 0);
+ gpio_set_value_cansleep(imx6_pcie->reset_gpio, 0);
msleep(100);
- gpio_set_value(imx6_pcie->reset_gpio, 1);
+ gpio_set_value_cansleep(imx6_pcie->reset_gpio, 1);
}
return 0;
OpenPOWER on IntegriCloud