platform: msm8x10: Add support for boot timestamps

Provide access to mpm sleep counter and BS SHARED_IMEM locations
to enable boot time stamp collection.

Change-Id: If2172390e55d2a92e5f38796df04a70f421fe455
diff --git a/platform/msm8610/include/platform/iomap.h b/platform/msm8610/include/platform/iomap.h
index 0c00cf4..348487e 100644
--- a/platform/msm8610/include/platform/iomap.h
+++ b/platform/msm8610/include/platform/iomap.h
@@ -42,6 +42,10 @@
 #define MSM_SHARED_IMEM_BASE        0xFE805000
 #define RESTART_REASON_ADDR         (MSM_SHARED_IMEM_BASE + 0x65C)
 
+#define BS_INFO_OFFSET              (0x6B0)
+#define BS_INFO_ADDR                (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET)
+#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL    0xFC4A3000
+
 #define MSM_GIC_DIST_BASE           APPS_SS_BASE
 #define MSM_GIC_CPU_BASE            (APPS_SS_BASE + 0x2000)
 #define APPS_APCS_QTMR_AC_BASE      (APPS_SS_BASE + 0x00020000)
diff --git a/platform/msm8610/platform.c b/platform/msm8610/platform.c
index ac74205..40ce82a 100644
--- a/platform/msm8610/platform.c
+++ b/platform/msm8610/platform.c
@@ -36,6 +36,7 @@
 #include <arch/arm/mmu.h>
 #include <smem.h>
 #include <board.h>
+#include <boot_stats.h>
 
 #define MB (1024*1024)
 
@@ -76,6 +77,16 @@
 	dprintf(INFO, "platform_init()\n");
 }
 
+uint32_t platform_get_sclk_count(void)
+{
+	return readl(MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL);
+}
+
+addr_t get_bs_info_addr()
+{
+	return ((addr_t)BS_INFO_ADDR);
+}
+
 void platform_uninit(void)
 {
 	qtimer_uninit();