Skip to content

Commit c34eda6

Browse files
mripardstorulf
authored andcommitted
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: Maxime Ripard <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 734d21c commit c34eda6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/sunxi-mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
12421242
}
12431243

12441244
if (!IS_ERR(host->reset)) {
1245-
ret = reset_control_deassert(host->reset);
1245+
ret = reset_control_reset(host->reset);
12461246
if (ret) {
12471247
dev_err(&pdev->dev, "reset err %d\n", ret);
12481248
goto error_disable_clk_sample;

0 commit comments

Comments
 (0)