diff options
author | Richard Zhu <Richard.Zhu@freescale.com> | 2015-05-19 14:40:15 +0800 |
---|---|---|
committer | Richard Zhu <Richard.Zhu@freescale.com> | 2015-05-20 11:09:07 +0800 |
commit | daf0cd066328d2b4b0eb6a31a4b3f397f4846189 (patch) | |
tree | fd7f7297e9e6d2860191563e643a931591b8ac4b /drivers/pci | |
parent | baf761835289f80d6e73c70f83ecf098d449af47 (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')
-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, |