Merge "platform:Add function to detect platform for MSM8909 and determine the boot mask"
diff --git a/platform/apq8084/platform.c b/platform/apq8084/platform.c
index cf13b5a..923588d 100644
--- a/platform/apq8084/platform.c
+++ b/platform/apq8084/platform.c
@@ -167,3 +167,8 @@
 	/* Using 1-1 mapping on this platform. */
 	return phys_addr;
 }
+
+int boot_device_mask(int val)
+{
+	return ((val & 0x3E) >> 1);
+}
diff --git a/platform/msm8909/platform.c b/platform/msm8909/platform.c
index 1ea030a..6479681 100644
--- a/platform/msm8909/platform.c
+++ b/platform/msm8909/platform.c
@@ -184,3 +184,27 @@
 		return MSM_SHARED_BASE;
 }
 
+int platform_is_msm8909()
+{
+	uint32_t platform = board_platform_id();
+	uint32_t ret = 0;
+
+	switch(platform)
+	{
+		case MSM8909:
+		case MSM8209:
+		case MSM8208:
+		case APQ8009:
+			ret = 1;
+			break;
+		default:
+			ret = 0;
+	};
+
+	return ret;
+}
+
+int boot_device_mask(int val)
+{
+	return ((val & 0x0E) >> 1);
+}
diff --git a/platform/msm8994/platform.c b/platform/msm8994/platform.c
index 8c6d5f4..e2e3aa8 100644
--- a/platform/msm8994/platform.c
+++ b/platform/msm8994/platform.c
@@ -182,3 +182,8 @@
 	else
 		return ((addr_t)BS_INFO_ADDR2);
 }
+
+int boot_device_mask(int val)
+{
+	return ((val & 0x3E) >> 1);
+}