Skip to content

Commit

Permalink
mmc: sunxi: Reset the device at probe time
Browse files Browse the repository at this point in the history
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: Maxime Ripard <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
mripard authored and storulf committed Aug 30, 2017
1 parent 734d21c commit c34eda6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/sunxi-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
}

if (!IS_ERR(host->reset)) {
ret = reset_control_deassert(host->reset);
ret = reset_control_reset(host->reset);
if (ret) {
dev_err(&pdev->dev, "reset err %d\n", ret);
goto error_disable_clk_sample;
Expand Down

0 comments on commit c34eda6

Please sign in to comment.