platform: msm_shared: Add support to write protect devinfo

Add API to write protect devinfo for verified boot feature. As
part of this add the following functions to support this
* Add api to get read-only attribute of a partition
* Enable RST_n_FUNC of emmc for power-on write protect to work

Change-Id: I466d7ee447680bf5dd2782a6a09232d866251197
diff --git a/platform/msm_shared/mmc_sdhci.c b/platform/msm_shared/mmc_sdhci.c
index 411f22c..76145eb 100644
--- a/platform/msm_shared/mmc_sdhci.c
+++ b/platform/msm_shared/mmc_sdhci.c
@@ -1665,6 +1665,18 @@
 
 	card->block_size = MMC_BLK_SZ;
 
+	/* Enable RST_n_FUNCTION */
+	if (!card->ext_csd[MMC_EXT_CSD_RST_N_FUNC])
+	{
+		mmc_return = mmc_switch_cmd(host, card, MMC_SET_BIT, MMC_EXT_CSD_RST_N_FUNC, RST_N_FUNC_ENABLE);
+
+		if (mmc_return)
+		{
+			dprintf(CRITICAL, "Failed to enable RST_n_FUNCTION\n");
+			return mmc_return;
+		}
+	}
+
 	return mmc_return;
 }