提交 4a2eae23 编写于 作者: R Russell King 提交者: Bjorn Helgaas

PCI: mvebu: 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.

Tested-by: Willy Tarreau <w@1wt.eu> (Iomega iConnect Kirkwood, MiraBox Armada 370)
Tested-by: Andrew Lunn <andrew@lunn.ch> (D-Link DIR664 Kirkwood)
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP)
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
上级 3884d846
无相关合并请求
......@@ -1111,8 +1111,8 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
of_property_read_u32(child, "reset-delay-us",
&reset_udelay);
gpio_set_value(port->reset_gpio,
(port->reset_active_low) ? 1 : 0);
gpio_set_value_cansleep(port->reset_gpio,
!!port->reset_active_low);
msleep(reset_udelay/1000);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部