msm_shared: smem: Add New v7 format type for socinfo

Change-Id: Iedd3f55a2c5f27f1009a10ae2cea857272c1cf11
diff --git a/platform/msm_shared/board.c b/platform/msm_shared/board.c
index c9d48bf..fdc5ed0 100644
--- a/platform/msm_shared/board.c
+++ b/platform/msm_shared/board.c
@@ -42,6 +42,7 @@
 static void platform_detect()
 {
 	struct smem_board_info_v6 board_info_v6;
+	struct smem_board_info_v7 board_info_v7;
 	unsigned int board_info_len = 0;
 	unsigned ret = 0;
 	unsigned format = 0;
@@ -51,23 +52,39 @@
 	if (ret)
 		return;
 
-	if (format == 6) {
-		board_info_len = sizeof(board_info_v6);
+	if (format == 6)
+	{
+			board_info_len = sizeof(board_info_v6);
 
-		ret =
-			smem_read_alloc_entry(SMEM_BOARD_INFO_LOCATION,
-					  &board_info_v6,
-					  board_info_len);
+		ret = smem_read_alloc_entry(SMEM_BOARD_INFO_LOCATION,
+				&board_info_v6,
+				board_info_len);
 		if (ret)
 			return;
 
 		board.platform = board_info_v6.board_info_v3.msm_id;
-		board.platform_hw =
-			board_info_v6.board_info_v3.hw_platform;
-		board.platform_subtype =
-			board_info_v6.platform_subtype;
-	} else {
-		dprintf(CRITICAL, "Unsupported board info format.\n");
+		board.platform_hw = board_info_v6.board_info_v3.hw_platform;
+		board.platform_subtype = board_info_v6.platform_subtype;
+	}
+	else if (format == 7)
+	{
+		board_info_len = sizeof(board_info_v7);
+
+		ret = smem_read_alloc_entry(SMEM_BOARD_INFO_LOCATION,
+				&board_info_v7,
+				board_info_len);
+		if (ret)
+			return;
+
+		board.platform = board_info_v7.board_info_v3.msm_id;
+		board.platform_hw = board_info_v7.board_info_v3.hw_platform;
+		board.platform_subtype = board_info_v7.platform_subtype;
+
+	}
+	else
+	{
+		dprintf(CRITICAL, "Unsupported board info format\n");
+		ASSERT(0);
 	}
 }
 
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index 245bf2e..719efe2 100644
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -63,6 +63,35 @@
 	unsigned raw_msm_version;
 };
 
+typedef enum
+{
+   PMIC_IS_PM6610,
+   PMIC_IS_PM6620,
+   PMIC_IS_PM6640,
+   PMIC_IS_PM6650,
+   PMIC_IS_PM7500,
+   PMIC_IS_PANORAMIX,
+   PMIC_IS_PM6652,
+   PMIC_IS_PM6653,
+   PMIC_IS_PM6658,
+   PMIC_IS_EPIC,
+   PMIC_IS_HAN,
+   PMIC_IS_KIP,
+   PMIC_IS_WOOKIE,
+   PMIC_IS_PM8058,
+   PMIC_IS_PM8028,
+   PMIC_IS_PM8901,
+   PMIC_IS_PM8027 ,
+   PMIC_IS_ISL_9519,
+   PMIC_IS_PM8921,
+   PMIC_IS_PM8018,
+   PMIC_IS_PM8015,
+   PMIC_IS_PM8014,
+   PMIC_IS_PM8821,
+   PMIC_IS_PM8038,
+   PMIC_IS_INVALID,
+} pm_model_type;
+
 struct smem_board_info_v3 {
 	unsigned format;
 	unsigned msm_id;
@@ -93,6 +122,16 @@
 	unsigned buffer_align;	//Need for 8 bytes alignment while reading from shared memory.
 };
 
+struct smem_board_info_v7 {
+	struct smem_board_info_v3 board_info_v3;
+	unsigned platform_version;
+	unsigned fused_chip;
+	unsigned platform_subtype;
+	unsigned pmic_type;
+	unsigned pmic_version;
+	unsigned buffer_align;	//Need for 8 bytes alignment while reading from shared memory.
+};
+
 typedef struct {
 	unsigned key_len;
 	unsigned iv_len;