diff mbox

mmc: dw_mmc-k3: Move reset code to hi3660 init code

Message ID 1501095993-7511-1-git-send-email-john.stultz@linaro.org
State New
Headers show

Commit Message

John Stultz July 26, 2017, 7:06 p.m. UTC
The reset code, added to support hi3660 here was causing
warnings on the original hikey, so move the added code to
hi3660 specific initialization.

Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 drivers/mmc/host/dw_mmc-k3.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index 919fd33..a581a22d 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -269,6 +269,13 @@  static void dw_mci_hs_set_timing(struct dw_mci *host, int timing,
 
 static int dw_mci_hi3660_init(struct dw_mci *host)
 {
+	struct reset_control	*rst;
+
+	rst = devm_reset_control_get(host->dev, NULL);
+	if (!IS_ERR(rst))
+		reset_control_reset(rst);
+
+
 	mci_writel(host, CDTHRCTL, SDMMC_SET_THLD(SDCARD_RD_THRESHOLD,
 		    SDMMC_CARD_RD_THR_EN));
 
@@ -465,11 +472,6 @@  static int dw_mci_k3_probe(struct platform_device *pdev)
 {
 	const struct dw_mci_drv_data *drv_data;
 	const struct of_device_id *match;
-	struct reset_control	*rst;
-
-	rst = devm_reset_control_get(&pdev->dev, NULL);
-	if (!IS_ERR(rst))
-		reset_control_reset(rst);
 
 	match = of_match_node(dw_mci_k3_match, pdev->dev.of_node);
 	drv_data = match->data;