Merge "Updating the copyrights"
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*/
diff --git a/platform/msm8960/acpuclock.c b/platform/msm8960/acpuclock.c
index 65f4135..2681138 100644
--- a/platform/msm8960/acpuclock.c
+++ b/platform/msm8960/acpuclock.c
@@ -215,6 +215,9 @@
 
 	snprintf(sdc_clk, 64, "sdc%u_clk", interface);
 
+	/* Disalbe MCI_CLK before changing the sdcc clock */
+	mmc_boot_mci_clk_disable();
+
 	switch(freq)
 	{
 	case MMC_CLK_400KHZ:
@@ -231,16 +234,8 @@
 
 	clk_get_set_enable(sdc_clk, rate, 1);
 
-	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 crypto engine clock */
diff --git a/platform/msm8974/acpuclock.c b/platform/msm8974/acpuclock.c
index 9ed4110..9f4b6e4 100644
--- a/platform/msm8974/acpuclock.c
+++ b/platform/msm8974/acpuclock.c
@@ -122,6 +122,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);
@@ -143,17 +146,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);
+	/* Enalbe MCI clock */
+	mmc_boot_mci_clk_enable();
 }
 
 /* Configure UART clock based on the UART block id*/
diff --git a/platform/msm_shared/include/mmc.h b/platform/msm_shared/include/mmc.h
index eee414e..43ae057 100644
--- a/platform/msm_shared/include/mmc.h
+++ b/platform/msm_shared/include/mmc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2013, 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
@@ -58,6 +58,7 @@
 #define MMC_BOOT_MCI_CLK                  MMC_BOOT_MCI_REG(0x004)	/* 16 bits */
 /* Enable MCI bus clock - 0: clock disabled 1: enabled */
 #define MMC_BOOT_MCI_CLK_ENABLE           (1 << 8)
+#define MMC_BOOT_MCI_CLK_DISABLE          (0 << 8)
 /* Disable clk o/p when bus idle- 0:always enabled 1:enabled when bus active */
 #define MMC_BOOT_MCI_CLK_PWRSAVE          (1 << 9)
 /* Enable Widebus mode - 00: 1 bit mode 10:4 bit mode 01/11: 8 bit mode */
@@ -603,4 +604,6 @@
 struct mmc_boot_host *get_mmc_host(void);
 struct mmc_boot_card *get_mmc_card(void);
 void mmc_mclk_reg_wr_delay();
+void mmc_boot_mci_clk_enable();
+void mmc_boot_mci_clk_disable();
 #endif
diff --git a/platform/msm_shared/mmc.c b/platform/msm_shared/mmc.c
index 527ba58..8db6c11 100644
--- a/platform/msm_shared/mmc.c
+++ b/platform/msm_shared/mmc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2013, 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
@@ -2953,6 +2953,43 @@
 	return &mmc_card;
 }
 
+/*
+ * Disable MCI clk
+ */
+void mmc_boot_mci_clk_disable()
+{
+	uint32_t reg = 0;
+
+	reg |= MMC_BOOT_MCI_CLK_DISABLE;
+	writel(reg, MMC_BOOT_MCI_CLK);
+
+	/* Wait for the MMC_BOOT_MCI_CLK write to go through. */
+	mmc_mclk_reg_wr_delay();
+}
+
+/*
+ * Enable MCI CLK
+ */
+void mmc_boot_mci_clk_enable()
+{
+	uint32_t 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();
+
+	/* Enable power save */
+	reg |= MMC_BOOT_MCI_CLK_PWRSAVE;
+	writel(reg, MMC_BOOT_MCI_CLK);
+
+	/* Wait for the MMC_BOOT_MCI_CLK write to go through. */
+	mmc_mclk_reg_wr_delay();
+}
+
 #if MMC_BOOT_BAM
 
 void mmc_boot_dml_init()
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index 39d53e8..be5160d 100755
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -302,6 +302,7 @@
 	HW_PLATFORM_MTP = 8,
 	HW_PLATFORM_LIQUID = 9,
 	HW_PLATFORM_DRAGON = 10,
+	HW_PLATFORM_QRD = 11,
 	HW_PLATFORM_HRD = 13,
 	HW_PLATFORM_DTV = 14,
 	HW_PLATFORM_RUMI   = 15,
diff --git a/project/msm8974.mk b/project/msm8974.mk
index f8dd988..ab53f9f 100644
--- a/project/msm8974.mk
+++ b/project/msm8974.mk
@@ -14,3 +14,6 @@
 DEFINES += DEVICE_TREE=1
 #DEFINES += MMC_BOOT_BAM=1
 DEFINES += CRYPTO_BAM=1
+
+#Disable thumb mode
+ENABLE_THUMB := false
diff --git a/target/msm8960/include/target/board.h b/target/msm8960/include/target/board.h
index 9a6f150..3a46801 100644
--- a/target/msm8960/include/target/board.h
+++ b/target/msm8960/include/target/board.h
@@ -49,6 +49,7 @@
 #define LINUX_MACHTYPE_8930_CDP     3727
 #define LINUX_MACHTYPE_8930_MTP     3728
 #define LINUX_MACHTYPE_8930_FLUID   3729
+#define LINUX_MACHTYPE_8930_EVT     4558
 
 /* 8064 */
 #define LINUX_MACHTYPE_8064_SIM     3572
diff --git a/target/msm8960/init.c b/target/msm8960/init.c
index 52e34f7..f26f982 100755
--- a/target/msm8960/init.c
+++ b/target/msm8960/init.c
@@ -289,6 +289,7 @@
 	case LINUX_MACHTYPE_8930_CDP:
 	case LINUX_MACHTYPE_8930_MTP:
 	case LINUX_MACHTYPE_8930_FLUID:
+	case LINUX_MACHTYPE_8930_EVT:
 
 		uart_dm_init(5, 0x16400000, 0x16440000);
 		break;
@@ -378,6 +379,9 @@
 		case HW_PLATFORM_FLUID:
 			target_id = LINUX_MACHTYPE_8930_FLUID;
 			break;
+		case HW_PLATFORM_QRD:
+			target_id = LINUX_MACHTYPE_8930_EVT;
+			break;
 		default:
 			target_id = LINUX_MACHTYPE_8930_CDP;
 		}