diff options
author | Richard Zhu <Richard.Zhu@freescale.com> | 2015-05-19 14:40:15 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:23:04 -0500 |
commit | 3c77b3042daee005fd9b649dbc2f0bf277e32c56 (patch) | |
tree | 6cd8e84736da8256d86bf33f91df572ae4ff4dda /drivers/pci/host | |
parent | 58cdd238d0a57b12f498aeec2321502662884350 (diff) |
MLK-10924-2 pci: imx: add the w_disable signal control
There is w_disable signal design on the pcie interface
on imx7d sdb board.
Add the w_disable control into imx pci driver, and
initialized it to be high
Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pci-imx6.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index f7ede149b68a..2f5bb7e88034 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -46,6 +46,7 @@ static u32 ddr_test_region = 0, test_region_size = SZ_2M; struct imx6_pcie { + int dis_gpio; int reset_gpio; int power_on_gpio; struct clk *pcie_bus; @@ -1261,6 +1262,16 @@ static int __init imx6_pcie_probe(struct platform_device *pdev) return PTR_ERR(pp->dbi_base); /* Fetch GPIOs */ + imx6_pcie->dis_gpio = of_get_named_gpio(np, "disable-gpio", 0); + if (gpio_is_valid(imx6_pcie->dis_gpio)) { + ret = devm_gpio_request_one(&pdev->dev, imx6_pcie->dis_gpio, + GPIOF_OUT_INIT_HIGH, "PCIe DIS"); + if (ret) { + dev_err(&pdev->dev, "unable to get disable gpio\n"); + return ret; + } + } + imx6_pcie->reset_gpio = of_get_named_gpio(np, "reset-gpio", 0); if (gpio_is_valid(imx6_pcie->reset_gpio)) { ret = devm_gpio_request_one(&pdev->dev, imx6_pcie->reset_gpio, |