platform: msm_shared: Update erase timeout in us

Erase timeout calculated from spec is in milli seconds,
host controller driver expects the timeout value in micro
seconds. This causes the host controller driver to timeout
pre-maturely resulting into erase timeout. Update the erase
timeout to micro second value.

Change-Id: I53d886517ee283447dedb3c30d679b2aa2632ef4
diff --git a/platform/msm_shared/include/sdhci.h b/platform/msm_shared/include/sdhci.h
index 4d3c16c..604ac81 100644
--- a/platform/msm_shared/include/sdhci.h
+++ b/platform/msm_shared/include/sdhci.h
@@ -99,7 +99,7 @@
 	uint32_t trans_mode;    /* Transfer mode, read/write */
 	uint32_t cmd_retry;     /* Retry the command, if card is busy */
 	uint32_t cmd23_support; /* If card supports cmd23 */
-	uint64_t cmd_timeout;   /* Command timeout in ms */
+	uint64_t cmd_timeout;   /* Command timeout in us */
 	struct mmc_data data;   /* Data pointer */
 };
 
diff --git a/platform/msm_shared/mmc_sdhci.c b/platform/msm_shared/mmc_sdhci.c
index 5ac308f..5788bb7 100644
--- a/platform/msm_shared/mmc_sdhci.c
+++ b/platform/msm_shared/mmc_sdhci.c
@@ -2176,9 +2176,9 @@
 
 	/*
 	 * As per emmc 4.5 spec section 7.4.27, calculate the erase timeout
-	 * erase_timeout = 300 * ERASE_TIMEOUT_MULT * num_erase_grps
+	 * erase_timeout = 300ms * ERASE_TIMEOUT_MULT * num_erase_grps
 	 */
-	erase_timeout = (300 * card->ext_csd[MMC_ERASE_TIMEOUT_MULT] * num_erase_grps);
+	erase_timeout = (300 * 1000 * card->ext_csd[MMC_ERASE_TIMEOUT_MULT] * num_erase_grps);
 
 	/* Send CMD38 to perform erase */
 	if (mmc_send_erase(dev, erase_timeout))
diff --git a/platform/msm_shared/sdhci.c b/platform/msm_shared/sdhci.c
index 8f6a86e..5ffbb88 100644
--- a/platform/msm_shared/sdhci.c
+++ b/platform/msm_shared/sdhci.c
@@ -430,7 +430,7 @@
 	uint8_t i;
 	uint8_t ret = 0;
 	uint8_t need_reset = 0;
-	uint32_t retry = 0;
+	uint64_t retry = 0;
 	uint32_t int_status;
 	uint32_t trans_complete = 0;
 	uint32_t err_status;