msm8660: Add support to detect platform subtype

board_info v5 does not always detect fused chip correctly.
As a result board_info v6 has new entries to detect platform
subtype and thats what we want to use eventually.

Adding support for board_info v6 structure, while maintining
support for board_info v5 for the time being.

Change-Id: I46447edd561f1d9e306741f0113c3e2ef17ae3e1
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
diff --git a/platform/msm_shared/include/baseband.h b/platform/msm_shared/include/baseband.h
index 2fd1352..433f783 100644
--- a/platform/msm_shared/include/baseband.h
+++ b/platform/msm_shared/include/baseband.h
@@ -1,42 +1,43 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.

-

- * Redistribution and use in source and binary forms, with or without

- * modification, are permitted provided that the following conditions are

- * met:

- *   * Redistributions of source code must retain the above copyright

- *     notice, this list of conditions and the following disclaimer.

- *   * Redistributions in binary form must reproduce the above

- *     copyright notice, this list of conditions and the following

- *     disclaimer in the documentation and/or other materials provided

- *     with the distribution.

- *   * Neither the name of Code Aurora Forum, Inc. nor the names of its

- *     contributors may be used to endorse or promote products derived

- *     from this software without specific prior written permission.

- *

- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED

- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT

- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS

- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF

- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR

- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,

- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE

- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN

- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

- */

-

-#ifndef __BASEBAND_H__

-#define __BASEBAND_H__

-

-enum baseband

-{

-    BASEBAND_MSM     = 0,

-    BASEBAND_APQ     = 1,

-    BASEBAND_CSFB    = 2,

-    BASEBAND_SVLTE   = 3,

-    BASEBAND_32BITS  = 0x7FFFFFFF

-};

-

-#endif

-

+/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *   * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __BASEBAND_H__
+#define __BASEBAND_H__
+
+enum baseband
+{
+    BASEBAND_MSM     = 0,
+    BASEBAND_APQ     = 1,
+    BASEBAND_CSFB    = 2,
+    BASEBAND_SVLTE1  = 3,
+    BASEBAND_SVLTE2A = 4,
+    BASEBAND_32BITS  = 0x7FFFFFFF
+};
+
+#endif
+
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index 541ffbc..71da345 100644
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -99,6 +99,15 @@
     unsigned fused_chip;
 };
 
+struct smem_board_info_v6
+{
+    struct smem_board_info_v3 board_info_v3;
+    unsigned platform_version;
+    unsigned fused_chip;
+    unsigned platform_subtype;
+    unsigned buffer_align; //Need for 8 bytes alignment while reading from shared memory.
+};
+
 /* chip information */
 enum {
     UNKNOWN = 0,
@@ -120,6 +129,15 @@
     HW_PLATFORM_32BITS  = 0x7FFFFFFF
 };
 
+enum platform_subtype
+{
+    HW_PLATFORM_SUBTYPE_UNKNOWN = 0,
+    HW_PLATFORM_SUBTYPE_CSFB    = 1,
+    HW_PLATFORM_SUBTYPE_SVLTE1  = 2,
+    HW_PLATFORM_SUBTYPE_SVLTE2A = 3,
+    HW_PLATFORM_SUBTYPE_32BITS  = 0x7FFFFFFF
+};
+
 
 typedef enum {
 	SMEM_SPINLOCK_ARRAY = 7,