platform: mdm9x35: Implement MPM sleep counter and offset regs for KPI measurements

CRs-Fixed: 588508
Change-Id: I89167e5cc68c8264db613884350708459c3bbf07
diff --git a/platform/mdm9x35/include/platform/iomap.h b/platform/mdm9x35/include/platform/iomap.h
index cf84ee7..81fd263 100755
--- a/platform/mdm9x35/include/platform/iomap.h
+++ b/platform/mdm9x35/include/platform/iomap.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -55,6 +55,9 @@
 #define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL    0xFC4A3000
 #define MPM2_MPM_PS_HOLD                     0xFC4AB000
 
+#define BS_INFO_OFFSET            (0x6B0)
+#define BS_INFO_ADDR              (MSM_SHARED_IMEM_BASE + BS_INFO_OFFSET)
+
 #define SPMI_BASE                 0xFC4C0000
 #define SPMI_GENI_BASE            (SPMI_BASE + 0xA000)
 #define SPMI_PIC_BASE             (SPMI_BASE + 0xB000)
diff --git a/platform/mdm9x35/platform.c b/platform/mdm9x35/platform.c
index cab35c5..3604205 100755
--- a/platform/mdm9x35/platform.c
+++ b/platform/mdm9x35/platform.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -110,6 +110,16 @@
 	return 0;
 }
 
+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_init_mmu_mappings(void)
 {
 	struct smem_ram_ptable *ram_ptable;