Merge "platform: msm_shared: Add support to read chip serial from SMEM"
diff --git a/platform/msm_shared/board.c b/platform/msm_shared/board.c
index fbbe62b..07d4f8a 100644
--- a/platform/msm_shared/board.c
+++ b/platform/msm_shared/board.c
@@ -35,6 +35,7 @@
static struct board_data board = {UNKNOWN,
0,
0,
+ 0,
HW_PLATFORM_UNKNOWN,
HW_PLATFORM_SUBTYPE_UNKNOWN,
LINUX_MACHTYPE_UNKNOWN,
@@ -147,6 +148,9 @@
if (format_minor == 0x9)
board.foundry_id = board_info_v8.foundry_id;
+
+ if (format_minor == 0xA)
+ board.chip_serial = board_info_v8.chip_serial;
}
/* HLOS subtype
@@ -200,6 +204,11 @@
return board.foundry_id;
}
+uint32_t board_chip_serial(void)
+{
+ return board.chip_serial;
+}
+
uint8_t board_pmic_info(struct board_pmic_data *info, uint8_t num_ent)
{
uint8_t i;
diff --git a/platform/msm_shared/include/board.h b/platform/msm_shared/include/board.h
index d7e82d5..d65ed64 100644
--- a/platform/msm_shared/include/board.h
+++ b/platform/msm_shared/include/board.h
@@ -45,6 +45,7 @@
struct board_data {
uint32_t platform;
uint32_t foundry_id;
+ uint32_t chip_serial;
uint32_t platform_version;
uint32_t platform_hw;
uint32_t platform_subtype;
@@ -67,6 +68,7 @@
uint32_t board_get_ddr_subtype(void);
uint32_t board_hlos_subtype(void);
uint32_t board_pmic_target(uint8_t num_ent);
+uint32_t board_chip_serial(void);
/* DDR Subtype Macros
* Determine the DDR Size on the device and define
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index d89251e..7760e69 100644
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -188,7 +188,8 @@
* Need for 8 bytes alignment
* while reading from shared memory
*/
- uint32_t foundry_id; /* Used as foundry_id only for v9 and used as an alignment field for v8 */
+ uint32_t foundry_id; /* Used as foundry_id only for v9 */
+ uint32_t chip_serial; /* Used as serial number for v10 */
};
typedef struct {