platform: msm8226: Add support for boot timestamps

Boot timestamps are added at various points and made
available to kernel through shared memory.

Change-Id: I80dccacc6c28b01fb677faa83cded58037d9ced7
diff --git a/platform/msm8226/include/platform/iomap.h b/platform/msm8226/include/platform/iomap.h
index 851e798..bec3dbc 100644
--- a/platform/msm8226/include/platform/iomap.h
+++ b/platform/msm8226/include/platform/iomap.h
@@ -45,6 +45,10 @@
 #define DLOAD_MODE_ADDR             (MSM_SHARED_IMEM_BASE + 0x0)
 #define EMERGENCY_DLOAD_MODE_ADDR   (MSM_SHARED_IMEM_BASE + 0xFE0)
 
+#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/msm8226/platform.c b/platform/msm8226/platform.c
index 3a44db4..1b97cbc 100644
--- a/platform/msm8226/platform.c
+++ b/platform/msm8226/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)
 
@@ -75,6 +76,16 @@
 	qtimer_uninit();
 }
 
+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);
+}
+
 /* Setup memory for this platform */
 void platform_init_mmu_mappings(void)
 {