Merge "platform:msm_shared: Dont enable CDR for tuning commands" into lk.lnx.1.0-dev.1.0
diff --git a/platform/msm_shared/sdhci.c b/platform/msm_shared/sdhci.c
index f114b47..c0f307e 100644
--- a/platform/msm_shared/sdhci.c
+++ b/platform/msm_shared/sdhci.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -859,7 +859,10 @@
 		if (cmd->trans_mode == SDHCI_MMC_READ)
 		{
 			trans_mode |= SDHCI_READ_MODE;
-			sdhci_msm_toggle_cdr(host, true);
+			if(cmd->cmd_index == CMD21_SEND_TUNING_BLOCK)
+				sdhci_msm_toggle_cdr(host, false);
+			else
+				sdhci_msm_toggle_cdr(host, true);
 		}
 		else
 		{
diff --git a/platform/msm_shared/sdhci_msm.c b/platform/msm_shared/sdhci_msm.c
index 5bcbc40..d86baa6 100644
--- a/platform/msm_shared/sdhci_msm.c
+++ b/platform/msm_shared/sdhci_msm.c
@@ -388,10 +388,12 @@
 	if (enable)
 	{
 		core_cfg |= SDCC_DLL_CDR_EN;
+		core_cfg &= ~SDCC_DLL_CDR_EXT_EN;
 	}
 	else
 	{
 		core_cfg &= ~SDCC_DLL_CDR_EN;
+		core_cfg |= SDCC_DLL_CDR_EXT_EN;
 	}
 
 	REG_WRITE32(host, core_cfg, SDCC_DLL_CONFIG_REG);