PCI: rockchip: dw: Request perst IO as output-low state

Requesting perst# as high and then drive it low makes some
buggy devices fail to work properly, for instance Biwin SSD.
It's not mandatory to have a high-low transition for perst#
before powering up. So we request it as output-low state directly
and remove redundant code.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib62954f8dccc8a21dd06e7a582263bcf62995f29
This commit is contained in:
Shawn Lin
2021-08-12 09:19:31 +08:00
committed by Tao Huang
parent 18545b79ed
commit c005a5bfe6

View File

@@ -1060,8 +1060,16 @@ static int rk_pcie_resource_get(struct platform_device *pdev,
if (IS_ERR(rk_pcie->apb_base))
return PTR_ERR(rk_pcie->apb_base);
/*
* Rest the device before enabling power because some of the
* platforms may use external refclk input with the some power
* rail connect to 100MHz OSC chip. So once the power is up for
* the slot and the refclk is available, which isn't quite follow
* the spec. We should make sure it is in reset state before
* everthing's ready.
*/
rk_pcie->rst_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
GPIOD_OUT_HIGH);
GPIOD_OUT_LOW);
if (IS_ERR(rk_pcie->rst_gpio)) {
dev_err(&pdev->dev, "invalid reset-gpios property in node\n");
return PTR_ERR(rk_pcie->rst_gpio);