platform: msm_shared: Add target specific property for h200 mode

Some platforms advertise as hs200 supported in the capability register
but the hw teams suggest not to use hs200. To solve this problem use
target specific property to populate the hs200 capability instead of
just relying on the capability register values.

Change-Id: I94dcc6de8606d41c5d2620dc6c2a8a42ba4a2f49
diff --git a/platform/msm_shared/include/mmc_sdhci.h b/platform/msm_shared/include/mmc_sdhci.h
index 5f5ba72..d54cc45 100644
--- a/platform/msm_shared/include/mmc_sdhci.h
+++ b/platform/msm_shared/include/mmc_sdhci.h
@@ -306,6 +306,7 @@
 	uint32_t pwrctl_base;  /* Base address for power control registers */
 	uint16_t bus_width;    /* Bus width used */
 	uint32_t max_clk_rate; /* Max clock rate supported */
+	uint8_t hs200_support; /* SDHC HS200 mode supported or not */
 	uint8_t hs400_support; /* SDHC HS400 mode supported or not */
 	uint8_t use_io_switch; /* IO pad switch flag for shared sdc controller */
 };
diff --git a/platform/msm_shared/include/sdhci.h b/platform/msm_shared/include/sdhci.h
index 7dc93a6..4d3c16c 100644
--- a/platform/msm_shared/include/sdhci.h
+++ b/platform/msm_shared/include/sdhci.h
@@ -56,6 +56,7 @@
 	uint8_t ddr_support;     /* Dual Data rate */
 	uint8_t sdr50_support;   /* UHS mode, with 100 MHZ clock */
 	uint8_t sdr104_support;  /* UHS mode, with 200 MHZ clock */
+	uint8_t hs200_support;   /* Hs200 mode, with 200 MHZ clock */
 	uint8_t hs400_support;   /* Hs400 mode, with 400 MHZ clock */
 };
 
diff --git a/platform/msm_shared/mmc_sdhci.c b/platform/msm_shared/mmc_sdhci.c
index 76145eb..5ac308f 100644
--- a/platform/msm_shared/mmc_sdhci.c
+++ b/platform/msm_shared/mmc_sdhci.c
@@ -1082,6 +1082,7 @@
 
 	host->base = cfg->sdhc_base;
 	host->sdhc_event = &sdhc_event;
+	host->caps.hs200_support = cfg->hs200_support;
 	host->caps.hs400_support = cfg->hs400_support;
 
 	data = (struct sdhci_msm_data *) malloc(sizeof(struct sdhci_msm_data));
@@ -1601,7 +1602,11 @@
 				return mmc_return;
 			}
 		}
+#if USE_TARGET_HS200_CAPS
+		else if (host->caps.hs200_support && host->caps.sdr104_support && mmc_card_supports_hs200_mode(card))
+#else
 		else if (host->caps.sdr104_support && mmc_card_supports_hs200_mode(card))
+#endif
 		{
 			dprintf(INFO, "SDHC Running in HS200 mode\n");
 			mmc_return = mmc_set_hs200_mode(host, card, bus_width);