Merge "msm8226: mmc: Fix glitch observed during sd clock switch"
diff --git a/platform/msm8226/acpuclock.c b/platform/msm8226/acpuclock.c
index df4c7f6..f45a4b1 100644
--- a/platform/msm8226/acpuclock.c
+++ b/platform/msm8226/acpuclock.c
@@ -121,6 +121,9 @@
 
 	snprintf(clk_name, 64, "sdc%u_core_clk", interface);
 
+	/* Disalbe MCI_CLK before changing the sdcc clock */
+	mmc_boot_mci_clk_disable();
+
 	if(freq == MMC_CLK_400KHZ)
 	{
 		ret = clk_get_set_enable(clk_name, 400000, 1);
@@ -142,17 +145,8 @@
 		ASSERT(0);
 	}
 
-	reg = 0;
-	reg |= MMC_BOOT_MCI_CLK_ENABLE;
-	reg |= MMC_BOOT_MCI_CLK_ENA_FLOW;
-	reg |= MMC_BOOT_MCI_CLK_IN_FEEDBACK;
-	writel(reg, MMC_BOOT_MCI_CLK);
-
-	/* Wait for the MMC_BOOT_MCI_CLK write to go through. */
-	mmc_mclk_reg_wr_delay();
-
-	/* Wait 1 ms to provide the free running SD CLK to the card. */
-	mdelay(1);
+	/* Enable MCI CLK */
+	mmc_boot_mci_clk_enable();
 }
 
 /* Configure UART clock based on the UART block id*/