msm8992: update shared IMEM base address for msm8992

IMEM base address for msm8992 has now changed from 8994
This change updates for msm8992

Change-Id: I60c462f4581b755d09a54fe061de13d9612b80cf
diff --git a/platform/msm8994/include/platform/iomap.h b/platform/msm8994/include/platform/iomap.h
index 6788981..fd654cb 100644
--- a/platform/msm8994/include/platform/iomap.h
+++ b/platform/msm8994/include/platform/iomap.h
@@ -36,11 +36,13 @@
 
 #define SYSTEM_IMEM_BASE            0xFE800000
 #define MSM_SHARED_IMEM_BASE        0xFE87F000
+#define MSM_SHARED_IMEM_BASE2       0xFE80F000
 #define RESTART_REASON_ADDR         (MSM_SHARED_IMEM_BASE + 0x65C)
+#define RESTART_REASON_ADDR2        (MSM_SHARED_IMEM_BASE2 + 0x65C)
 
-#define BS_INFO_OFFSET                       (0x6B0)
-#define BS_INFO_ADDR                         (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET)
-
+#define BS_INFO_OFFSET              (0x6B0)
+#define BS_INFO_ADDR                (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET)
+#define BS_INFO_ADDR2               (MSM_SHARED_IMEM_BASE2 + BS_INFO_OFFSET)
 
 #define KPSS_BASE                   0xF9000000
 
diff --git a/platform/msm8994/platform.c b/platform/msm8994/platform.c
index f494f3f..8c6d5f4 100644
--- a/platform/msm8994/platform.c
+++ b/platform/msm8994/platform.c
@@ -166,7 +166,19 @@
 	return readl(MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL);
 }
 
+int platform_is_msm8994()
+{
+	uint32_t platform = board_platform_id();
+	if ((platform == APQ8094) || (platform == MSM8994))
+		return 1;
+	else
+		return 0;
+}
+
 addr_t get_bs_info_addr()
 {
-	return ((addr_t)BS_INFO_ADDR);
+	if (platform_is_msm8994())
+		return ((addr_t)BS_INFO_ADDR);
+	else
+		return ((addr_t)BS_INFO_ADDR2);
 }
diff --git a/target/msm8994/init.c b/target/msm8994/init.c
index 103853c..d19d01d 100644
--- a/target/msm8994/init.c
+++ b/target/msm8994/init.c
@@ -88,6 +88,7 @@
 struct ufs_dev ufs_device;
 
 extern void ulpi_write(unsigned val, unsigned reg);
+extern int platform_is_msm8994();
 
 void target_early_init(void)
 {
@@ -364,7 +365,10 @@
 	uint32_t restart_reason = 0;
 	uint32_t restart_reason_addr;
 
-	restart_reason_addr = RESTART_REASON_ADDR;
+	if (platform_is_msm8994())
+		restart_reason_addr = RESTART_REASON_ADDR;
+	else
+		restart_reason_addr = RESTART_REASON_ADDR2;
 
 	/* Read reboot reason and scrub it */
 	restart_reason = readl(restart_reason_addr);