This commit modifies dw_mci_probe(), it moves reset assertion before
drv_data->init(host)
Some driver needs to access controller registers in its .init() ops. So,
in order to make such access safe, we should do controller reset before
.init() being called.
Signed-off-by: Wei Li <liwei213@huawei.com>
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: Chen Jun <chenjun14@huawei.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
                goto err_clk_ciu;
        }
 
+       if (!IS_ERR(host->pdata->rstc)) {
+               reset_control_assert(host->pdata->rstc);
+               usleep_range(10, 50);
+               reset_control_deassert(host->pdata->rstc);
+       }
+
        if (drv_data && drv_data->init) {
                ret = drv_data->init(host);
                if (ret) {
                }
        }
 
-       if (!IS_ERR(host->pdata->rstc)) {
-               reset_control_assert(host->pdata->rstc);
-               usleep_range(10, 50);
-               reset_control_deassert(host->pdata->rstc);
-       }
-
        setup_timer(&host->cmd11_timer,
                    dw_mci_cmd11_timer, (unsigned long)host);