提交 c34eda69 编写于 作者: M Maxime Ripard 提交者: Ulf Hansson

mmc: sunxi: Reset the device at probe time

We might be into some troubles if the bootloader misconfigured the MMC
controller.

We currently only de-assert the reset line at probe time, which means that
if the device was already out of reset, we're going to keep whatever state
was set already.

Switch to a reset instead of the deassert to have a device in a pristine
state when we start operating.
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 734d21cc
...@@ -1242,7 +1242,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, ...@@ -1242,7 +1242,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
} }
if (!IS_ERR(host->reset)) { if (!IS_ERR(host->reset)) {
ret = reset_control_deassert(host->reset); ret = reset_control_reset(host->reset);
if (ret) { if (ret) {
dev_err(&pdev->dev, "reset err %d\n", ret); dev_err(&pdev->dev, "reset err %d\n", ret);
goto error_disable_clk_sample; goto error_disable_clk_sample;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册