summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-02-04 13:09:49 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2015-12-26 14:33:12 +0100
commit8437c2f0e4fafb9a31dd260704cc6b7a22bf33f8 (patch)
tree47947ea7c4bf15c7b2c877d29bf8a608fffe7a11 /drivers/pci
parentf2bb337d37acd680404371d2530a486bfe821ce2 (diff)
pcie-imx6: improve reset function for reseting EP
If the reset gpio for a PCIe switch is invalid, but a gpio for reseting downstream EP devices is valid no reset pulse for the EP devices is generated. (i.e. in the device tree reset-gpio is not defined but reset-ep-gpio is defined) The patch fixes this. Original patch from Juha Kokkonen, Huoltamoeletroniikka Ky (cherry picked from commit f593ebc9921013a992c1d096bf4cbad17c1af01b) Conflicts: drivers/pci/host/pci-imx6.c
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-imx6.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index add3a42672bd..d5d9f7991a84 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -421,6 +421,11 @@ static int imx6_pcie_deassert_core_reset(struct pcie_port *pp)
* handle the rest of the reset toggling.
*/
mdelay(20);
+ } else if (gpio_is_valid(imx6_pcie->reset_ep_gpio)) {
+ gpio_set_value_cansleep(imx6_pcie->reset_ep_gpio, 1);
+ mdelay(100);
+ gpio_set_value_cansleep(imx6_pcie->reset_ep_gpio, 0);
+ mdelay(20);
} else {
/* allow the clocks to stabilize */
udelay(200);